diff options
| author | Michel Etienne | 2014-07-10 11:01:26 +0200 |
|---|---|---|
| committer | Michel Etienne | 2014-07-10 11:01:26 +0200 |
| commit | e8a31cd30f9b35ef9d33ba114304b537ab7a638e (patch) | |
| tree | 1553e60ecc49576b3ae7dd676835dbfd8cf667e1 /app/helpers | |
| parent | 1de175421e2918837edb5b8717d72a88952e6cc9 (diff) | |
| download | chouette-core-e8a31cd30f9b35ef9d33ba114304b537ab7a638e.tar.bz2 | |
add union, intersection and disjunction operation on time tables, Mantis 26838
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/history_helper.rb | 12 | ||||
| -rw-r--r-- | app/helpers/time_tables_helper.rb | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/app/helpers/history_helper.rb b/app/helpers/history_helper.rb index 88c6b8da3..1b9d056ab 100644 --- a/app/helpers/history_helper.rb +++ b/app/helpers/history_helper.rb @@ -12,7 +12,17 @@ module HistoryHelper end), (content_tag :li do if object.has_attribute?(:creator_id) - object.human_attribute_name('creator_id') + ' : ' + object.creator_id if object.creator_id + object.human_attribute_name('creator_id') + ' : ' + object.creator_id if object.creator_id + end + end), + (content_tag :li do + if object.has_attribute?(:objectid) + object.human_attribute_name('objectid') + ' : ' + object.objectid if object.objectid + end + end), + (content_tag :li do + if object.has_attribute?(:object_version) + object.human_attribute_name('object_version') + ' : ' + object.object_version.to_s if object.object_version end end)].join.html_safe end 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 |
