<% if authorize_for('projects', 'edit') %>
<% labelled_tabular_form_for :project, @project, :url => { :action => "edit", :id => @project } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>
<% end %>
<%= error_messages_for 'member' %>
<%= l(:label_user) %> | <%= l(:label_role) %> | |
<% @project.members.find(:all, :include => [:role, :user]).sort{|x,y| x.role.position <=> y.role.position}.each do |member| %>
<% unless member.new_record? %>
<%= member.user.display_name %> |
<% if authorize_for('members', 'edit') %>
<% form_tag({:controller => 'members', :action => 'edit', :id => member}) do %>
<%= submit_tag l(:button_change), :class => "button-small" %>
<% end %>
<% end %>
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'members', :action => 'destroy', :id => member}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
<% end %>
<% end; reset_cycle %>
<% if authorize_for('projects', 'add_member') %>
<% form_tag({:controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project}) do %>
<%= submit_tag l(:button_add) %>
<% end %>
<% end %>
<%= l(:label_version) %> | <%= l(:field_effective_date) %> | <%= l(:field_description) %> | | |
<% for version in @project.versions %>
<%=h version.name %> |
<%= format_date(version.effective_date) %> |
<%=h version.description %> |
<%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %> |
<%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> |
<% end; reset_cycle %>
<%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %>
<%= l(:label_issue_category) %> | |
<% for @category in @project.issue_categories %>
<% unless @category.new_record? %>
<% form_tag({:controller => 'issue_categories', :action => 'edit', :id => @category}) do %>
<%= text_field 'category', 'name', :size => 25 %>
<% if authorize_for('issue_categories', 'edit') %>
<%= submit_tag l(:button_save), :class => "button-small" %>
<% end %>
<% end %>
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => @category}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
<% end %>
<% end %>
<% if authorize_for('projects', 'add_issue_category') %>
<% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %>
<%= error_messages_for 'issue_category' %>
<%= text_field 'issue_category', 'name', :size => 25 %>
<%= submit_tag l(:button_create) %>
<% end %>
<% end %>
<%= tab = params[:tab] ? h(params[:tab]) : 'info'
javascript_tag "showTab('#{tab}');" %>