_activities.html.erb
42 lines
| 1.3 KiB
| text/plain
|
TextLexer
|
r9346 | <%= form_tag(project_enumerations_path(@project), :method => :put, :class => "tabular") do %> | ||
|
r5753 | |||
<table class="list"> | ||||
<thead><tr> | ||||
<th><%= l(:field_name) %></th> | ||||
<th><%= l(:enumeration_system_activity) %></th> | ||||
<% TimeEntryActivity.new.available_custom_fields.each do |value| %> | ||||
|
r13661 | <th><%= value.name %></th> | ||
|
r5753 | <% end %> | ||
|
r12038 | <th><%= l(:field_active) %></th> | ||
|
r5753 | </tr></thead> | ||
<% @project.activities(true).each do |enumeration| %> | ||||
|
r9346 | <%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %> | ||
|
r5753 | <tr class="<%= cycle('odd', 'even') %>"> | ||
|
r12038 | <td class="name"> | ||
|
r5753 | <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %> | ||
|
r13661 | <%= enumeration %> | ||
|
r5753 | </td> | ||
|
r12038 | <td class="tick"><%= checked_image !enumeration.project %></td> | ||
|
r5753 | <% enumeration.custom_field_values.each do |value| %> | ||
|
r12038 | <td> | ||
|
r5753 | <%= custom_field_tag "enumerations[#{enumeration.id}]", value %> | ||
</td> | ||||
<% end %> | ||||
|
r12038 | <td> | ||
|
r5753 | <%= ff.check_box :active %> | ||
</td> | ||||
</tr> | ||||
<% end %> | ||||
<% end %> | ||||
</table> | ||||
<div class="contextual"> | ||||
|
r8450 | <%= link_to(l(:button_reset), project_enumerations_path(@project), | ||
|
r7131 | :method => :delete, | ||
|
r9754 | :data => {:confirm => l(:text_are_you_sure)}, | ||
|
r5753 | :class => 'icon icon-del') %> | ||
</div> | ||||
<%= submit_tag l(:button_save) %> | ||||
<% end %> | ||||