diff options
| author | jpl | 2017-04-25 16:46:42 +0200 |
|---|---|---|
| committer | jpl | 2017-04-25 16:46:42 +0200 |
| commit | ecd3f5c644919e6f823747a608c8c2a4483bf1ea (patch) | |
| tree | b3a240401922327beeb9eebd1eb0b3d1d3d98380 /app | |
| parent | 4d88dfa88facab8ca4ac367288c4987cde131827 (diff) | |
| download | chouette-core-ecd3f5c644919e6f823747a608c8c2a4483bf1ea.tar.bz2 | |
Refs #3192: updating tt#index
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers/newapplication_helper.rb | 2 | ||||
| -rw-r--r-- | app/views/time_tables/index.html.slim | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb index 804f6dab4..f03228d73 100644 --- a/app/helpers/newapplication_helper.rb +++ b/app/helpers/newapplication_helper.rb @@ -16,7 +16,7 @@ module NewapplicationHelper end columns.map do |k, v| - if ["ID Codif", "Oid", "OiD", "ID Reflex", "Arrêt de départ", "Arrêt d'arrivée", "Période de validité englobante", "Période englobante"].include? k + if ["ID Codif", "Oid", "OiD", "ID Reflex", "Arrêt de départ", "Arrêt d'arrivée", "Période de validité englobante", "Période englobante", "Nombre de courses associées", "Journées d'application"].include? k hcont << content_tag(:th, k) else hcont << content_tag(:th, sortable_columns(collection, k)) diff --git a/app/views/time_tables/index.html.slim b/app/views/time_tables/index.html.slim index 5ca3c7569..01b65653c 100644 --- a/app/views/time_tables/index.html.slim +++ b/app/views/time_tables/index.html.slim @@ -15,8 +15,11 @@ .row .col-lg-12 = table_builder @time_tables, - { :comment => 'comment', :color => Proc.new{|tt| tt.color ? content_tag(:span, '', class: 'fa fa-circle', style: "color:#{tt.color}") : '-' }, - "Période englobante" => 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)} }, + { :color => Proc.new{|tt| tt.color ? content_tag(:span, '', class: 'fa fa-circle', style: "color:#{tt.color}") : '-' }, :comment => 'comment', + "Période englobante" => Proc.new{ |tt| tt.bounding_dates.empty? ? '-' : t('bounding_dates', debut: l(tt.bounding_dates.min), end: l(tt.bounding_dates.max)) }, + "Nombre de courses associées" => Proc.new{ |tt| tt.vehicle_journeys.count }, + "Journées d'application" => Proc.new{ |tt| (%w(monday tuesday wednesday thursday friday saturday sunday).collect{|d| tt.send(d) ? t("calendars.days.#{d}") : '' }).reject{|a| a.empty?}.join(', ').html_safe }, + :calendar => Proc.new{ |tt| tt.calendar ? tt.calendar.try(:name) : '-' }, :updated_at => Proc.new {|tt| l(tt.updated_at, format: :short)} }, [:show, :edit, :duplicate, :delete], [], 'table has-search' |
