Update shared status in inventory datatable [SCI-8655] (#5604)

This commit is contained in:
ajugo 2023-06-15 15:32:01 +02:00 committed by GitHub
parent 0680379dd6
commit 89f1efc64e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -134,7 +134,8 @@
}
}
tr[data-shared=true] {
tr[data-shared=true],
tr[data-i-shared=true] {
td.item-name::before {
@include font-awesome;
content: "\f0c0";

View file

@ -28,7 +28,8 @@ module RepositoriesDatatableHelper
'data-delete-modal-url': team_repository_destroy_modal_path(team, repository_id: repository),
'data-copy-modal-url': team_repository_copy_modal_path(team, repository_id: repository),
'data-rename-modal-url': team_repository_rename_modal_path(team, repository_id: repository),
'data-shared': repository.shared_with?(team)
'data-shared': repository.shared_with?(team),
'data-i-shared': repository.i_shared?(team)
}
)
end
@ -38,6 +39,7 @@ module RepositoriesDatatableHelper
private
def shared_label(repository, team)
return I18n.t('libraries.index.shared') if repository.i_shared?(team)
return I18n.t('libraries.index.not_shared') unless repository.shared_with?(team)
if repository.shared_with_read?(team)

View file

@ -2235,6 +2235,7 @@ en:
shared_for_viewing: "For viewing"
shared_for_editing: "For editing"
not_shared: "No"
shared: "Yes"
switch_view:
active: Show active inventories
archived: Show archived inventories