##// END OF EJS Templates
Makes 'delete links' the same on admin views....
Jean-Philippe Lang -
r2758:7f4635022f7d
parent child
Show More
@@ -1,32 +1,35
1 <table class="list">
1 <table class="list">
2 <thead><tr>
2 <thead><tr>
3 <th width="30%"><%=l(:field_name)%></th>
3 <th width="30%"><%=l(:field_name)%></th>
4 <th><%=l(:field_field_format)%></th>
4 <th><%=l(:field_field_format)%></th>
5 <th><%=l(:field_is_required)%></th>
5 <th><%=l(:field_is_required)%></th>
6 <% if tab[:name] == 'IssueCustomField' %>
6 <% if tab[:name] == 'IssueCustomField' %>
7 <th><%=l(:field_is_for_all)%></th>
7 <th><%=l(:field_is_for_all)%></th>
8 <th><%=l(:label_used_by)%></th>
8 <th><%=l(:label_used_by)%></th>
9 <% end %>
9 <% end %>
10 <th><%=l(:button_sort)%></th>
10 <th><%=l(:button_sort)%></th>
11 <th width="10%"></th>
11 <th width="10%"></th>
12 </tr></thead>
12 </tr></thead>
13 <tbody>
13 <tbody>
14 <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
14 <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
15 <tr class="<%= cycle("odd", "even") %>">
15 <tr class="<%= cycle("odd", "even") %>">
16 <td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
16 <td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
17 <td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td>
17 <td align="center"><%= l(CustomField::FIELD_FORMATS[custom_field.field_format][:name]) %></td>
18 <td align="center"><%= image_tag 'true.png' if custom_field.is_required? %></td>
18 <td align="center"><%= image_tag 'true.png' if custom_field.is_required? %></td>
19 <% if tab[:name] == 'IssueCustomField' %>
19 <% if tab[:name] == 'IssueCustomField' %>
20 <td align="center"><%= image_tag 'true.png' if custom_field.is_for_all? %></td>
20 <td align="center"><%= image_tag 'true.png' if custom_field.is_for_all? %></td>
21 <td align="center"><%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
21 <td align="center"><%= l(:label_x_projects, :count => custom_field.projects.count) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
22 <% end %>
22 <% end %>
23 <td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'edit', :id => custom_field}) %></td>
23 <td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'edit', :id => custom_field}) %></td>
24 <td align="center">
24 <td class="buttons">
25 <%= button_to l(:button_delete), { :action => 'destroy', :id => custom_field }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
25 <%= link_to(l(:button_delete), { :action => 'destroy', :id => custom_field },
26 :method => :post,
27 :confirm => l(:text_are_you_sure),
28 :class => 'icon icon-del') %>
26 </td>
29 </td>
27 </tr>
30 </tr>
28 <% end; reset_cycle %>
31 <% end; reset_cycle %>
29 </tbody>
32 </tbody>
30 </table>
33 </table>
31
34
32 <p><%= link_to l(:label_custom_field_new), {:action => 'new', :type => tab[:name]}, :class => 'icon icon-add' %></p>
35 <p><%= link_to l(:label_custom_field_new), {:action => 'new', :type => tab[:name]}, :class => 'icon icon-add' %></p>
@@ -1,26 +1,29
1 <h2><%=l(:label_enumerations)%></h2>
1 <h2><%=l(:label_enumerations)%></h2>
2
2
3 <% Enumeration.get_subclasses.each do |klass| %>
3 <% Enumeration.get_subclasses.each do |klass| %>
4 <h3><%= l(klass::OptionName) %></h3>
4 <h3><%= l(klass::OptionName) %></h3>
5
5
6 <% enumerations = klass.all %>
6 <% enumerations = klass.all %>
7 <% if enumerations.any? %>
7 <% if enumerations.any? %>
8 <table class="list">
8 <table class="list">
9 <% enumerations.each do |enumeration| %>
9 <% enumerations.each do |enumeration| %>
10 <tr class="<%= cycle('odd', 'even') %>">
10 <tr class="<%= cycle('odd', 'even') %>">
11 <td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
11 <td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
12 <td style="width:15%;"><%= image_tag('true.png') if enumeration.is_default? %></td>
12 <td style="width:15%;"><%= image_tag('true.png') if enumeration.is_default? %></td>
13 <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
13 <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}) %></td>
14 <td align="center" style="width:10%;">
14 <td class="buttons">
15 <%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration }, :method => :post, :confirm => l(:text_are_you_sure), :class => "icon icon-del" %>
15 <%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
16 :method => :post,
17 :confirm => l(:text_are_you_sure),
18 :class => 'icon icon-del' %>
16 </td>
19 </td>
17 </tr>
20 </tr>
18 <% end %>
21 <% end %>
19 </table>
22 </table>
20 <% reset_cycle %>
23 <% reset_cycle %>
21 <% end %>
24 <% end %>
22
25
23 <p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p>
26 <p><%= link_to l(:label_enumeration_new), { :action => 'new', :type => klass.name } %></p>
24 <% end %>
27 <% end %>
25
28
26 <% html_title(l(:label_enumerations)) -%>
29 <% html_title(l(:label_enumerations)) -%>
@@ -1,32 +1,35
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_issue_status_new), {:action => 'new'}, :class => 'icon icon-add' %>
2 <%= link_to l(:label_issue_status_new), {:action => 'new'}, :class => 'icon icon-add' %>
3 </div>
3 </div>
4
4
5 <h2><%=l(:label_issue_status_plural)%></h2>
5 <h2><%=l(:label_issue_status_plural)%></h2>
6
6
7 <table class="list">
7 <table class="list">
8 <thead><tr>
8 <thead><tr>
9 <th><%=l(:field_status)%></th>
9 <th><%=l(:field_status)%></th>
10 <th><%=l(:field_is_default)%></th>
10 <th><%=l(:field_is_default)%></th>
11 <th><%=l(:field_is_closed)%></th>
11 <th><%=l(:field_is_closed)%></th>
12 <th><%=l(:button_sort)%></th>
12 <th><%=l(:button_sort)%></th>
13 <th></th>
13 <th></th>
14 </tr></thead>
14 </tr></thead>
15 <tbody>
15 <tbody>
16 <% for status in @issue_statuses %>
16 <% for status in @issue_statuses %>
17 <tr class="<%= cycle("odd", "even") %>">
17 <tr class="<%= cycle("odd", "even") %>">
18 <td><%= link_to status.name, :action => 'edit', :id => status %></td>
18 <td><%= link_to status.name, :action => 'edit', :id => status %></td>
19 <td align="center"><%= image_tag 'true.png' if status.is_default? %></td>
19 <td align="center"><%= image_tag 'true.png' if status.is_default? %></td>
20 <td align="center"><%= image_tag 'true.png' if status.is_closed? %></td>
20 <td align="center"><%= image_tag 'true.png' if status.is_closed? %></td>
21 <td align="center" style="width:15%;"><%= reorder_links('issue_status', {:action => 'update', :id => status}) %></td>
21 <td align="center" style="width:15%;"><%= reorder_links('issue_status', {:action => 'update', :id => status}) %></td>
22 <td align="center" style="width:10%;">
22 <td class="buttons">
23 <%= button_to l(:button_delete), { :action => 'destroy', :id => status }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
23 <%= link_to(l(:button_delete), { :action => 'destroy', :id => status },
24 :method => :post,
25 :confirm => l(:text_are_you_sure),
26 :class => 'icon icon-del') %>
24 </td>
27 </td>
25 </tr>
28 </tr>
26 <% end %>
29 <% end %>
27 </tbody>
30 </tbody>
28 </table>
31 </table>
29
32
30 <p class="pagination"><%= pagination_links_full @issue_status_pages %></p>
33 <p class="pagination"><%= pagination_links_full @issue_status_pages %></p>
31
34
32 <% html_title(l(:label_issue_status_plural)) -%>
35 <% html_title(l(:label_issue_status_plural)) -%>
@@ -1,34 +1,37
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_role_new), {:action => 'new'}, :class => 'icon icon-add' %>
2 <%= link_to l(:label_role_new), {:action => 'new'}, :class => 'icon icon-add' %>
3 </div>
3 </div>
4
4
5 <h2><%=l(:label_role_plural)%></h2>
5 <h2><%=l(:label_role_plural)%></h2>
6
6
7 <table class="list">
7 <table class="list">
8 <thead><tr>
8 <thead><tr>
9 <th><%=l(:label_role)%></th>
9 <th><%=l(:label_role)%></th>
10 <th><%=l(:button_sort)%></th>
10 <th><%=l(:button_sort)%></th>
11 <th></th>
11 <th></th>
12 </tr></thead>
12 </tr></thead>
13 <tbody>
13 <tbody>
14 <% for role in @roles %>
14 <% for role in @roles %>
15 <tr class="<%= cycle("odd", "even") %>">
15 <tr class="<%= cycle("odd", "even") %>">
16 <td><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, :action => 'edit', :id => role)) %></td>
16 <td><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, :action => 'edit', :id => role)) %></td>
17 <td align="center" style="width:15%;">
17 <td align="center" style="width:15%;">
18 <% unless role.builtin? %>
18 <% unless role.builtin? %>
19 <%= reorder_links('role', {:action => 'edit', :id => role}) %>
19 <%= reorder_links('role', {:action => 'edit', :id => role}) %>
20 <% end %>
20 <% end %>
21 </td>
21 </td>
22 <td align="center" style="width:10%;">
22 <td class="buttons">
23 <%= button_to(l(:button_delete), { :action => 'destroy', :id => role }, :confirm => l(:text_are_you_sure), :class => "button-small", :disabled => role.builtin? ) %>
23 <%= link_to(l(:button_delete), { :action => 'destroy', :id => role },
24 :method => :post,
25 :confirm => l(:text_are_you_sure),
26 :class => 'icon icon-del') unless role.builtin? %>
24 </td>
27 </td>
25 </tr>
28 </tr>
26 <% end %>
29 <% end %>
27 </tbody>
30 </tbody>
28 </table>
31 </table>
29
32
30 <p class="pagination"><%= pagination_links_full @role_pages %></p>
33 <p class="pagination"><%= pagination_links_full @role_pages %></p>
31
34
32 <p><%= link_to l(:label_permissions_report), :action => 'report' %></p>
35 <p><%= link_to l(:label_permissions_report), :action => 'report' %></p>
33
36
34 <% html_title(l(:label_role_plural)) -%>
37 <% html_title(l(:label_role_plural)) -%>
@@ -1,30 +1,33
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_tracker_new), {:action => 'new'}, :class => 'icon icon-add' %>
2 <%= link_to l(:label_tracker_new), {:action => 'new'}, :class => 'icon icon-add' %>
3 </div>
3 </div>
4
4
5 <h2><%=l(:label_tracker_plural)%></h2>
5 <h2><%=l(:label_tracker_plural)%></h2>
6
6
7 <table class="list">
7 <table class="list">
8 <thead><tr>
8 <thead><tr>
9 <th><%=l(:label_tracker)%></th>
9 <th><%=l(:label_tracker)%></th>
10 <th></th>
10 <th></th>
11 <th><%=l(:button_sort)%></th>
11 <th><%=l(:button_sort)%></th>
12 <th></th>
12 <th></th>
13 </tr></thead>
13 </tr></thead>
14 <tbody>
14 <tbody>
15 <% for tracker in @trackers %>
15 <% for tracker in @trackers %>
16 <tr class="<%= cycle("odd", "even") %>">
16 <tr class="<%= cycle("odd", "even") %>">
17 <td><%= link_to tracker.name, :action => 'edit', :id => tracker %></td>
17 <td><%= link_to tracker.name, :action => 'edit', :id => tracker %></td>
18 <td align="center"><% unless tracker.workflows.count > 0 %><span class="icon icon-warning"><%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), {:controller => 'workflows', :action => 'edit', :tracker_id => tracker} %>)</span><% end %></td>
18 <td align="center"><% unless tracker.workflows.count > 0 %><span class="icon icon-warning"><%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), {:controller => 'workflows', :action => 'edit', :tracker_id => tracker} %>)</span><% end %></td>
19 <td align="center" style="width:15%;"><%= reorder_links('tracker', {:action => 'edit', :id => tracker}) %></td>
19 <td align="center" style="width:15%;"><%= reorder_links('tracker', {:action => 'edit', :id => tracker}) %></td>
20 <td align="center" style="width:10%;">
20 <td class="buttons">
21 <%= button_to l(:button_delete), { :action => 'destroy', :id => tracker }, :confirm => l(:text_are_you_sure), :class => "button-small" %>
21 <%= link_to(l(:button_delete), { :action => 'destroy', :id => tracker },
22 :method => :post,
23 :confirm => l(:text_are_you_sure),
24 :class => 'icon icon-del') %>
22 </td>
25 </td>
23 </tr>
26 </tr>
24 <% end %>
27 <% end %>
25 </tbody>
28 </tbody>
26 </table>
29 </table>
27
30
28 <p class="pagination"><%= pagination_links_full @tracker_pages %></p>
31 <p class="pagination"><%= pagination_links_full @tracker_pages %></p>
29
32
30 <% html_title(l(:label_tracker_plural)) -%>
33 <% html_title(l(:label_tracker_plural)) -%>
General Comments 0
You need to be logged in to leave comments. Login now