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