You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_activities.html.erb 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <%= form_tag(project_enumerations_path(@project), :method => :put, :class => "tabular") do %>
  2. <table class="list">
  3. <thead><tr>
  4. <th><%= l(:field_name) %></th>
  5. <th><%= l(:enumeration_system_activity) %></th>
  6. <% TimeEntryActivity.new.available_custom_fields.each do |value| %>
  7. <th><%= h value.name %></th>
  8. <% end %>
  9. <th style="width:15%;"><%= l(:field_active) %></th>
  10. </tr></thead>
  11. <% @project.activities(true).each do |enumeration| %>
  12. <%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
  13. <tr class="<%= cycle('odd', 'even') %>">
  14. <td>
  15. <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
  16. <%= h(enumeration) %>
  17. </td>
  18. <td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td>
  19. <% enumeration.custom_field_values.each do |value| %>
  20. <td align="center">
  21. <%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
  22. </td>
  23. <% end %>
  24. <td align="center" style="width:15%;">
  25. <%= ff.check_box :active %>
  26. </td>
  27. </tr>
  28. <% end %>
  29. <% end %>
  30. </table>
  31. <div class="contextual">
  32. <%= link_to(l(:button_reset), project_enumerations_path(@project),
  33. :method => :delete,
  34. :confirm => l(:text_are_you_sure),
  35. :class => 'icon icon-del') %>
  36. </div>
  37. <%= submit_tag l(:button_save) %>
  38. <% end %>