diff options
| author | Luc Donnet | 2012-10-09 14:09:58 +0200 |
|---|---|---|
| committer | Luc Donnet | 2012-10-09 14:09:58 +0200 |
| commit | e8c97dbaa2589291018fc5d2ec8326b2be40e9f9 (patch) | |
| tree | 44a2dc68f7ac3e49b8fc78ccd2fad6963f185041 | |
| parent | f269ec857e4aa35e2e64e3121a23f349a34e261e (diff) | |
| download | chouette-core-e8c97dbaa2589291018fc5d2ec8326b2be40e9f9.tar.bz2 | |
Add creation helper for view
| -rw-r--r-- | app/helpers/creation_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/creation_helper.rb b/app/helpers/creation_helper.rb new file mode 100644 index 000000000..167f2f01b --- /dev/null +++ b/app/helpers/creation_helper.rb @@ -0,0 +1,15 @@ +module CreationHelper + + def creation_tag(object) + field_set_tag t("layouts.creation_tag.title") do + content_tag :ul do + [(content_tag :li do + object.human_attribute_name('creation_time') + ' : ' + l(object.creation_time, :format => :short) + end), + (content_tag :li do + object.human_attribute_name('creator_id') + ' : ' + object.creator_id if object.creator_id + end)].join.html_safe + end + end + end +end |
