"Fossies" - the Fresh Open Source Software Archive

Member "redmine-4.1.1/app/views/trackers/fields.html.erb" (6 Apr 2020, 3221 Bytes) of package /linux/www/redmine-4.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) ERB Templates source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <%= title [l(:label_tracker_plural), trackers_path], l(:field_summary) %>
    2 
    3 <% if @trackers.any? %>
    4   <%= form_tag fields_trackers_path do %>
    5     <div class="autoscroll">
    6     <table class="list tracker-summary">
    7     <thead>
    8       <tr>
    9         <th></th>
   10         <% @trackers.each do |tracker| %>
   11         <th>
   12           <%= link_to_function('', "toggleCheckboxesBySelector('input.tracker-#{tracker.id}')",
   13                                :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
   14                                :class => 'icon-only icon-checked') %>
   15           <%= tracker.name %>
   16         </th>
   17         <% end %>
   18       </tr>
   19     </thead>
   20     <tbody>
   21       <tr class="group open">
   22         <td colspan="<%= @trackers.size + 1 %>">
   23           <span class="expander icon icon-expended" onclick="toggleRowGroup(this);">&nbsp;</span>
   24           <%= l(:field_core_fields) %>
   25         </td>
   26       </tr>
   27       <% Tracker::CORE_FIELDS.each do |field| %>
   28       <tr>
   29         <% field_name = l("field_#{field}".sub(/_id$/, '')) %>
   30         <td class="name">
   31           <%= link_to_function('', "toggleCheckboxesBySelector('input.core-field-#{field}')",
   32                                :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
   33                                :class => 'icon-only icon-checked') %>
   34           <%= field_name %>
   35         </td>
   36         <% @trackers.each do |tracker| %>
   37         <td title="<%= "#{tracker.name}: #{field_name}" %>">
   38           <%= check_box_tag "trackers[#{tracker.id}][core_fields][]", field, tracker.core_fields.include?(field),
   39                             :class => "tracker-#{tracker.id} core-field-#{field}", :id => nil %>
   40         </td>
   41         <% end %>
   42       </tr>
   43       <% end %>
   44       <% if @custom_fields.any? %>
   45         <tr class="group open">
   46           <td colspan="<%= @trackers.size + 1 %>">
   47             <span class="expander icon icon-expended" onclick="toggleRowGroup(this);">&nbsp;</span>
   48             <%= l(:label_custom_field_plural) %>
   49           </td>
   50         </tr>
   51         <% @custom_fields.each do |field| %>
   52         <tr>
   53           <td class="name">
   54             <%= link_to_function('', "toggleCheckboxesBySelector('input.custom-field-#{field.id}')",
   55                                  :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}",
   56                                  :class => 'icon-only icon-checked') %>
   57             <%= field.name %>
   58           </td>
   59           <% @trackers.each do |tracker| %>
   60           <td title="<%= "#{tracker.name}: #{field.name}" %>">
   61             <%= check_box_tag "trackers[#{tracker.id}][custom_field_ids][]", field.id, tracker.custom_fields.include?(field),
   62                               :class => "tracker-#{tracker.id} custom-field-#{field.id}", :id => nil %>
   63           </td>
   64           <% end %>
   65         </tr>
   66         <% end %>
   67       <% end %>
   68     </tbody>
   69     </table>
   70     </div>
   71     <p><%= submit_tag l(:button_save) %></p>
   72     <% @trackers.each do |tracker| %>
   73       <%= hidden_field_tag "trackers[#{tracker.id}][core_fields][]", '' %>
   74       <%= hidden_field_tag "trackers[#{tracker.id}][custom_field_ids][]", '' %>
   75     <% end %>
   76   <% end %>
   77 <% else %>
   78   <p class="nodata"><%= l(:label_no_data) %></p>
   79 <% end %>