Project

General

Profile

Defect #32194 » 0002-Fix-indentation-in-queries-_form.patch

Mizuki ISHIKAWA, 2019-11-29 03:09

View differences:

app/views/queries/_form.html.erb
29 29
<% end %>
30 30

  
31 31
<% unless params[:calendar] %>
32
<fieldset id="options"><legend><%= l(:label_options) %></legend>
33
  <% if @query.available_display_types.size > 1 %>
34
  <p><label for='display_type'><%= l(:label_display_type) %></label>
35
    <%= available_display_types_tags(@query) %>
36
  </p>
37
<% end %>
32
  <fieldset id="options"><legend><%= l(:label_options) %></legend>
33
    <% if @query.available_display_types.size > 1 %>
34
      <p><label for='display_type'><%= l(:label_display_type) %></label>
35
        <%= available_display_types_tags(@query) %>
36
      </p>
37
    <% end %>
38 38

  
39
<p id ="default_columns"><label for="query_default_columns"><%=l(:label_default_columns)%></label>
40
<%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns',
41
      :data => {:disables => "#columns, .block_columns input"} %></p>
39
    <p id ="default_columns"><label for="query_default_columns"><%=l(:label_default_columns)%></label>
40
    <%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns',
41
          :data => {:disables => "#columns, .block_columns input"} %></p>
42 42

  
43
<% unless params[:gantt] %>
44
  <p id="group_by"><label for="query_group_by"><%= l(:field_group_by) %></label>
45
  <%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
43
    <% unless params[:gantt] %>
44
      <p id="group_by"><label for="query_group_by"><%= l(:field_group_by) %></label>
45
      <%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
46 46

  
47
  <% unless @query.available_block_columns.empty? %>
48
    <p class="block_columns"><label><%= l(:button_show) %></label>
49
    <%= available_block_columns_tags(@query) %></p>
50
  <% end %>
47
      <% unless @query.available_block_columns.empty? %>
48
        <p class="block_columns"><label><%= l(:button_show) %></label>
49
        <%= available_block_columns_tags(@query) %></p>
50
      <% end %>
51 51

  
52
  <% unless @query.available_totalable_columns.empty? %>
53
    <p class="totable_columns"><label><%= l(:label_total_plural) %></label>
54
    <%= available_totalable_columns_tags(@query) %></p>
55
  <% end %>
56
<% else %>
57
  <p><label><%= l(:button_show) %></label>
58
  <%= hidden_field_tag 'query[draw_relations]', '0' %>
59
  <%= hidden_field_tag 'query[draw_progress_line]', '0' %>
60
  <%= hidden_field_tag 'query[draw_selected_columns]', '0' %>
61
  <label class="inline"><%= check_box_tag "query[draw_relations]", "1", @query.draw_relations %> <%= l(:label_related_issues) %></label>
62
  <label class="inline"><%= check_box_tag "query[draw_progress_line]", "1", @query.draw_progress_line %> <%= l(:label_gantt_progress_line) %></label>
63
  <label class="inline"><%= check_box_tag "query[draw_selected_columns]", "1", @query.draw_selected_columns, :data => { :enables => 'span.query-columns select, span.query-columns input'} %> <%= l(:description_selected_columns) %></label>
64
  </p>
65
<% end # unless params[:gantt] %>
66
</fieldset>
67
<% end # unless params[:calendar] %>
52
      <% unless @query.available_totalable_columns.empty? %>
53
        <p class="totable_columns"><label><%= l(:label_total_plural) %></label>
54
        <%= available_totalable_columns_tags(@query) %></p>
55
      <% end %>
56
    <% else %>
57
      <p><label><%= l(:button_show) %></label>
58
      <%= hidden_field_tag 'query[draw_relations]', '0' %>
59
      <%= hidden_field_tag 'query[draw_progress_line]', '0' %>
60
      <%= hidden_field_tag 'query[draw_selected_columns]', '0' %>
