mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 19:53:19 +08:00
Storage location activity fixes [SCI-11145]
This commit is contained in:
parent
9c288c2021
commit
ce287fa931
5 changed files with 12 additions and 4 deletions
|
@ -131,7 +131,7 @@ class StorageLocationRepositoryRowsController < ApplicationController
|
|||
.call(activity_type: type_of,
|
||||
owner: current_user,
|
||||
team: @storage_location.team,
|
||||
subject: @storage_location_repository_row.repository_row,
|
||||
subject: @storage_location_repository_row.storage_location,
|
||||
message_items: {
|
||||
storage_location: @storage_location_repository_row.storage_location_id,
|
||||
repository_row: @storage_location_repository_row.repository_row_id,
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
module GlobalActivitiesHelper
|
||||
include ActionView::Helpers::AssetTagHelper
|
||||
include ActionView::Helpers::UrlHelper
|
||||
include Canaid::Helpers::PermissionsHelper
|
||||
include InputSanitizeHelper
|
||||
|
||||
def generate_activity_content(activity, no_links: false, no_custom_links: false)
|
||||
|
@ -60,6 +61,9 @@ module GlobalActivitiesHelper
|
|||
when Repository
|
||||
path = repository_path(obj, team: obj.team.id)
|
||||
when RepositoryRow
|
||||
# Handle private repository rows
|
||||
return I18n.t('storage_locations.show.hidden') unless can_read_repository?(obj.repository)
|
||||
|
||||
return current_value unless obj.repository
|
||||
|
||||
path = repository_path(obj.repository, team: obj.repository.team.id)
|
||||
|
@ -127,6 +131,8 @@ module GlobalActivitiesHelper
|
|||
message_item['type'].constantize.new
|
||||
end
|
||||
|
||||
return I18n.t('storage_locations.show.hidden') if obj.is_a?(RepositoryRow) && !can_read_repository?(obj.repository)
|
||||
|
||||
return I18n.t('projects.index.breadcrumbs_root') if obj.is_a?(ProjectFolder) && obj.new_record?
|
||||
|
||||
return I18n.t('storage_locations.index.breadcrumbs_root') if obj.is_a?(StorageLocation) && obj.new_record?
|
||||
|
|
|
@ -538,7 +538,7 @@ class Extends
|
|||
team: [92, 94, 93, 97, 104, 244, 245],
|
||||
label_templates: [*216..219],
|
||||
storage_locations: [*309..315],
|
||||
container_storage_location: [*316..322, 326],
|
||||
container_storage_locations: [*316..322, 326],
|
||||
storage_location_repository_rows: [*323..325]
|
||||
}
|
||||
|
||||
|
|
|
@ -2180,6 +2180,7 @@ en:
|
|||
errors:
|
||||
too_long: "Item name is too long (maximum is %{max_length} characters)"
|
||||
is_empty: "Item name should be filled"
|
||||
row_locked: The item is locked, snapshot creation is in progress. Please try later.
|
||||
pagination_edit_overlay_html: "Please <a class=\"repository-save-changes-link\">save your changes</a> before you go to another page"
|
||||
toolbar_edit_overlay_html: "Please <a class=\"repository-save-changes-link\">save your changes</a> first to use filters"
|
||||
add_new_record: "New item"
|
||||
|
|
|
@ -650,8 +650,9 @@ en:
|
|||
team: "Team"
|
||||
exports: "Exports"
|
||||
label_templates: "Label templates"
|
||||
storage_locations: "Locations"
|
||||
container_storage_locations: "Boxes"
|
||||
storage_locations: "Inventory locations"
|
||||
container_storage_locations: "Inventory location boxes"
|
||||
storage_location_repository_rows: "Item assignments to location"
|
||||
subject_name:
|
||||
repository: "Inventory"
|
||||
project: "Project"
|
||||
|
|
Loading…
Reference in a new issue