diff options
| author | jpl | 2017-04-10 12:05:55 +0200 |
|---|---|---|
| committer | jpl | 2017-04-10 12:05:55 +0200 |
| commit | bc975ead66dc1e1fea95f30d88b0e3289d71b5e0 (patch) | |
| tree | c8b268907664f1c1db800a33f826bea649ccc299 | |
| parent | 144faa3e5030d13e1aca30ca32854e001b7c5021 (diff) | |
| download | chouette-core-bc975ead66dc1e1fea95f30d88b0e3289d71b5e0.tar.bz2 | |
Refs #2888: updating tt#inde
| -rw-r--r-- | app/views/time_tables/index.html.slim | 89 | ||||
| -rw-r--r-- | config/locales/time_tables.en.yml | 2 | ||||
| -rw-r--r-- | config/locales/time_tables.fr.yml | 2 |
3 files changed, 56 insertions, 37 deletions
diff --git a/app/views/time_tables/index.html.slim b/app/views/time_tables/index.html.slim index 64d2372a5..6c5a3502c 100644 --- a/app/views/time_tables/index.html.slim +++ b/app/views/time_tables/index.html.slim @@ -1,37 +1,52 @@ -= title_tag t('time_tables.index.title') - -= 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' - -#time_tables - == render 'time_tables' - -- content_for :sidebar do - ul.actions - li - - if policy(Chouette::TimeTable).create? && @referential.organisation == current_organisation - = link_to t('time_tables.actions.new'), new_referential_time_table_path(@referential), class: "add" - br +/ PageHeader += pageheader 'map-marker', + t('time_tables.index.title'), + '', + ((policy(Chouette::TimeTable).create? && @referential.organisation == current_organisation) ? link_to(t('actions.add'), new_referential_time_table_path(@referential), class: 'btn btn-default') : '') + +/ PageContent +.page_content + .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' + - if @time_tables.any? + .row + .col-lg-12 + = table_builder @time_tables, + { :comment => 'comment', :color => '', :bounding_dates => Proc.new { |tt| tt.bounding_dates.empty? ? '-' : t('bounding_dates', debut: l(tt.bounding_dates.min), end: l(tt.bounding_dates.max)) }, + :calendar => Proc.new {|tt| tt.calendar ? tt.calendar.try(:name) : '-' }, :updated_at => Proc.new {|tt| l(tt.updated_at, format: :short)} }, + [:show, :edit, :delete], + [], + 'table has-search' + + = new_pagination @time_tables, 'pull-right' + + - unless @time_tables.any? + .row + .col-lg-12 + = replacement_msg t('time_tables.search_no_results') diff --git a/config/locales/time_tables.en.yml b/config/locales/time_tables.en.yml index e783f5b18..5127675e8 100644 --- a/config/locales/time_tables.en.yml +++ b/config/locales/time_tables.en.yml @@ -64,6 +64,8 @@ en: attributes: time_table: comment: "Name" + color: "Associated color" + bounding_dates: 'Global validity period' version: "Short name" day_types: "Period day types" none: "none" diff --git a/config/locales/time_tables.fr.yml b/config/locales/time_tables.fr.yml index d67227c26..dc4d4572f 100644 --- a/config/locales/time_tables.fr.yml +++ b/config/locales/time_tables.fr.yml @@ -64,6 +64,8 @@ fr: attributes: time_table: comment: "Nom" + color: "Couleur associée" + bounding_dates: 'Période de validité englobante' version: "Abréviation" day_types: "Jours d'application des périodes" none: "aucun" |
