- Current collaborators:
- <%= info_button('What are collaborators?', class: 'pull-right btn-xs') do %>
- Collaborators are other <%= TeSS::Config.site['title_short'] %> users who can edit this <%= resource.model_name.human %>. Only
- the <%= resource.model_name.human %> owner can add and remove collaborators.
+ <%= t('collaborators.current', attribute: association_name) %>
+ <%= info_button(t('info.collaborators.title', attribute: association_name), class: 'pull-right btn-xs') do %>
+ <%= t('info.collaborators.description', attribute: association_name, resource_type: resource.model_name.human) %>
<% end %>
<% @learning_path.collaborators.each do |collaborator| %>
<%= link_to collaborator.name, collaborator %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 04944a6bc..3694ed9ec 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -111,8 +111,10 @@ en:
difficulty_level: Competency level
learning_path:
difficulty_level: Competency level
+ collaborators: Maintainers
learning_path_topic:
difficulty_level: Competency level
+ collaborators: Maintainers
workflow:
difficulty_level: Competency level
about:
@@ -1192,11 +1194,16 @@ en:
Spaces are customizable, community-managed sub-portals within %{site_name}, each with its own catalogue of training content.
Some spaces are private. That means you can see and have access to them only if you are in at least one of the required groups for each of them.
groups:
- title: What are Groups?
- description: |
- Groups is a feature which for now is used only to manage access of private spaces.
- A user being part of a group has access to every private space which requires the group.
- Each group has multiple owners. A owner can add and remove people to the group.
+ title: What are Groups?
+ description: |
+ Groups is a feature which for now is used only to manage access of private spaces.
+ A user being part of a group has access to every private space which requires the group.
+ Each group has multiple owners. A owner can add and remove people to the group.
+ collaborators:
+ title: What are %{attribute}?
+ description: |
+ %{attribute} are other %{site_name} users who can edit this %{resource_type}. Only
+ the %{resource_type}owner can add and remove %{attribute}.
orcid:
error: 'An error occurred whilst trying to authenticate your ORCID.'
link: 'Link your ORCID'
@@ -1242,4 +1249,7 @@ en:
link: View in space
search:
errors:
- filter_limit_reached: Filter limit reached, please log in to apply additional filters.
\ No newline at end of file
+ filter_limit_reached: Filter limit reached, please log in to apply additional filters.
+ collaborators:
+ current: "Current %{attribute}:"
+ add: Add a new %{attribute}
diff --git a/test/controllers/learning_path_topics_controller_test.rb b/test/controllers/learning_path_topics_controller_test.rb
index 0063099aa..531b20390 100644
--- a/test/controllers/learning_path_topics_controller_test.rb
+++ b/test/controllers/learning_path_topics_controller_test.rb
@@ -602,4 +602,13 @@ class LearningPathTopicsControllerTest < ActionController::TestCase
assert_redirected_to learning_path_topic_path(assigns(:learning_path_topic))
assert_equal 'Some comment', topic_item.reload.comment
end
+
+ test 'should call collaborators maintainers' do
+ sign_in @learning_path_topic.user
+ get :show, params: { id: @learning_path_topic }
+ assert_response :success
+
+ assert_select '.btn[data-target="#collaborators-modal"]', text: 'Maintainers'
+ assert_select '#collaborators-modal .modal-header h4', text: 'Maintainers'
+ end
end
diff --git a/test/controllers/learning_paths_controller_test.rb b/test/controllers/learning_paths_controller_test.rb
index ed99fcaad..1fc9f9f22 100644
--- a/test/controllers/learning_paths_controller_test.rb
+++ b/test/controllers/learning_paths_controller_test.rb
@@ -584,4 +584,13 @@ class LearningPathsControllerTest < ActionController::TestCase
assert assigns(:learning_path).unordered?
assert_select '.learning-path-topic.unordered', minimum: 1
end
+
+ test 'should call collaborators maintainers' do
+ sign_in @learning_path.user
+ get :show, params: { id: @learning_path }
+ assert_response :success
+
+ assert_select '.btn[data-target="#collaborators-modal"]', text: 'Maintainers'
+ assert_select '#collaborators-modal .modal-header h4', text: 'Maintainers'
+ end
end