From 6b596dbbcb2d1ff02b3e6579585729ee7f54cfdf Mon Sep 17 00:00:00 2001
From: Xinhui
Date: Thu, 23 Nov 2017 16:53:39 +0100
Subject: Display last_editor
---
app/views/layouts/navigation/_page_header.html.slim | 4 +++-
config/locales/en.yml | 1 +
config/locales/fr.yml | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
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
%{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
le %{time}'
+ whodunnit: 'Par %{author}'
last_sync: 'Dernière mise à jour le %{time}'
validity_range: '%{debut} > %{end}'
bounding_dates: '%{debut} > %{end}'
--
cgit v1.2.3