diff --git a/app/helpers/plans_helper.rb b/app/helpers/plans_helper.rb index d14421a..1575bce 100644 --- a/app/helpers/plans_helper.rb +++ b/app/helpers/plans_helper.rb @@ -39,12 +39,22 @@ def display_visibility(val) case val when 'organisationally_visible' - return _('My Inst.') + return "#{_('Institutional')}" when 'publicly_visible' - return _('Public') + return "#{_('Public')}" else - return _('Private') # Both Test and Private + return "#{_('Private')}" # Both Test and Private end end - + + def visibility_tooltip(val) + case val + when 'organisationally_visible' + return _('Institutional: anyone logged in from your institution can view, copy, or download the plan.') + when 'publicly_visible' + return _('Public: anyone can view, copy, or download the plan. It will appear on the Public DMPs page of this site.') + else + return _('Private: only owners, co-owners, and others with whom you shared your plan can directly view the plan. Administrators at your institution can view all plans for program development purposes. See the Terms of Use.') + end + end end diff --git a/app/views/plans/_plan_details.html.erb b/app/views/plans/_plan_details.html.erb index 64cd46f..32ae6dd 100644 --- a/app/views/plans/_plan_details.html.erb +++ b/app/views/plans/_plan_details.html.erb @@ -32,9 +32,14 @@
- /> <%= _('Public anyone can view') %>
- /> <%= _('Limited: anyone in my institution can view') %>
- /> <%= _('Private: restricted to me and people I invite') %>
+ <% ['publicly_visible', 'organisationally_visible', 'privately_visible'].each do |visibility| %> + + title="<%= visibility_tooltip(visibility) %>" /> + <%= raw display_visibility(visibility) %>
+ <% end %>
<%= f.hidden_field :visibility %> @@ -110,20 +115,7 @@ <%= _('Visibility') %> - - <%= - case @plan.visibility - when 'publicly_visible' - _('Public: anyone can view') - when 'organisationally_visible' - _('Limited: anyone in my institution can view') - when 'is_test' - _('Not applicable: this is a test plan') - else - _('Private: restricted to me and people I invite') - end - %> - + <%= raw display_visibility(@plan.visibility) %> diff --git a/app/views/plans/index.html.erb b/app/views/plans/index.html.erb index ddac606..355256f 100644 --- a/app/views/plans/index.html.erb +++ b/app/views/plans/index.html.erb @@ -33,7 +33,7 @@ <%= plan.template.title %> <%= l(plan.latest_update.to_date, formats: :short) %> <%= display_role(plan.roles.find_by(user: current_user)) %> - <%= display_visibility(plan.visibility) %> + <%= raw display_visibility(plan.visibility) %> <%= plan.administerable_by?(current_user.id) ? '' : 'disabled="true"' %> /> diff --git a/lib/assets/stylesheets/roadmap-form.scss b/lib/assets/stylesheets/roadmap-form.scss index e457bda..e84bd78 100644 --- a/lib/assets/stylesheets/roadmap-form.scss +++ b/lib/assets/stylesheets/roadmap-form.scss @@ -518,4 +518,8 @@ input[type='radio'] { margin: 0 10px 5px -5px; } + + button.form-cancel { + margin-top: 0; + } } \ No newline at end of file