aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/time_tables_helper.rb
diff options
context:
space:
mode:
authorMarc Florisson2014-09-20 00:00:52 +0200
committerMarc Florisson2014-09-20 00:00:52 +0200
commit6e9b078adb6bc17633967eb75500b0a8dce65215 (patch)
treebf648693bb672f53186b580296afc5e86b34fcfe /app/helpers/time_tables_helper.rb
parentd86f7fe8cad332890f0be146f229cde72dc52eec (diff)
downloadchouette-core-6e9b078adb6bc17633967eb75500b0a8dce65215.tar.bz2
change time table lists look
Diffstat (limited to 'app/helpers/time_tables_helper.rb')
-rw-r--r--app/helpers/time_tables_helper.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/helpers/time_tables_helper.rb b/app/helpers/time_tables_helper.rb
index 100dfc656..e0c1fc2db 100644
--- a/app/helpers/time_tables_helper.rb
+++ b/app/helpers/time_tables_helper.rb
@@ -8,9 +8,12 @@ module TimeTablesHelper
"validity_regular"
end
end
+ def tag_list_shortened(time_table)
+ time_table.tags.join(', ').truncate(30, separator: ',')
+ end
def bounding_info(time_table)
return t('time_tables.time_table.empty') if time_table.bounding_dates.empty?
- t('time_tables.time_table.bounding',
+ t('time_tables.time_table.bounding',
:start => l(time_table.bounding_dates.min),
:end => l(time_table.bounding_dates.max))
end
@@ -37,17 +40,17 @@ module TimeTablesHelper
elsif time_table.periods.empty?
t('time_tables.time_table.dates_count', :count => time_table.dates.count)
else
- t('time_tables.time_table.periods_dates_count',
+ t('time_tables.time_table.periods_dates_count',
:dates_count => time_table.dates.count,
:periods_count => time_table.periods.count)
end
end
-
+
def time_table_description(time_table)
if time_table.bounding_dates.empty?
"#{time_table.comment} (vide)"
else
- "#{time_table.comment} : #{time_table_bounding( time_table)} - #{composition_info(time_table)}"
+ "#{time_table.comment} : #{time_table_bounding( time_table)} - #{composition_info(time_table)}"
end
end
end