diff options
| author | jpl | 2017-04-11 14:32:44 +0200 |
|---|---|---|
| committer | jpl | 2017-04-11 14:32:52 +0200 |
| commit | 3862831d652caa0d6085af5aa2dffded2b47bb1b (patch) | |
| tree | 6c546dc92bd0cbfded5ef96597d8decee7f7a795 /app/views | |
| parent | cacf29a1b4a679e70a017053ed25e0ed7d095d10 (diff) | |
| download | chouette-core-3862831d652caa0d6085af5aa2dffded2b47bb1b.tar.bz2 | |
Refs #2909: working on tt#index filters/search
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/time_tables/index.html.slim | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/app/views/time_tables/index.html.slim b/app/views/time_tables/index.html.slim index 6653d6015..ef835c956 100644 --- a/app/views/time_tables/index.html.slim +++ b/app/views/time_tables/index.html.slim @@ -9,31 +9,29 @@ .container-fluid .row .col-lg-12 - = search_form_for @q, :url => referential_time_tables_path(@referential), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| - .panel.panel-default - .panel-heading - .input-group.col-md-9 - = f.text_field :comment_cont, :placeholder => "#{t('.comment')}", class: 'form-control' - - .input-group-btn - button.btn.btn-default type="submit" - i.fa.fa-search - - a data-toggle="collapse" data-parent="#search" href="#advanced_search" - i.fa.fa-plus - = "#{t('.advanced_search')}" - - #advanced_search.panel-collapse.collapse - .panel-body - div - label = "#{t('.from')}" - = f.text_field :start_date_gteq, :placeholder => "#{t('.start_date')}", class: 'form-control date_picker', :type => "date" - - label = "#{t('.to')}" - = f.text_field :end_date_lteq, :placeholder => "#{t('.end_date')}", class: 'form-control date_picker', :type => "date" - - div - = f.text_field :tag_search, :placeholder => "#{t('.tag_search')}", class: 'form-control' + = search_form_for @q, url: referential_time_tables_path(@referential), html: { method: :get, class: 'form form-filter' } do |f| + .ffg-row + .input-group.search_bar + = f.text_field :comment_cont, :placeholder => "#{t('.comment')}", class: 'form-control' + span.input-group-btn + button.btn.btn-default type='submit' + span.fa.fa-search + + .ffg-row + .form-group + = f.label @time_tables.human_attribute_name(:tag_search), required: false, class: 'control-label' + = f.input :tag_search, as: :tags, collection: Chouette::TimeTable.tags_on(:tags).pluck(:name), label: false, input_html: { 'data-select2ed': 'true', 'data-select2ed-placeholder': 'Indiquez une étiquette...' }, wrapper_html: { class: 'select2ed'}, include_blank: false + + / .form-group.togglable + / = f.label @time_tables.human_attribute_name(:bounding_dates), required: false, class: 'control-label' + / .filter_menu + / = f.input :start_date_gteq, as: :date, label: t('simple_form.from'), wrapper_html: { class: 'date filter_menu-item' } + / = f.input :end_date_lteq, as: :date, label: t('simple_form.to'), wrapper_html: { class: 'date filter_menu-item' } + + + .actions + = link_to 'Effacer', @workbench, class: 'btn btn-link' + = f.submit 'Filtrer', class: 'btn btn-default' - if @time_tables.any? .row @@ -48,6 +46,6 @@ = new_pagination @time_tables, 'pull-right' - unless @time_tables.any? - .row + .row.mt-xs .col-lg-12 = replacement_msg t('time_tables.search_no_results') |
