projects.rhtml
51 lines
| 2.2 KiB
| text/html+ruby
|
RhtmlLexer
|
r90 | <div class="contextual"> | ||
|
r154 | <%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'icon icon-add' %> | ||
|
r90 | </div> | ||
|
r10 | <h2><%=l(:label_project_plural)%></h2> | ||
|
r2 | |||
|
r546 | <% form_tag() do %> | ||
<fieldset><legend><%= l(:label_filter_plural) %></legend> | ||||
<label><%= l(:field_status) %> :</label> | ||||
<%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %> | ||||
<%= submit_tag l(:button_apply), :class => "small" %> | ||||
</fieldset> | ||||
<% end %> | ||||
| ||||
|
r105 | <table class="list"> | ||
<thead><tr> | ||||
|
r330 | <%= sort_header_tag('name', :caption => l(:label_project)) %> | ||
<th><%=l(:field_description)%></th> | ||||
|
r10 | <th><%=l(:field_is_public)%></th> | ||
|
r330 | <th><%=l(:label_subproject_plural)%></th> | ||
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %> | ||||
|
r105 | <th></th> | ||
|
r546 | <th></th> | ||
|
r105 | </tr></thead> | ||
<tbody> | ||||
|
r5 | <% for project in @projects %> | ||
|
r330 | <tr class="<%= cycle("odd", "even") %>"> | ||
|
r936 | <td><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %> | ||
|
r645 | <td><%= textilizable project.description, :project => project %> | ||
|
r154 | <td align="center"><%= image_tag 'true.png' if project.is_public? %> | ||
|
r330 | <td align="center"><%= project.children.size %> | ||
<td align="center"><%= format_date(project.created_on) %> | ||||
|
r546 | <td align="center" style="width:10%"> | ||
<small> | ||||
|
r600 | <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %> | ||
|
r546 | <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project }, :method => :post, :class => 'icon icon-unlock') if !project.active? && (project.parent.nil? || project.parent.active?) %> | ||
</small> | ||||
</td> | ||||
<td align="center" style="width:10%"> | ||||
<small><%= link_to(l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => 'icon icon-del') %></small> | ||||
|
r330 | </td> | ||
|
r2 | </tr> | ||
<% end %> | ||||
|
r105 | </tbody> | ||
|
r2 | </table> | ||
|
r546 | <p><%= pagination_links_full @project_pages, :status => @status %> | ||
[ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ]</p> | ||||
|
r951 | |||
<% set_html_title l(:label_project_plural) -%> | ||||