diff options
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 |
