mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-29 03:01:58 +08:00
Update wording for sharing activities, rename button, add view-only paragraph
This commit is contained in:
parent
786716974b
commit
7719b825e3
7 changed files with 21 additions and 9 deletions
|
@ -89,6 +89,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toolbarButtonsDatatable {
|
||||||
|
.view-only-label {
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar-button {
|
.sidebar-button {
|
||||||
span {
|
span {
|
||||||
display: inline-block !important;
|
display: inline-block !important;
|
||||||
|
|
|
@ -101,6 +101,7 @@ class TeamRepositoriesController < ApplicationController
|
||||||
team: current_team,
|
team: current_team,
|
||||||
message_items: { repository: team_repository.repository.id,
|
message_items: { repository: team_repository.repository.id,
|
||||||
team: team_repository.team.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
|
end
|
||||||
|
|
|
@ -101,7 +101,8 @@ module Repositories
|
||||||
team: @team,
|
team: @team,
|
||||||
message_items: { repository: team_repository.repository.id,
|
message_items: { repository: team_repository.repository.id,
|
||||||
team: team_repository.team.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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -53,9 +53,6 @@
|
||||||
|
|
||||||
<% if can_perform_repository_actions(@repository) %>
|
<% if can_perform_repository_actions(@repository) %>
|
||||||
<ul class="dropdown-menu pull-right">
|
<ul class="dropdown-menu pull-right">
|
||||||
<li class="dropdown-header">
|
|
||||||
<%= t("repositories.index.options_dropdown.header") %>
|
|
||||||
</li>
|
|
||||||
<% if can_create_repository_columns?(@repository) %>
|
<% if can_create_repository_columns?(@repository) %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to t('repositories.index.options_dropdown.manage_columns'),
|
<%= link_to t('repositories.index.options_dropdown.manage_columns'),
|
||||||
|
@ -148,6 +145,8 @@
|
||||||
<span class="fas fa-copy"></span>
|
<span class="fas fa-copy"></span>
|
||||||
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
|
<span class="hidden-xs-custom"><%= t("repositories.copy_record") %></span>
|
||||||
</button>
|
</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 %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -244,4 +244,9 @@ class Extends
|
||||||
read: 0,
|
read: 0,
|
||||||
write: 1
|
write: 1
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
|
SHARED_INVENTORIES_PL_MAPPINGS = {
|
||||||
|
read: 'view-only',
|
||||||
|
write: 'edit'
|
||||||
|
}.freeze
|
||||||
end
|
end
|
||||||
|
|
|
@ -987,8 +987,8 @@ en:
|
||||||
edit_inventory: "Edit Inventory"
|
edit_inventory: "Edit Inventory"
|
||||||
share_inventory: "Share"
|
share_inventory: "Share"
|
||||||
title_label: "Inventory:"
|
title_label: "Inventory:"
|
||||||
|
view_only_permission_label: "This team has a view-only permission"
|
||||||
options_dropdown:
|
options_dropdown:
|
||||||
header: "Edit inventory"
|
|
||||||
manage_columns: 'Manage columns'
|
manage_columns: 'Manage columns'
|
||||||
import_items: 'Import items'
|
import_items: 'Import items'
|
||||||
export_items: 'Export items'
|
export_items: 'Export items'
|
||||||
|
@ -1044,7 +1044,7 @@ en:
|
||||||
errors_list_title: "Items were not imported because one or more errors were found:"
|
errors_list_title: "Items were not imported because one or more errors were found:"
|
||||||
no_repository_name: "Item name is required!"
|
no_repository_name: "Item name is required!"
|
||||||
edit_record: "Edit"
|
edit_record: "Edit"
|
||||||
copy_record: "Copy"
|
copy_record: "Duplicate"
|
||||||
delete_record: "Delete"
|
delete_record: "Delete"
|
||||||
save_record: "Save"
|
save_record: "Save"
|
||||||
cancel_save: "Cancel"
|
cancel_save: "Cancel"
|
||||||
|
|
|
@ -102,9 +102,9 @@ en:
|
||||||
create_inventory_html: "%{user} created inventory %{repository}."
|
create_inventory_html: "%{user} created inventory %{repository}."
|
||||||
rename_inventory_html: "%{user} renamed inventory %{repository}."
|
rename_inventory_html: "%{user} renamed inventory %{repository}."
|
||||||
delete_inventory_html: "%{user} deleted 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}."
|
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}."
|
create_item_inventory_html: "%{user} created inventory item %{repository_row}."
|
||||||
edit_item_inventory_html: "%{user} edited inventory item %{repository_row}."
|
edit_item_inventory_html: "%{user} edited inventory item %{repository_row}."
|
||||||
delete_item_inventory_html: "%{user} deleted inventory item %{repository_row}."
|
delete_item_inventory_html: "%{user} deleted inventory item %{repository_row}."
|
||||||
|
|
Loading…
Reference in a new issue