##// END OF EJS Templates
Fixes form buttons on projects/settings/activities (closes #4083)....
Jean-Philippe Lang -
r2842:244525096011
parent child
Show More
@@ -1,37 +1,42
1 <% form_tag({:controller => 'projects', :action => 'save_activities', :id => @project}, :class => "tabular") do %>
1 <% form_tag({:controller => 'projects', :action => 'save_activities', :id => @project}, :class => "tabular") do %>
2
2
3 <table class="list">
3 <table class="list">
4 <tr>
4 <tr>
5 <th><%= l(:field_name) %></th>
5 <th><%= l(:field_name) %></th>
6 <th><%= l(:enumeration_system_activity) %></th>
6 <th><%= l(:enumeration_system_activity) %></th>
7 <% TimeEntryActivity.new.available_custom_fields.each do |value| %>
7 <% TimeEntryActivity.new.available_custom_fields.each do |value| %>
8 <th><%= h value.name %></th>
8 <th><%= h value.name %></th>
9 <% end %>
9 <% end %>
10 <th style="width:15%;"><%= l(:field_active) %></th>
10 <th style="width:15%;"><%= l(:field_active) %></th>
11 </tr>
11 </tr>
12
12
13 <% @project.activities(true).each do |enumeration| %>
13 <% @project.activities(true).each do |enumeration| %>
14 <% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
14 <% fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>
15 <tr class="<%= cycle('odd', 'even') %>">
15 <tr class="<%= cycle('odd', 'even') %>">
16 <td>
16 <td>
17 <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
17 <%= ff.hidden_field :parent_id, :value => enumeration.id unless enumeration.project %>
18 <%= h(enumeration) %>
18 <%= h(enumeration) %>
19 </td>
19 </td>
20 <td align="center" style="width:15%;"><%= image_tag('true.png') unless enumeration.project %></td>
20 <td align="center" style="width:15%;"><%= image_tag('true.png') unless enumeration.project %></td>
21 <% enumeration.custom_field_values.each do |value| %>
21 <% enumeration.custom_field_values.each do |value| %>
22 <td align="center">
22 <td align="center">
23 <%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
23 <%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
24 </td>
24 </td>
25 <% end %>
25 <% end %>
26 <td align="center" style="width:15%;">
26 <td align="center" style="width:15%;">
27 <%= ff.check_box :active %>
27 <%= ff.check_box :active %>
28 </td>
28 </td>
29 </tr>
29 </tr>
30 <% end %>
30 <% end %>
31 <% end %>
31 <% end %>
32 </table>
32 </table>
33
33
34 <div class="contextual">
35 <%= link_to(l(:button_reset), {:controller => 'projects', :action => 'reset_activities', :id => @project},
36 :method => :delete,
37 :confirm => l(:text_are_you_sure),
38 :class => 'icon icon-del') %>
39 </div>
40
34 <%= submit_tag l(:button_save) %>
41 <%= submit_tag l(:button_save) %>
35 <% end %>
42 <% end %>
36 <%= button_to l(:button_reset), {:controller => 'projects', :action => 'reset_activities', :id => @project}, :method => :delete, :confirm => l(:text_are_you_sure), :style => "position: relative; top: -20px; left: 60px;" %>
37
General Comments 0
You need to be logged in to leave comments. Login now