From 136dab8ad6126dd3a914a6d00ca0724d9781d937 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 25 Jun 2017 15:16:04 +0000 Subject: [PATCH] Fix source indentation and newline usage (#26125). 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 | 30 ++++----- app/views/gantts/show.html.erb | 107 +++++++++++++++--------------- 2 files changed, 69 insertions(+), 68 deletions(-) diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb index 45de7a6cf..e0ea4b0a6 100644 --- a/app/views/calendars/show.html.erb +++ b/app/views/calendars/show.html.erb @@ -6,26 +6,26 @@
-
"> - <%= l(:label_filter_plural) %> -
"> - <%= render :partial => 'queries/filters', :locals => {:query => @query} %> -
-
+
"> + <%= l(:label_filter_plural) %> +
"> + <%= render :partial => 'queries/filters', :locals => {:query => @query} %> +
+
-

- <%= link_to_previous_month(@year, @month, :accesskey => accesskey(:previous)) %> | <%= link_to_next_month(@year, @month, :accesskey => accesskey(:next)) %> -

+

+ <%= link_to_previous_month(@year, @month, :accesskey => accesskey(:previous)) %> | <%= link_to_next_month(@year, @month, :accesskey => accesskey(:next)) %> +

-<%= 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' %>

<% end %> diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 242489ff0..9a74f72ba 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -17,45 +17,46 @@
-
"> - <%= l(:label_filter_plural) %> -
"> - <%= render :partial => 'queries/filters', :locals => {:query => @query} %> -
-
- +
"> + <%= l(:label_filter_plural) %> +
"> + <%= render :partial => 'queries/filters', :locals => {:query => @query} %> +
+
+ +

@@ -64,21 +65,21 @@

-<%= 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 %>

<% end %>