annotate app/views/custom_fields/_index.html.erb @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 433d4f72a19b
children 261b3d9a4903
rev   line source
Chris@0 1 <table class="list">
Chris@0 2 <thead><tr>
Chris@909 3 <th width="30%"><%=l(:field_name)%></th>
Chris@909 4 <th><%=l(:field_field_format)%></th>
Chris@909 5 <th><%=l(:field_is_required)%></th>
Chris@909 6 <% if tab[:name] == 'IssueCustomField' %>
Chris@909 7 <th><%=l(:field_is_for_all)%></th>
Chris@909 8 <th><%=l(:label_used_by)%></th>
Chris@909 9 <% end %>
Chris@909 10 <th><%=l(:button_sort)%></th>
Chris@909 11 <th width="10%"></th>
Chris@0 12 </tr></thead>
Chris@0 13 <tbody>
Chris@909 14 <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
Chris@909 15 <tr class="<%= cycle("odd", "even") %>">
Chris@1115 16 <td><%= link_to h(custom_field.name), edit_custom_field_path(custom_field) %></td>
Chris@909 17 <td align="center"><%= l(Redmine::CustomFieldFormat.label_for(custom_field.field_format)) %></td>
Chris@909 18 <td align="center"><%= checked_image custom_field.is_required? %></td>
Chris@909 19 <% if tab[:name] == 'IssueCustomField' %>
Chris@909 20 <td align="center"><%= checked_image custom_field.is_for_all? %></td>
Chris@909 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>
Chris@909 22 <% end %>
Chris@1115 23 <td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'update', :id => custom_field}, :put) %></td>
Chris@909 24 <td class="buttons">
Chris@1115 25 <%= delete_link custom_field_path(custom_field) %>
Chris@909 26 </td>
Chris@909 27 </tr>
Chris@909 28 <% end; reset_cycle %>
Chris@0 29 </tbody>
Chris@0 30 </table>
Chris@0 31
Chris@1115 32 <p><%= link_to l(:label_custom_field_new), new_custom_field_path(:type => tab[:name]), :class => 'icon icon-add' %></p>