##// END OF EJS Templates
Make it work for 0 projects (#24587)....
Jean-Philippe Lang -
r15688:9b08365ea58b
parent child
Show More
@@ -1,30 +1,30
1 <table class="list custom_fields">
1 <table class="list custom_fields">
2 <thead><tr>
2 <thead><tr>
3 <th><%=l(:field_name)%></th>
3 <th><%=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></th>
10 <th></th>
11 </tr></thead>
11 </tr></thead>
12 <tbody>
12 <tbody>
13 <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
13 <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
14 <% back_url = custom_fields_path(:tab => tab[:name]) %>
14 <% back_url = custom_fields_path(:tab => tab[:name]) %>
15 <tr class="<%= cycle("odd", "even") %>">
15 <tr class="<%= cycle("odd", "even") %>">
16 <td class="name"><%= link_to custom_field.name, edit_custom_field_path(custom_field) %></td>
16 <td class="name"><%= link_to custom_field.name, edit_custom_field_path(custom_field) %></td>
17 <td><%= l(custom_field.format.label) %></td>
17 <td><%= l(custom_field.format.label) %></td>
18 <td><%= checked_image custom_field.is_required? %></td>
18 <td><%= checked_image custom_field.is_required? %></td>
19 <% if tab[:name] == 'IssueCustomField' %>
19 <% if tab[:name] == 'IssueCustomField' %>
20 <td><%= checked_image custom_field.is_for_all? %></td>
20 <td><%= checked_image custom_field.is_for_all? %></td>
21 <td><%= l(:label_x_projects, :count => @custom_fields_projects_count[custom_field.id]) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
21 <td><%= l(:label_x_projects, :count => @custom_fields_projects_count[custom_field.id] || 0) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
22 <% end %>
22 <% end %>
23 <td class="buttons">
23 <td class="buttons">
24 <%= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') %>
24 <%= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') %>
25 <%= delete_link custom_field_path(custom_field) %>
25 <%= delete_link custom_field_path(custom_field) %>
26 </td>
26 </td>
27 </tr>
27 </tr>
28 <% end; reset_cycle %>
28 <% end; reset_cycle %>
29 </tbody>
29 </tbody>
30 </table>
30 </table>
General Comments 0
You need to be logged in to leave comments. Login now