61
      <label class="inline"><%= check_box_tag "query[draw_relations]", "1", @query.draw_relations %> <%= l(:label_related_issues) %></label>
62
      <label class="inline"><%= check_box_tag "query[draw_progress_line]", "1", @query.draw_progress_line %> <%= l(:label_gantt_progress_line) %></label>
63
      <label class="inline"><%= check_box_tag "query[draw_selected_columns]", "1", @query.draw_selected_columns, :data => { :enables => 'span.query-columns select, span.query-columns input'} %> <%= l(:description_selected_columns) %></label>
64
      </p>
65
    <% end %>
66
  </fieldset>
67
<% end %>
68 68
</div>
69 69

  
70 70
<fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
......
72 72
</fieldset>
73 73

  
74 74
<% if params[:calendar].nil? && params[:gantt].nil? %>
75
<fieldset id="sort"><legend><%= l(:label_sort) %></legend>
76
<% 3.times do |i| %>
77
<%= content_tag(:span, "#{i+1}:", :class => 'query_sort_criteria_count')%>
78
<%= label_tag "query_sort_criteria_attribute_" + i.to_s,
79
              l(:description_query_sort_criteria_attribute), :class => "hidden-for-sighted" %>
80
<%= select_tag("query[sort_criteria][#{i}][]",
81
               options_for_select([[]] + query.available_columns.select(&:sortable?).collect {|column| [column.caption, column.name.to_s]}, @query.sort_criteria_key(i)),
82
               :id => "query_sort_criteria_attribute_" + i.to_s)%>
83
<%= label_tag "query_sort_criteria_direction_" + i.to_s,
84
              l(:description_query_sort_criteria_direction), :class => "hidden-for-sighted" %>
85
<%= select_tag("query[sort_criteria][#{i}][]",
86
                options_for_select([[], [l(:label_ascending), 'asc'], [l(:label_descending), 'desc']], @query.sort_criteria_order(i)),
87
                :id => "query_sort_criteria_direction_" + i.to_s) %>
88
<br />
89
<% end %>
90
</fieldset>
75
  <fieldset id="sort"><legend><%= l(:label_sort) %></legend>
76
    <% 3.times do |i| %>
77
    <%= content_tag(:span, "#{i+1}:", :class => 'query_sort_criteria_count')%>
78
    <%= label_tag "query_sort_criteria_attribute_" + i.to_s,
79
                  l(:description_query_sort_criteria_attribute), :class => "hidden-for-sighted" %>
80
    <%= select_tag("query[sort_criteria][#{i}][]",
81
                  options_for_select([[]] + query.available_columns.select(&:sortable?).collect {|column| [column.caption, column.name.to_s]}, @query.sort_criteria_key(i)),
82
                  :id => "query_sort_criteria_attribute_" + i.to_s)%>
83
    <%= label_tag "query_sort_criteria_direction_" + i.to_s,
84
                  l(:description_query_sort_criteria_direction), :class => "hidden-for-sighted" %>
85
    <%= select_tag("query[sort_criteria][#{i}][]",
86
                    options_for_select([[], [l(:label_ascending), 'asc'], [l(:label_descending), 'desc']], @query.sort_criteria_order(i)),
87
                    :id => "query_sort_criteria_direction_" + i.to_s) %>
88
    <br />
89
    <% end %>
90
  </fieldset>
91 91
<% end %>
92 92

  
93 93
<% unless params[:calendar] %>
94
<%= content_tag 'fieldset', :id => 'columns' do %>
95
<legend><%= l(:field_column_names) %></legend>
96
<%= render_query_columns_selection(query) %>
97
<% end %>
94
  <%= content_tag 'fieldset', :id => 'columns' do %>
95
  <legend><%= l(:field_column_names) %></legend>
96
  <%= render_query_columns_selection(query) %>
97
  <% end %>
98 98
<% end %>
99 99

  
100 100
</div>
(6-6/6)