Project

General

Profile

Patch #30262 » show_add_filter_dropdown_as_button.diff

Bernhard Rohloff, 2018-12-21 16:16

View differences:

public/stylesheets/application.css (Arbeitskopie)
496 496
fieldset#filters td.values select {min-width:130px;}
497 497
fieldset#filters td.values input {height:1em;}
498 498

  
499
#filters-table {width:60%; float:left;}
500
.add-filter {width:35%; float:right; text-align: right; vertical-align: top;}
499
#filters-table {display: block;}
500
.add-filter { margin: 5px 0;}
501
.add-filter label { display: none }
502
.add-filter select {
503
  appearance: none;
504
  -moz-appearance: none;
505
  -webkit-appearance: none;
506
  border: 1px solid #ccc;
507
  border-radius: 3px;
508
  background: #fff;
509
  padding: 3px 2px;
510
  margin-bottom: 10px;
511
  color: #555555;
512
  text-align: center;
513
  font-size: 1rem;
514
  width: 150px;
515
}
501 516

  
502 517
#issue_is_private_wrap {float:right; margin-right:1em;}
503 518
.toggle-multiselect {background: url(../images/bullet_toggle_plus.png) no-repeat 0% 40%; padding-left:16px; margin-left:0; margin-right:5px; cursor:pointer;}
app/helpers/queries_helper.rb (Arbeitskopie)
50 50
    if grouped[:label_date].try(:size) == 1
51 51
      ungrouped << grouped.delete(:label_date).first
52 52
    end
53
    s = options_for_select([[]] + ungrouped)
53
    s = options_for_select(ungrouped)
54 54
    if grouped.present?
55 55
      localized_grouped = grouped.map {|k,v| [k.is_a?(Symbol) ? l(k) : k.to_s, v]}
56 56
      s << grouped_options_for_select(localized_grouped)
app/views/queries/_filters.html.erb (Arbeitskopie)
18 18
</table>
19 19

  
20 20
<div class="add-filter">
21
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
22
<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
21
  <%= select_tag 'add_filter_select', filters_options_for_select(query), { prompt: l(:label_filter_add) } %>
23 22
</div>
24 23

  
25 24
<%= hidden_field_tag 'f[]', '' %>
(2-2/5)