##// 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 1 <table class="list custom_fields">
2 2 <thead><tr>
3 3 <th><%=l(:field_name)%></th>
4 4 <th><%=l(:field_field_format)%></th>
5 5 <th><%=l(:field_is_required)%></th>
6 6 <% if tab[:name] == 'IssueCustomField' %>
7 7 <th><%=l(:field_is_for_all)%></th>
8 8 <th><%=l(:label_used_by)%></th>
9 9 <% end %>
10 10 <th></th>
11 11 </tr></thead>
12 12 <tbody>
13 13 <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
14 14 <% back_url = custom_fields_path(:tab => tab[:name]) %>
15 15 <tr class="<%= cycle("odd", "even") %>">
16 16 <td class="name"><%= link_to custom_field.name, edit_custom_field_path(custom_field) %></td>
17 17 <td><%= l(custom_field.format.label) %></td>
18 18 <td><%= checked_image custom_field.is_required? %></td>
19 19 <% if tab[:name] == 'IssueCustomField' %>
20 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 22 <% end %>
23 23 <td class="buttons">
24 24 <%= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') %>
25 25 <%= delete_link custom_field_path(custom_field) %>
26 26 </td>
27 27 </tr>
28 28 <% end; reset_cycle %>
29 29 </tbody>
30 30 </table>
General Comments 0
You need to be logged in to leave comments. Login now