]> source.dussan.org Git - redmine.git/commitdiff
Fix source indentation and newline usage (#26125).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 Jun 2017 15:16:04 +0000 (15:16 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 Jun 2017 15:16:04 +0000 (15:16 +0000)
This unifies the source layout of the query form on the calendars/show
and the gantts/show views with the queries/_query_form partial.

Patch by Mischa The Evil.

git-svn-id: http://svn.redmine.org/redmine/trunk@16702 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/calendars/show.html.erb
app/views/gantts/show.html.erb

index 45de7a6cf878bccce20163733d129fc6273e1768..e0ea4b0a6abd78d72b818c2162ca9afd1501868a 100644 (file)
@@ -6,26 +6,26 @@
 
 <div id="query_form_with_buttons" class="hide-when-print">
 <div id="query_form_content">
-<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
-  <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
-  <div style="<%= @query.new_record? ? "" : "display: none;" %>">
-    <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
-  </div>
-</fieldset>
-
-<p style="float:right;">
-  <%= link_to_previous_month(@year, @month, :accesskey => accesskey(:previous)) %> | <%= link_to_next_month(@year, @month, :accesskey => accesskey(:next)) %>
-</p>
+  <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
+    <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
+    <div style="<%= @query.new_record? ? "" : "display: none;" %>">
+      <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
+    </div>
+  </fieldset>
+
+  <p style="float:right;">
+    <%= link_to_previous_month(@year, @month, :accesskey => accesskey(:previous)) %> | <%= link_to_next_month(@year, @month, :accesskey => accesskey(:next)) %>
+  </p>
 </div>
 
 <p class="buttons">
-<%= label_tag('month', l(:label_month)) %>
-<%= select_month(@month, :prefix => "month", :discard_type => true) %>
-<%= label_tag('year', l(:label_year)) %>
-<%= select_year(@year, :prefix => "year", :discard_type => true) %>
+  <%= label_tag('month', l(:label_month)) %>
+  <%= select_month(@month, :prefix => "month", :discard_type => true) %>
+  <%= label_tag('year', l(:label_year)) %>
+  <%= select_year(@year, :prefix => "year", :discard_type => true) %>
 
-<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
-<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
+  <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
+  <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
 </p>
 </div>
 <% end %>
index 242489ff0b6f072d035dc217719b807cfd57f543..9a74f72baa971685639199c641cb8edc6dbb8d1a 100644 (file)
 
 <div id="query_form_with_buttons" class="hide-when-print">
 <div id="query_form_content">
-<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
-  <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
-  <div style="<%= @query.new_record? ? "" : "display: none;" %>">
-    <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
-  </div>
-</fieldset>
-<fieldset id="options" class="collapsible collapsed">
-  <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
-  <div style="display: none;">
-    <table>
-      <tr>
-        <td>
-          <fieldset>
-            <legend><%= l(:label_related_issues) %></legend>
-            <label for="draw_relations">
-              <%= check_box 'query', 'draw_relations', :id => 'draw_relations' %>
-              <% rels = [IssueRelation::TYPE_BLOCKS, IssueRelation::TYPE_PRECEDES] %>
-              <% rels.each do |rel| %>
-                <% color = Redmine::Helpers::Gantt::DRAW_TYPES[rel][:color] %>
-                <%= content_tag(:span, '&nbsp;&nbsp;&nbsp;'.html_safe,
-                                :style => "background-color: #{color}") %>
-                <%= l(IssueRelation::TYPES[rel][:name]) %>
-              <% end %>
-            </label>
-          </fieldset>
-        </td>
-        <td>
-          <fieldset>
-            <legend><%= l(:label_gantt_progress_line) %></legend>
-            <label for="draw_progress_line">
-              <%= check_box 'query', 'draw_progress_line', :id => 'draw_progress_line' %>
-              <%= l(:label_display) %>
-            </label>
-          </fieldset>
-        </td>
-      </tr>
-    </table>
-  </div>
-</fieldset>
+  <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
+    <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
+    <div style="<%= @query.new_record? ? "" : "display: none;" %>">
+      <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
+    </div>
+  </fieldset>
+
+  <fieldset id="options" class="collapsible collapsed">
+    <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
+    <div style="display: none;">
+      <table>
+        <tr>
+          <td>
+            <fieldset>
+              <legend><%= l(:label_related_issues) %></legend>
+              <label for="draw_relations">
+                <%= check_box 'query', 'draw_relations', :id => 'draw_relations' %>
+                <% rels = [IssueRelation::TYPE_BLOCKS, IssueRelation::TYPE_PRECEDES] %>
+                <% rels.each do |rel| %>
+                  <% color = Redmine::Helpers::Gantt::DRAW_TYPES[rel][:color] %>
+                  <%= content_tag(:span, '&nbsp;&nbsp;&nbsp;'.html_safe,
+                                  :style => "background-color: #{color}") %>
+                  <%= l(IssueRelation::TYPES[rel][:name]) %>
+                <% end %>
+              </label>
+            </fieldset>
+          </td>
+          <td>
+            <fieldset>
+              <legend><%= l(:label_gantt_progress_line) %></legend>
+              <label for="draw_progress_line">
+                <%= check_box 'query', 'draw_progress_line', :id => 'draw_progress_line' %>
+                <%= l(:label_display) %>
+              </label>
+            </fieldset>
+          </td>
+        </tr>
+      </table>
+    </div>
+  </fieldset>
 </div>
 
 <p class="contextual">
 </p>
 
 <p class="buttons">
-<%= text_field_tag 'months', @gantt.months, :size => 2 %>
-<%= l(:label_months_from) %>
-<%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
-<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
-<%= hidden_field_tag 'zoom', @gantt.zoom %>
+  <%= text_field_tag 'months', @gantt.months, :size => 2 %>
+  <%= l(:label_months_from) %>
+  <%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
+  <%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
+  <%= hidden_field_tag 'zoom', @gantt.zoom %>
 
-<%= link_to_function l(:button_apply), '$("#query_form").submit()',
-                     :class => 'icon icon-checked' %>
-<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
-            :class => 'icon icon-reload' %>
-<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
-  <%= link_to_function l(:button_save),
-                       "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
-                       :class => 'icon icon-save' %>
-<% end %>
+  <%= link_to_function l(:button_apply), '$("#query_form").submit()',
+                       :class => 'icon icon-checked' %>
+  <%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
+              :class => 'icon icon-reload' %>
+  <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
+    <%= link_to_function l(:button_save),
+                         "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
+                         :class => 'icon icon-save' %>
+  <% end %>
 </p>
 </div>
 <% end %>