2006-06-28 22:11:03 +04:00
|
|
|
<h2><%=_('Custom fields')%></h2>
|
|
|
|
|
|
|
|
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
|
|
|
|
<tr class="ListHead">
|
|
|
|
<th><%=_('Name')%></th>
|
|
|
|
<th><%=_('Type')%></th>
|
|
|
|
<th><%=_('Required')%></th>
|
|
|
|
<th><%=_('For all projects')%></th>
|
|
|
|
<th><%=_('Used by')%></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
<% for custom_field in @custom_fields %>
|
2006-07-09 20:30:01 +04:00
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
2006-06-28 22:11:03 +04:00
|
|
|
<td><%= link_to custom_field.name, :action => 'edit', :id => custom_field %></td>
|
|
|
|
<td align="center"><%= CustomField::TYPES[custom_field.typ][0] %></td>
|
|
|
|
<td align="center"><%= image_tag 'true' if custom_field.is_required? %></td>
|
|
|
|
<td align="center"><%= image_tag 'true' if custom_field.is_for_all? %></td>
|
|
|
|
<td align="center"><%= custom_field.projects.count.to_s + ' ' + _('Project') + '(s)' unless custom_field.is_for_all? %></td>
|
|
|
|
<td align="center">
|
|
|
|
<%= start_form_tag :action => 'destroy', :id => custom_field %>
|
|
|
|
<%= submit_tag _('Delete'), :class => "button-small" %>
|
|
|
|
<%= end_form_tag %> </td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<%= link_to ('« ' + _('Previous')), { :page => @custom_field_pages.current.previous } if @custom_field_pages.current.previous %>
|
|
|
|
<%= link_to (_('Next') + ' »'), { :page => @custom_field_pages.current.next } if @custom_field_pages.current.next %>
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
<%= link_to ('» ' + _('New custom field')), :action => 'new' %>
|