aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/time_tables_helper.rb
diff options
context:
space:
mode:
authorMichel Etienne2014-07-10 11:01:26 +0200
committerMichel Etienne2014-07-10 11:01:26 +0200
commite8a31cd30f9b35ef9d33ba114304b537ab7a638e (patch)
tree1553e60ecc49576b3ae7dd676835dbfd8cf667e1 /app/helpers/time_tables_helper.rb
parent1de175421e2918837edb5b8717d72a88952e6cc9 (diff)
downloadchouette-core-e8a31cd30f9b35ef9d33ba114304b537ab7a638e.tar.bz2
add union, intersection and disjunction operation on time tables, Mantis 26838
Diffstat (limited to 'app/helpers/time_tables_helper.rb')
-rw-r--r--app/helpers/time_tables_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/time_tables_helper.rb b/app/helpers/time_tables_helper.rb
index b6dc3de48..100dfc656 100644
--- a/app/helpers/time_tables_helper.rb
+++ b/app/helpers/time_tables_helper.rb
@@ -42,5 +42,13 @@ module TimeTablesHelper
: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)}"
+ end
+ end
end