settings.rhtml
92 lines
| 4.1 KiB
| text/html+ruby
|
RhtmlLexer
|
r12 | <h2><%=l(:label_settings)%></h2> | |
|
r10 | ||
|
r178 | <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> | |||
|
r526 | <li><%= link_to l(:label_board_plural), {}, :id=> "tab-boards", :onclick => "showTab('boards'); this.blur(); return false;" %></li> | |
|
r178 | </ul> | |
</div> | |||
<div id="tab-content-info" class="tab-content"> | |||
|
r330 | <% if authorize_for('projects', 'edit') %> | |
|
r42 | <% 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 %> | |||
|
r178 | </div> | |
|
r330 | <div id="tab-content-members" class="tab-content" style="display:none;"> | |
|
r505 | <%= render :partial => 'members' %> | |
|
r178 | </div> | |
<div id="tab-content-versions" class="tab-content" style="display:none;"> | |||
|
r179 | <table class="list"> | |
|
r561 | <thead> | |
<th><%= l(:label_version) %></th> | |||
<th><%= l(:field_effective_date) %></th> | |||
<th><%= l(:field_description) %></th> | |||
<th><%= l(:label_wiki_page) unless @project.wiki.nil? %></th> | |||
<th style="width:15%"></th> | |||
<th style="width:15%"></th> | |||
</thead> | |||
|
r330 | <tbody> | |
|
r533 | <% for version in @project.versions.sort %> | |
|
r330 | <tr class="<%= cycle 'odd', 'even' %>"> | |
<td><%=h version.name %></td> | |||
<td align="center"><%= format_date(version.effective_date) %></td> | |||
|
r179 | <td><%=h version.description %></td> | |
|
r561 | <td><%= link_to(version.wiki_page_title, :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td> | |
|
r505 | <td align="center"><small><%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %></small></td> | |
<td align="center"><small><%= 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' %></small></td> | |||
|
r330 | </td> | |
</tr> | |||
|
r179 | <% end; reset_cycle %> | |
|
r330 | </tbody> | |
</table> | |||
|
r506 | | |
<p><%= link_to_if_authorized l(:label_version_new), :controller => 'projects', :action => 'add_version', :id => @project %></p> | |||
|
r330 | </div> | |
|
r178 | ||
<div id="tab-content-categories" class="tab-content" style="display:none;"> | |||
|
r179 | <table class="list"> | |
|
r506 | <thead><th><%= l(:label_issue_category) %></th><th style="width:15%"></th></thead> | |
|
r330 | <tbody> | |
<% for @category in @project.issue_categories %> | |||
<% unless @category.new_record? %> | |||
<tr class="<%= cycle 'odd', 'even' %>"> | |||
<td> | |||
<% 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 %> | |||
|
r181 | <% end %> | |
|
r330 | </td> | |
|
r179 | <td align="center"> | |
|
r505 | <small><%= 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' %></small> | |
|
r330 | </td> | |
</tr> | |||
<% end %> | |||
<% end %> | |||
|
r179 | </tbody> | |
|
r42 | </table> | |
|
r506 | | |
|
r330 | <% if authorize_for('projects', 'add_issue_category') %> | |
|
r181 | <% form_tag({:action => 'add_issue_category', :tab => 'categories', :id => @project}) do %> | |
|
r506 | <p><label for="issue_category_name"><%=l(:label_issue_category_new)%></label><br /> | |
|
r330 | <%= error_messages_for 'issue_category' %> | |
|
r42 | <%= text_field 'issue_category', 'name', :size => 25 %> | |
|
r506 | <%= submit_tag l(:button_add) %></p> | |
|
r330 | <% end %> | |
<% end %> | |||
</div> | |||
|
r178 | ||
|
r526 | <div id="tab-content-boards" class="tab-content" style="display:none;"> | |
<%= render :partial => 'boards' %> | |||
</div> | |||
|
r178 | <%= tab = params[:tab] ? h(params[:tab]) : 'info' | |
javascript_tag "showTab('#{tab}');" %> |