aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXinhui2017-11-23 16:53:39 +0100
committerXinhui2017-11-28 12:21:33 +0100
commit6b596dbbcb2d1ff02b3e6579585729ee7f54cfdf (patch)
tree26408872aa67442498d0e062d48e9ee85172830e
parent6820faf7849ff704c55cde29c8b2efc320ff63d7 (diff)
downloadchouette-core-6b596dbbcb2d1ff02b3e6579585729ee7f54cfdf.tar.bz2
Display last_editor
-rw-r--r--app/views/layouts/navigation/_page_header.html.slim4
-rw-r--r--config/locales/en.yml1
-rw-r--r--config/locales/fr.yml1
3 files changed, 5 insertions, 1 deletions
diff --git a/app/views/layouts/navigation/_page_header.html.slim b/app/views/layouts/navigation/_page_header.html.slim
index 7e5bd2125..6d22dcf26 100644
--- a/app/views/layouts/navigation/_page_header.html.slim
+++ b/app/views/layouts/navigation/_page_header.html.slim
@@ -16,9 +16,11 @@ div.page_header
div.page-action
- if defined?(object)
div.small = t('last_update', time: l(object.updated_at, format: :short)).html_safe
+ - if object.try(:versions)
+ div.small = t('whodunnit', author: object.versions.last.whodunnit)
- if content_for? :page_header_actions
- = yield :page_header_actions
+ div.small = yield :page_header_actions
- if content_for? :page_header_content
= yield :page_header_content
diff --git a/config/locales/en.yml b/config/locales/en.yml
index b65484bc2..58259a1d4 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -48,6 +48,7 @@ en:
format: "%{message}"
last_update: 'Last update on<br>%{time}'
+ whodunnit: 'By %{author}'
last_sync: 'Last sync on %{time}'
validity_range: '%{debut} > %{end}'
bounding_dates: '%{debut} > %{end}'
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 49e41a570..98231787f 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -48,6 +48,7 @@ fr:
format: "%{message}"
last_update: 'Dernière mise à jour<br>le %{time}'
+ whodunnit: 'Par %{author}'
last_sync: 'Dernière mise à jour le %{time}'
validity_range: '%{debut} > %{end}'
bounding_dates: '%{debut} > %{end}'