2006-12-16 15:15:31 +03:00
|
|
|
<div class="contextual">
|
2007-01-08 22:21:59 +03:00
|
|
|
<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'icon icon-add' %>
|
2006-12-16 15:15:31 +03:00
|
|
|
</div>
|
|
|
|
|
2006-07-29 13:32:58 +04:00
|
|
|
<h2><%=l(:label_project_plural)%></h2>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2007-05-27 21:42:04 +04:00
|
|
|
<% 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 %>
|
|
|
|
|
|
|
|
|
2006-12-24 19:35:25 +03:00
|
|
|
<table class="list">
|
|
|
|
<thead><tr>
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= sort_header_tag('name', :caption => l(:label_project)) %>
|
|
|
|
<th><%=l(:field_description)%></th>
|
2006-07-29 13:32:58 +04:00
|
|
|
<th><%=l(:field_is_public)%></th>
|
2007-03-12 20:59:02 +03:00
|
|
|
<th><%=l(:label_subproject_plural)%></th>
|
|
|
|
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
|
2006-12-24 19:35:25 +03:00
|
|
|
<th></th>
|
2007-05-27 21:42:04 +04:00
|
|
|
<th></th>
|
2006-12-24 19:35:25 +03:00
|
|
|
</tr></thead>
|
|
|
|
<tbody>
|
2006-07-09 20:30:01 +04:00
|
|
|
<% for project in @projects %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
2007-12-03 13:28:08 +03:00
|
|
|
<td><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %>
|
2007-08-17 15:21:58 +04:00
|
|
|
<td><%= textilizable project.description, :project => project %>
|
2007-01-08 22:21:59 +03:00
|
|
|
<td align="center"><%= image_tag 'true.png' if project.is_public? %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<td align="center"><%= project.children.size %>
|
|
|
|
<td align="center"><%= format_date(project.created_on) %>
|
2007-05-27 21:42:04 +04:00
|
|
|
<td align="center" style="width:10%">
|
|
|
|
<small>
|
2007-08-03 00:10:37 +04:00
|
|
|
<%= 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? %>
|
2007-05-27 21:42:04 +04:00
|
|
|
<%= 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>
|
2007-03-12 20:59:02 +03:00
|
|
|
</td>
|
2006-06-28 22:11:03 +04:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
2006-12-24 19:35:25 +03:00
|
|
|
</tbody>
|
2006-06-28 22:11:03 +04:00
|
|
|
</table>
|
|
|
|
|
2007-05-27 21:42:04 +04:00
|
|
|
<p><%= pagination_links_full @project_pages, :status => @status %>
|
|
|
|
[ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ]</p>
|