diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-06-25 15:16:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-06-25 15:16:04 +0000 |
commit | 136dab8ad6126dd3a914a6d00ca0724d9781d937 (patch) | |
tree | 40d747d233203a2a22612808169144361e0c8131 /app | |
parent | 7591a6b6ed874a5ebfd2754d0558819e1ee3a31e (diff) | |
download | redmine-136dab8ad6126dd3a914a6d00ca0724d9781d937.tar.gz redmine-136dab8ad6126dd3a914a6d00ca0724d9781d937.zip |
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
Diffstat (limited to 'app')
-rw-r--r-- | app/views/calendars/show.html.erb | 32 | ||||
-rw-r--r-- | 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 45de7a6cf..e0ea4b0a6 100644 --- a/app/views/calendars/show.html.erb +++ b/app/views/calendars/show.html.erb @@ -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 %> 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 @@ <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, ' '.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, ' '.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"> @@ -64,21 +65,21 @@ </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 %> |