2006-07-29 23:54:22 +04:00
|
|
|
<h2><%=l(:label_settings)%></h2>
|
2006-07-29 13:32:58 +04:00
|
|
|
|
2007-01-26 20:59:06 +03:00
|
|
|
<div class="tabs">
|
|
|
|
<ul>
|
|
|
|
<li><%= link_to l(:label_information_plural), {}, :id=> "tab-info", :onclick => "showTab('info'); this.blur(); return false;" %></li>
|
|
|
|
<li><%= link_to l(:label_member_plural), {}, :id=> "tab-members", :onclick => "showTab('members'); this.blur(); return false;" %></li>
|
|
|
|
<li><%= link_to l(:label_version_plural), {}, :id=> "tab-versions", :onclick => "showTab('versions'); this.blur(); return false;" %></li>
|
|
|
|
<li><%= link_to l(:label_issue_category_plural), {}, :id=> "tab-categories", :onclick => "showTab('categories'); this.blur(); return false;" %></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="tab-content-info" class="tab-content">
|
2006-11-12 21:50:30 +03:00
|
|
|
<% 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 %>
|
2007-01-26 20:59:06 +03:00
|
|
|
</div>
|
|
|
|
|
2007-01-26 21:27:10 +03:00
|
|
|
<div id="tab-content-members" class="tab-content" style="display:none;">
|
2006-06-28 22:11:03 +04:00
|
|
|
<%= error_messages_for 'member' %>
|
2007-01-26 21:27:10 +03:00
|
|
|
<table class="list">
|
|
|
|
<thead><th><%= l(:label_user) %></th><th><%= l(:label_role) %></th><th></th></thead>
|
|
|
|
<tbody>
|
|
|
|
<% for member in @project.members.find(:all, :include => :user) %>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% unless member.new_record? %>
|
2007-01-26 21:27:10 +03:00
|
|
|
<tr class="<%= cycle 'odd', 'even' %>">
|
2006-11-12 21:50:30 +03:00
|
|
|
<td><%= member.user.display_name %></td>
|
2007-01-26 21:27:10 +03:00
|
|
|
<td align="center">
|
2006-11-12 21:50:30 +03:00
|
|
|
<% if authorize_for('members', 'edit') %>
|
|
|
|
<%= start_form_tag :controller => 'members', :action => 'edit', :id => member %>
|
|
|
|
<select name="member[role_id]">
|
2006-06-28 22:11:03 +04:00
|
|
|
<%= options_from_collection_for_select @roles, "id", "name", member.role_id %>
|
2006-11-12 21:50:30 +03:00
|
|
|
</select>
|
|
|
|
<%= submit_tag l(:button_change), :class => "button-small" %>
|
|
|
|
<%= end_form_tag %>
|
|
|
|
<% end %>
|
2006-06-28 22:11:03 +04:00
|
|
|
</td>
|
2007-01-26 21:27:10 +03:00
|
|
|
<td align="center">
|
2007-01-08 22:21:59 +03:00
|
|
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'members', :action => 'destroy', :id => member}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
|
2006-06-28 22:11:03 +04:00
|
|
|
</td>
|
2007-01-26 21:27:10 +03:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
<% end; reset_cycle %>
|
2006-11-12 21:50:30 +03:00
|
|
|
</table>
|
|
|
|
<% if authorize_for('projects', 'add_member') %>
|
2006-07-29 23:54:22 +04:00
|
|
|
<label><%=l(:label_member_new)%></label><br/>
|
2007-01-26 20:59:06 +03:00
|
|
|
<%= start_form_tag :controller => 'projects', :action => 'add_member', :tab => 'members', :id => @project %>
|
2006-11-12 21:50:30 +03:00
|
|
|
<select name="member[user_id]">
|
|
|
|
<%= options_from_collection_for_select @users, "id", "display_name", @member.user_id %>
|
|
|
|
</select>
|
|
|
|
<select name="member[role_id]">
|
|
|
|
<%= options_from_collection_for_select @roles, "id", "name", @member.role_id %>
|
|
|
|
</select>
|
|
|
|
<%= submit_tag l(:button_add) %>
|
|
|
|
<%= end_form_tag %>
|
|
|
|
<% end %>
|
2007-01-26 20:59:06 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="tab-content-versions" class="tab-content" style="display:none;">
|
2007-01-26 21:27:10 +03:00
|
|
|
<table class="list">
|
|
|
|
<thead><th><%= l(:label_version) %></th><th><%= l(:field_effective_date) %></th><th><%= l(:field_description) %></th><th></th><th></th></thead>
|
|
|
|
<tbody>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% for version in @project.versions %>
|
2007-01-26 21:27:10 +03:00
|
|
|
<tr class="<%= cycle 'odd', 'even' %>">
|
|
|
|
<td><strong><%=h version.name %></strong></td>
|
|
|
|
<td align="center"><%= format_date(version.effective_date) %></td>
|
|
|
|
<td><%=h version.description %></td>
|
|
|
|
<td align="center"><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></td>
|
|
|
|
<td align="center"><%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %></td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end; reset_cycle %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %>
|
2007-01-26 20:59:06 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="tab-content-categories" class="tab-content" style="display:none;">
|
2007-01-26 21:27:10 +03:00
|
|
|
<table class="list">
|
|
|
|
<thead><th><%= l(:label_issue_status) %></th><th></th></thead>
|
|
|
|
<tbody>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% for @category in @project.issue_categories %>
|
|
|
|
<% unless @category.new_record? %>
|
2007-01-26 21:27:10 +03:00
|
|
|
<tr class="<%= cycle 'odd', 'even' %>">
|
2006-11-12 21:50:30 +03:00
|
|
|
<td>
|
|
|
|
<%= start_form_tag :controller => 'issue_categories', :action => 'edit', :id => @category %>
|
|
|
|
<%= text_field 'category', 'name', :size => 25 %>
|
|
|
|
<% if authorize_for('issue_categories', 'edit') %>
|
|
|
|
<%= submit_tag l(:button_save), :class => "button-small" %>
|
|
|
|
<%= end_form_tag %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2007-01-26 21:27:10 +03:00
|
|
|
<td align="center">
|
2007-01-08 22:21:59 +03:00
|
|
|
<%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => @category}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
|
2006-06-28 22:11:03 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2007-01-26 21:27:10 +03:00
|
|
|
</tbody>
|
2006-11-12 21:50:30 +03:00
|
|
|
</table>
|
|
|
|
<% if authorize_for('projects', 'add_issue_category') %>
|
2007-01-26 20:59:06 +03:00
|
|
|
<%= start_form_tag :action => 'add_issue_category', :tab => 'categories', :id => @project %>
|
2006-11-12 21:50:30 +03:00
|
|
|
<label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br/>
|
|
|
|
<%= error_messages_for 'issue_category' %>
|
|
|
|
<%= text_field 'issue_category', 'name', :size => 25 %>
|
|
|
|
<%= submit_tag l(:button_create) %>
|
|
|
|
<%= end_form_tag %>
|
|
|
|
<% end %>
|
2006-06-28 22:11:03 +04:00
|
|
|
</div>
|
2007-01-26 20:59:06 +03:00
|
|
|
|
|
|
|
<%= tab = params[:tab] ? h(params[:tab]) : 'info'
|
|
|
|
javascript_tag "showTab('#{tab}');" %>
|