diff --git a/app/helpers/plans_helper.rb b/app/helpers/plans_helper.rb index 8ac7e69..03c55c0 100644 --- a/app/helpers/plans_helper.rb +++ b/app/helpers/plans_helper.rb @@ -13,16 +13,6 @@ end 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 @@ -31,8 +21,6 @@ when 'publicly_visible' return "#{_('Public')}" when 'privately_visible' - return "#{d_('dmpopidor', 'Administrator')}" - when 'privately_private_visible' return "#{_('Private')}" else return "#{_('Private')}" # Test Plans diff --git a/app/models/plan.rb b/app/models/plan.rb index 6f0d20f..6a19210 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -42,6 +42,7 @@ include ExportablePlan include ValidationMessages include ValidationValues + include Dmpopidor::Model::Plan # ============= # = Constants = diff --git a/app/views/plans/_share_form.html.erb b/app/views/plans/_share_form.html.erb index fed67a8..93edf04 100644 --- a/app/views/plans/_share_form.html.erb +++ b/app/views/plans/_share_form.html.erb @@ -3,15 +3,11 @@ <% commenter = Role.new(commenter: true) %>
<%= d_('dmpopidor', 'Public, Administrator or organisational visibility is intended for finished plans. You must answer at least %{percentage}%% of the questions to enable these options. Note: test plans are set to private visibility by default.') % { :percentage => Rails.application.config.default_plan_percentage_answered } %>
+<%= _('Public or organisational visibility is intended for finished plans. You must answer at least %{percentage}%% of the questions to enable these options. Note: test plans are set to private visibility by default.') % { :percentage => Rails.application.config.default_plan_percentage_answered } %>
<% allow_visibility = @plan.visibility_allowed? %> <%= form_for(@plan, url: visibility_plan_path, method: :post, html: { id: 'set_visibility', remote: true }) do |f| %> -