From 7719b825e34c44f3d7d74f79d4b8c2ff9687c855 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Fri, 9 Aug 2019 12:44:41 +0200 Subject: [PATCH] Update wording for sharing activities, rename button, add view-only paragraph --- app/assets/stylesheets/repositories.scss | 6 ++++++ app/controllers/team_repositories_controller.rb | 3 ++- app/services/repositories/multiple_share_update_service.rb | 3 ++- app/views/repositories/show.html.erb | 5 ++--- config/initializers/extends.rb | 5 +++++ config/locales/en.yml | 4 ++-- config/locales/global_activities/en.yml | 4 ++-- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/repositories.scss b/app/assets/stylesheets/repositories.scss index ef9c8764c..c108127c3 100644 --- a/app/assets/stylesheets/repositories.scss +++ b/app/assets/stylesheets/repositories.scss @@ -89,6 +89,12 @@ } } +.toolbarButtonsDatatable { + .view-only-label { + opacity: .6; + } +} + .sidebar-button { span { display: inline-block !important; diff --git a/app/controllers/team_repositories_controller.rb b/app/controllers/team_repositories_controller.rb index 3f604f01b..39e79fadb 100644 --- a/app/controllers/team_repositories_controller.rb +++ b/app/controllers/team_repositories_controller.rb @@ -101,6 +101,7 @@ class TeamRepositoriesController < ApplicationController team: current_team, message_items: { repository: team_repository.repository.id, team: team_repository.team.id, - permission_level: team_repository.permission_level }) + permission_level: + Extends::SHARED_INVENTORIES_PL_MAPPINGS[team_repository.permission_level.to_sym] }) end end diff --git a/app/services/repositories/multiple_share_update_service.rb b/app/services/repositories/multiple_share_update_service.rb index a034e6ff2..7356b4d9f 100644 --- a/app/services/repositories/multiple_share_update_service.rb +++ b/app/services/repositories/multiple_share_update_service.rb @@ -101,7 +101,8 @@ module Repositories team: @team, message_items: { repository: team_repository.repository.id, team: team_repository.team.id, - permission_level: team_repository.permission_level }) + permission_level: + Extends::SHARED_INVENTORIES_PL_MAPPINGS[team_repository.permission_level.to_sym] }) end end end diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index f8901fcb1..26162e1f3 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -53,9 +53,6 @@ <% if can_perform_repository_actions(@repository) %>