Update wording for sharing activities, rename button, add view-only paragraph

This commit is contained in:
Urban Rotnik 2019-08-09 12:44:41 +02:00
parent 786716974b
commit 7719b825e3
7 changed files with 21 additions and 9 deletions

View file

@ -89,6 +89,12 @@
}
}
.toolbarButtonsDatatable {
.view-only-label {
opacity: .6;
}
}
.sidebar-button {
span {
display: inline-block !important;

View file

@ -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

View file

@ -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

View file

@ -53,9 +53,6 @@
<% if can_perform_repository_actions(@repository) %>
<ul class="dropdown-menu pull-right">
<li class="dropdown-header">
<%= t("repositories.index.options_dropdown.header") %>
</li>
<% if can_create_repository_columns?(@repository) %>
<li>
<%= link_to t('repositories.index.options_dropdown.manage_columns'),
@ -148,6 +145,8 @@
<span class="fas fa-copy"></span>
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
</button>
<% elsif @repository.team_repositories.where(team: current_team).first.read? %>
<p class="view-only-label"><%= t('repositories.index.view_only_permission_label') %></p>
<% end %>
</div>

View file

@ -244,4 +244,9 @@ class Extends
read: 0,
write: 1
}.freeze
SHARED_INVENTORIES_PL_MAPPINGS = {
read: 'view-only',
write: 'edit'
}.freeze
end

View file

@ -987,8 +987,8 @@ en:
edit_inventory: "Edit Inventory"
share_inventory: "Share"
title_label: "Inventory:"
view_only_permission_label: "This team has a view-only permission"
options_dropdown:
header: "Edit inventory"
manage_columns: 'Manage columns'
import_items: 'Import items'
export_items: 'Export items'
@ -1044,7 +1044,7 @@ en:
errors_list_title: "Items were not imported because one or more errors were found:"
no_repository_name: "Item name is required!"
edit_record: "Edit"
copy_record: "Copy"
copy_record: "Duplicate"
delete_record: "Delete"
save_record: "Save"
cancel_save: "Cancel"

View file

@ -102,9 +102,9 @@ en:
create_inventory_html: "%{user} created inventory %{repository}."
rename_inventory_html: "%{user} renamed inventory %{repository}."
delete_inventory_html: "%{user} deleted inventory %{repository}."
share_inventory_html: "%{user} shared inventory %{repository} with team %{team} with %{permission_level} permission."
share_inventory_html: "%{user} shared inventory %{repository} with team %{team} with %{permission_level} permissions."
unshare_inventory_html: "%{user} stopped sharing inventory %{repository} with team %{team}."
update_share_inventory_html: "%{user} set permission to %{permission_level} for sharing inventory %{repository} with team %{team}."
update_share_inventory_html: "%{user} changed permission of the shared inventory %{repository} to %{permission_level} with team %{team}."
create_item_inventory_html: "%{user} created inventory item %{repository_row}."
edit_item_inventory_html: "%{user} edited inventory item %{repository_row}."
delete_item_inventory_html: "%{user} deleted inventory item %{repository_row}."