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>
|
2009-01-24 14:31:15 +03:00
|
|
|
<th><%=l(:label_project)%></th>
|
2007-03-12 20:59:02 +03:00
|
|
|
<th><%=l(:field_description)%></th>
|
2009-01-24 14:31:15 +03:00
|
|
|
<th><%=l(:field_is_public)%></th>
|
|
|
|
<th><%=l(:field_created_on)%></th>
|
2009-05-10 15:36:12 +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 %>
|
2009-01-24 14:31:15 +03:00
|
|
|
<tr class="<%= cycle("odd", "even") %> <%= css_project_classes(project) %>">
|
|
|
|
<td class="name" style="padding-left: <%= project.level %>em;"><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %></td>
|
|
|
|
<td><%= textilizable project.short_description, :project => project %></td>
|
|
|
|
<td align="center"><%= image_tag 'true.png' if project.is_public? %></td>
|
|
|
|
<td align="center"><%= format_date(project.created_on) %></td>
|
2009-05-10 15:36:12 +04:00
|
|
|
<td class="buttons">
|
2009-07-04 17:14:28 +04:00
|
|
|
<%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') if project.active? %>
|
|
|
|
<%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if !project.active? && (project.parent.nil? || project.parent.active?) %>
|
2009-05-04 01:25:37 +04:00
|
|
|
<%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
|
2009-05-10 15:36:12 +04:00
|
|
|
<%= link_to(l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => 'icon icon-del') %>
|
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>
|
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_project_plural)) -%>
|