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
|
|
|
|
2008-10-24 21:12:39 +04:00
|
|
|
<% form_tag({}, :method => :get) do %>
|
2007-05-27 21:42:04 +04:00
|
|
|
<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;" %>
|
2008-10-24 21:12:39 +04:00
|
|
|
<label><%= l(:label_project) %>:</label>
|
|
|
|
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
|
|
|
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
2007-05-27 21:42:04 +04:00
|
|
|
</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>
|
|
|
|
<th><%=l(:label_subproject_plural)%></th>
|
2008-02-05 20:28:02 +03:00
|
|
|
<%= sort_header_tag('is_public', :caption => l(:field_is_public), :default_order => 'desc') %>
|
|
|
|
<%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
|
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) %>
|
2008-01-20 21:37:51 +03:00
|
|
|
<td><%= textilizable project.short_description, :project => project %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<td align="center"><%= project.children.size %>
|
2008-02-05 20:28:02 +03:00
|
|
|
<td align="center"><%= image_tag 'true.png' if project.is_public? %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<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-12-29 14:36:30 +03:00
|
|
|
<p class="pagination"><%= pagination_links_full @project_pages, @project_count %></p>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_project_plural)) -%>
|