##// END OF EJS Templates
Added a confirmation dialog box for project archiving...
Jean-Philippe Lang -
r600:3be226d0c475
parent child
Show More
@@ -1,49 +1,49
1 1 <div class="contextual">
2 2 <%= link_to l(:label_project_new), {:controller => 'projects', :action => 'add'}, :class => 'icon icon-add' %>
3 3 </div>
4 4
5 5 <h2><%=l(:label_project_plural)%></h2>
6 6
7 7 <% form_tag() do %>
8 8 <fieldset><legend><%= l(:label_filter_plural) %></legend>
9 9 <label><%= l(:field_status) %> :</label>
10 10 <%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
11 11 <%= submit_tag l(:button_apply), :class => "small" %>
12 12 </fieldset>
13 13 <% end %>
14 14 &nbsp;
15 15
16 16 <table class="list">
17 17 <thead><tr>
18 18 <%= sort_header_tag('name', :caption => l(:label_project)) %>
19 19 <th><%=l(:field_description)%></th>
20 20 <th><%=l(:field_is_public)%></th>
21 21 <th><%=l(:label_subproject_plural)%></th>
22 22 <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
23 23 <th></th>
24 24 <th></th>
25 25 </tr></thead>
26 26 <tbody>
27 27 <% for project in @projects %>
28 28 <tr class="<%= cycle("odd", "even") %>">
29 29 <td><%= project.active? ? link_to(project.name, :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %>
30 30 <td><%=h project.description %>
31 31 <td align="center"><%= image_tag 'true.png' if project.is_public? %>
32 32 <td align="center"><%= project.children.size %>
33 33 <td align="center"><%= format_date(project.created_on) %>
34 34 <td align="center" style="width:10%">
35 35 <small>
36 <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project }, :method => :post, :class => 'icon icon-lock') if project.active? %>
36 <%= 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? %>
37 37 <%= 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?) %>
38 38 </small>
39 39 </td>
40 40 <td align="center" style="width:10%">
41 41 <small><%= link_to(l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => 'icon icon-del') %></small>
42 42 </td>
43 43 </tr>
44 44 <% end %>
45 45 </tbody>
46 46 </table>
47 47
48 48 <p><%= pagination_links_full @project_pages, :status => @status %>
49 49 [ <%= @project_pages.current.first_item %> - <%= @project_pages.current.last_item %> / <%= @project_count %> ]</p>
General Comments 0
You need to be logged in to leave comments. Login now