diff --git a/app/helpers/plans_helper.rb b/app/helpers/plans_helper.rb index f7e2725..2061c66 100644 --- a/app/helpers/plans_helper.rb +++ b/app/helpers/plans_helper.rb @@ -35,6 +35,16 @@ return access end + # display the name of the owner of a plan + def display_owner(user) + if user == current_user + name = d_('dmpopidor', 'You') + else + name = user.name(false) + end + return name + end + # display the visibility of the plan def display_visibility(val) case val diff --git a/app/views/paginable/plans/_privately_visible.html.erb b/app/views/paginable/plans/_privately_visible.html.erb index 547e0f2..945e21f 100644 --- a/app/views/paginable/plans/_privately_visible.html.erb +++ b/app/views/paginable/plans/_privately_visible.html.erb @@ -6,6 +6,7 @@ <%= _('Template') %> <%= paginable_sort_link('templates.title') %> <%= _('Edited') %> <%= paginable_sort_link('plans.updated_at') %> <%= _('Role') %> + <%= _('Owner') %> <%= _('Test') %> <%= _('Visibility') %> <%= _('Shared') %> @@ -24,6 +25,7 @@ <%= plan.template.title %> <%= l(plan.updated_at.to_date, formats: :short) %> <%= display_role(plan.roles.find_by(user: current_user)) %> + <%= display_owner(plan.owner) %> <% if plan.administerable_by?(current_user.id) then %> <%= form_for plan, url: set_test_plan_path(plan), html: { method: :post, class: 'set_test_plan', remote: true } do |f| %> diff --git a/config/locale/dmpopidor.pot b/config/locale/dmpopidor.pot index 280ffba..b763241 100644 --- a/config/locale/dmpopidor.pot +++ b/config/locale/dmpopidor.pot @@ -162,3 +162,5 @@ msgid "Learn more" msgstr "" +msgid "You" +msgstr "" \ No newline at end of file diff --git a/config/locale/en_GB/dmpopidor.po b/config/locale/en_GB/dmpopidor.po index 1a507fc..84c155d 100644 --- a/config/locale/en_GB/dmpopidor.po +++ b/config/locale/en_GB/dmpopidor.po @@ -158,4 +158,7 @@ msgstr "By continuing to browse, you accept the use of cookies to measure the traffic of the website with the software Matomo. Those data are not personal, as they are anonymized. We followed directions from the CNIL and configured this tool so that its use does not require your consent." msgid "Learn more" -msgstr "Learn more" \ No newline at end of file +msgstr "Learn more" + +msgid "You" +msgstr "You" \ No newline at end of file diff --git a/config/locale/fr_FR/dmpopidor.po b/config/locale/fr_FR/dmpopidor.po index 3ef828d..bd112ba 100644 --- a/config/locale/fr_FR/dmpopidor.po +++ b/config/locale/fr_FR/dmpopidor.po @@ -159,4 +159,5 @@ msgid "Learn more" msgstr "En savoir plus" - +msgid "You" +msgstr "Vous"