From 06f521a5621a6cc3605df73f95e4df5f72a5cfe9 Mon Sep 17 00:00:00 2001 From: Mischa The Evil Date: Thu, 8 Jun 2017 17:43:38 +0200 Subject: [PATCH 2/4] Fix source indentation and newline usage. This unifies the source layout of the query form on the calendars/show and the gantts/show views with the queries/_query_form partial. --- app/views/calendars/show.html.erb | 32 ++++++------ app/views/gantts/show.html.erb | 107 +++++++++++++++++++------------------- 2 files changed, 70 insertions(+), 69 deletions(-) diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb index 45de7a6..e0ea4b0 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} %> -
-
- -

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

+
"> + <%= 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)) %> +

-<%= 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 242489f..9a74f72 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 %> -- 1.9.1