annotate app/views/custom_fields/_index.rhtml @ 507:0c939c159af4 redmine-1.2

Update to Redmine 1.2.1 on 1.2-stable branch (Redmine SVN rev 6270)
author Chris Cannam
date Thu, 14 Jul 2011 10:32:19 +0100
parents 513646585e45
children
rev   line source
Chris@0 1 <table class="list">
Chris@0 2 <thead><tr>
Chris@0 3 <th width="30%"><%=l(:field_name)%></th>
Chris@0 4 <th><%=l(:field_field_format)%></th>
Chris@0 5 <th><%=l(:field_is_required)%></th>
Chris@0 6 <% if tab[:name] == 'IssueCustomField' %>
Chris@0 7 <th><%=l(:field_is_for_all)%></th>
Chris@0 8 <th><%=l(:label_used_by)%></th>
Chris@0 9 <% end %>
Chris@0 10 <th><%=l(:button_sort)%></th>
Chris@0 11 <th width="10%"></th>
Chris@0 12 </tr></thead>
Chris@0 13 <tbody>
Chris@0 14 <% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
Chris@0 15 <tr class="<%= cycle("odd", "even") %>">
Chris@0 16 <td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
Chris@0 17 <td align="center"><%= l(Redmine::CustomFieldFormat.label_for(custom_field.field_format)) %></td>
Chris@0 18 <td align="center"><%= checked_image custom_field.is_required? %></td>
Chris@0 19 <% if tab[:name] == 'IssueCustomField' %>
Chris@0 20 <td align="center"><%= checked_image custom_field.is_for_all? %></td>
Chris@0 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@0 22 <% end %>
Chris@0 23 <td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'edit', :id => custom_field}) %></td>
Chris@0 24 <td class="buttons">
Chris@0 25 <%= link_to(l(:button_delete), { :action => 'destroy', :id => custom_field },
Chris@0 26 :method => :post,
Chris@0 27 :confirm => l(:text_are_you_sure),
Chris@0 28 :class => 'icon icon-del') %>
Chris@0 29 </td>
Chris@0 30 </tr>
Chris@0 31 <% end; reset_cycle %>
Chris@0 32 </tbody>
Chris@0 33 </table>
Chris@0 34
Chris@0 35 <p><%= link_to l(:label_custom_field_new), {:action => 'new', :type => tab[:name]}, :class => 'icon icon-add' %></p>