- diff --git a/app/views/layouts/_signin_signout.html.erb b/app/views/layouts/_signin_signout.html.erb index 66a6515..79cae62 100644 --- a/app/views/layouts/_signin_signout.html.erb +++ b/app/views/layouts/_signin_signout.html.erb @@ -11,13 +11,13 @@ <% end %> <% if current_user.can_org_admin? && !current_user.org_id.nil? %> <% if current_user.can_modify_org_details? && current_user.org.abbreviation.blank? %> -
- <%= link_to _("Admin area"), admin_show_org_path(current_user.org_id), class: "signIn_dropdown_link" %> +
- <%= link_to _("Admin area"), admin_edit_org_path(current_user.org_id), class: "signIn_dropdown_link" %> <% elsif current_user.can_modify_templates?%>
- <%= link_to _("Admin area"), admin_index_template_path(current_user.org_id), class: "signIn_dropdown_link" %> <% elsif current_user.can_modify_guidance? %>
- <%= link_to _("Admin area"), admin_index_guidance_path(current_user.org_id), class: "signIn_dropdown_link" %> <% elsif current_user.can_modify_org_details? %> -
- <%= link_to _("Admin area"), admin_show_org_path(current_user.org_id), class: "signIn_dropdown_link" %> +
- <%= link_to _("Admin area"), admin_edit_org_path(current_user.org_id), class: "signIn_dropdown_link" %> <% elsif current_user.can_grant_permissions? %>
- <%= link_to _("Admin area"), admin_index_users_path, class: "signIn_dropdown_link" %> <% end %> diff --git a/app/views/phases/_answer_form.html.erb b/app/views/phases/_answer_form.html.erb index c95732b..8c151f3 100644 --- a/app/views/phases/_answer_form.html.erb +++ b/app/views/phases/_answer_form.html.erb @@ -5,7 +5,7 @@ **Copyright: Digital Curation Centre and California Digital Library --> -
- - <%= link_to _('Guidance'), "#", class: "right_column_tab_link" %> - - <% else %> - <% active_tab = 'note_tab' %> - <% end %> -
- ">
- <% if comments.count > 0 %>
- <%= link_to "#{_('Notes')} (#{comments.count})" , "#", id: "notes_number_#{question.id}", class: "right_column_tab_link" %>
- <% else %>
- <%= link_to _('Share note'), "#", id: "notes_number_#{question.id}", class: "right_column_tab_link" %>
- <% end %>
+ + <% comments = answer.notes.all %> + <%= hidden_field_tag :question_id, question.id, class: "question_id" %> + <% active_tab = nil %> + + ++ <% else %> + <% active_tab = 'note_tab' %> + <% end %> +
-
+ <% annotations = question.annotations.where(type: Annotation.types[:guidance]) %>
+ <% if annotations.present? || question_guidances.present? %>
+ <% active_tab = 'guidance_tab' %>
+
- + <%= _('Guidance') %> -
- " role="tab" aria-controls="comment-question-area-<%= question.id %>"> + <% if comments.count > 0 %> + <%= _('Notes') %> + <% else %> + <%= _(' Share note') %> + <% end %> + +
- + <%= _('Project Details') %> + + + <% @plan.template.phases.each do |phase| %> +
- > + <%= phase.title %> + + <% end %> + + +
- + <%= _('Download') %> + +
- - <%= _('Project Details') %> - - - <% @plan.template.phases.each do |phase| %> -
- - <%= phase.title %> - - <% end %> - - -
- - <%= _('Download') %> - -
- <%= link_to _('Edit'), - edit_plan_path(plan) %> + plan_path(plan) %> <% if plan.administerable_by?(current_user.id) then %>
- <%= link_to _('Share'), - share_plan_path(plan) %> + share_plan_path(plan) %> <% end %>
- <%= link_to _('Download'), show_export_plan_path(plan) %> -
- <%= link_to _('Duplicate'), - duplicate_plan_path(plan) %> +
- <%= link_to _('Make a copy'), + duplicate_plan_path(plan), method: :post, remote: true %> <% if plan.owned_by?(current_user.id) then %>
- <%= link_to _('Delete'), @@ -95,11 +95,11 @@ <% end %> - - <% end %> + + diff --git a/app/views/plans/new.html.erb b/app/views/plans/new.html.erb index ffdf8f0..d10fff2 100644 --- a/app/views/plans/new.html.erb +++ b/app/views/plans/new.html.erb @@ -14,15 +14,14 @@
- - <%= _('Project Details') %> +
- + <%= _('Project Details') %> <% @plan.template.phases.each do |phase| %>
- - <%= phase.title %> + " aria-selected="false"><%= phase.title %> <% end %> -
- - <%= _('Download') %> + <%= _('Download') %>
- Users with "read only" access can only read the plan.
- Editors can contribute to the plan.
- Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.
- <%= _('Users with "read only" access can only read the plan.') %> +
- <%= _('Editors can contribute to the plan.') %> +
- <%= _('Co-owners can also contribute to the plan, but additionally can edit the plan details and control access to the plan.') %> +
- - <%= phase.title %> + <%= phase.title %> <% end %>
- - <%= _('Download') %> + <%= _('Download') %>
- - <%= _('Project Details') %> +
- + <%= _('Project Details') %> <% @plan.template.phases.each do |phase| %>
- - <%= phase.title %> + <%= phase.title %> <% end %> -
- - <%= _('Download') %> +
- + <%= _('Download') %>
-
- <% annotations = question.annotations.where(type: Annotation.types[:guidance]) %>
- <% if annotations.present? || question_guidances.present? %>
- <% active_tab = 'guidance_tab' %>
-
<% end %> diff --git a/app/views/phases/edit.html.erb b/app/views/phases/edit.html.erb index 5e33227..ed69430 100644 --- a/app/views/phases/edit.html.erb +++ b/app/views/phases/edit.html.erb @@ -11,52 +11,60 @@ <%= render :partial => "/plans/plan_title", locals: {plan: @plan} %> -
-
+
+ <%= render :partial => "/sections/progress", locals: { section: section, plan: @plan } %> + +
<%= raw section.description %>
-<%= _('Project Details') %>
- -<%= form_for resource, as: 'user', url: user_session_path, - html: {class: "login-form roadmap-form content-two-column"} do |f| %> - -<%= _('To help you write your plan, %{application_name} can show you guidance from a variety of organisations.') % {application_name: Rails.configuration.branding[:application][:name]} %>
++
<% _('Select up to 3 organisations to see their guidance.') %>
+ +<%= @important_ggs.inspect %> +<%= t ('helpers.loading')%>
-<%= _('To help you write your plan, %{application_name} can show you guidance from a variety of organisations.') % {application_name: Rails.configuration.branding[:application][:name]} %>
--
<% _('Select up to 3 organisations to see their guidance.') %>
- -<%= @important_ggs.inspect %> -<%= @plan.title %>
- -<% if @plan.visibility == 'is_test' %> --
-
-
+
-
<% if plan.editable_by?(current_user.id) then %>
-
-
<%= _('Collaborators')%>
- <%= raw _('You can give other people access to your plan here. There are three permission levels.
Add each collaborator in turn by entering their email address below, choosing a permission level and clicking "Add collaborator".
Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don\'t already have an account. A notification is also issued when a user\'s permission level is changed.
') % { application_name: Rails.configuration.branding[:application][:name] } %> +<%= _('You can give other people access to your plan here. There are three permission levels.') %> +
-
+
<%= _('Add each collaborator in turn by entering their email address below, choosing a permission level and clicking "Add collaborator".') %>
+<%= _('Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don\'t already have an account. A notification is also issued when a user\'s permission level is changed.') % { application_name: Rails.configuration.branding[:application][:name] } %>
-<%= _('Collaborators')%>
-| <%= _('Email address')%> | -<%= _('Permissions')%> | -- |
|---|---|---|
| <%= role.user.name %> | -
- <% if role.creator? %>
- <%= 'Owner' %>
- <% elsif !role.creator? && role.user == current_user %>
- <%= display_role(role) %>
- <% elsif !role.creator? && role.user != current_user %>
- <%= form_for role, url: {controller: :roles, action: :update, id: role.id }, html: {method: :put} do |f| %>
- |
- - <% unless role.creator? || role.user == current_user then %> - <%= link_to _('Remove user access'), role, method: :delete, data: { confirm: _('Are you sure?') }, :class => "a-orange" %> - <% end %> - | -
| <%= _('Email address')%> | +<%= _('Permissions')%> | ++ |
|---|---|---|
| <%= role.user.name %> | +
+ <% if role.creator? %>
+ <%= 'Owner' %>
+ <% elsif !role.creator? && role.user == current_user %>
+ <%= display_role(role) %>
+ <% elsif !role.creator? && role.user != current_user %>
+ <%= form_for role, url: {controller: :roles, action: :update, id: role.id }, html: {method: :put} do |f| %>
+ |
+ + <% unless role.creator? || role.user == current_user then %> + <%= link_to _('Remove user access'), role, method: :delete, data: { confirm: _('Are you sure?') }, :class => "a-orange" %> + <% end %> + | +
<%= _('Add collaborator') %>
+ <% new_role = Role.new %> + <% new_role.plan = @plan %> + <%= form_for new_role, url: {controller: :roles, action: :create }, + html: {method: :post, class: 'roadmap-form'} do |f| %>+
- -
-
-
From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Select what format you wish to use and click to 'Export'.
")%> +<%= _("From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application.") %>
+<%= _(" Select what format you wish to use and click to 'Export'.") %>
<% if @plan.template.phases.count == 1 %> <%= render :partial => "/shared/export_links", locals: {plan: @plan, phase: @plan.template.phases.first} %> <%else%> - <% @plan.template.phases.each do |phase| %> -<%= phase.title %>
+- <%= link_to 'Select all', '#', id: 'select_all' %> | - <%= link_to 'Deselect all', '#', id: 'deselect_all' %> + <%= link_to 'Select all', '#', id: 'select_all' %> | + <%= link_to 'Deselect all', '#', id: 'deselect_all' %>
All Users
-All Users
+-
DMP owners and co-owners
-+
DMP owners and co-owners
+-
DMP administrators
-+
DMP administrators
+-
+