File tree Expand file tree Collapse file tree 4 files changed +30
-27
lines changed
components/files-selection-actions
shared/components/wiki/wiki-list Expand file tree Collapse file tree 4 files changed +30
-27
lines changed Original file line number Diff line number Diff line change 1414 (onClick) ="clearSelection.emit() "
1515 />
1616 </ div >
17+ @if (!hasViewOnly()) {
18+ < div class ="flex gap-2 ml-auto ">
19+ @if (canUpdateFiles()) {
20+ < p-button
21+ icon ="fas fa-arrows-alt "
22+ outlined
23+ raised
24+ [label] ="'common.buttons.move' | translate "
25+ (onClick) ="moveSelected.emit() "
26+ />
27+ }
1728
18- < div class ="flex gap-2 ml-auto ">
19- @if (canUpdateFiles()) {
2029 < p-button
21- icon ="fas fa-arrows-alt "
30+ icon ="fas fa-copy "
31+ severity ="success "
2232 outlined
2333 raised
24- [label] ="'common.buttons.move ' | translate "
25- (onClick) ="moveSelected .emit() "
34+ [label] ="'common.buttons.copyTo ' | translate "
35+ (onClick) ="copySelected .emit() "
2636 />
27- }
28-
29- < p-button
30- icon ="fas fa-copy "
31- severity ="success "
32- outlined
33- raised
34- [label] ="'common.buttons.copyTo' | translate "
35- (onClick) ="copySelected.emit() "
36- />
37- @if (canUpdateFiles()) {
38- < p-button
39- icon ="fas fa-trash "
40- severity ="danger "
41- outlined
42- raised
43- [label] ="'common.buttons.delete' | translate "
44- (onClick) ="deleteSelected.emit() "
45- />
46- }
47- </ div >
37+ @if (canUpdateFiles()) {
38+ < p-button
39+ icon ="fas fa-trash "
40+ severity ="danger "
41+ outlined
42+ raised
43+ [label] ="'common.buttons.delete' | translate "
44+ (onClick) ="deleteSelected.emit() "
45+ />
46+ }
47+ </ div >
48+ }
4849 </ div >
4950}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { FileModel } from '@osf/shared/models';
1616export class FilesSelectionActionsComponent {
1717 selectedFiles = input < FileModel [ ] > ( [ ] ) ;
1818 canUpdateFiles = input < boolean > ( true ) ;
19+ hasViewOnly = input < boolean > ( false ) ;
1920 copySelected = output < void > ( ) ;
2021 moveSelected = output < void > ( ) ;
2122 deleteSelected = output < void > ( ) ;
Original file line number Diff line number Diff line change 2929 < osf-files-selection-actions
3030 [canUpdateFiles] ="canUploadFiles() "
3131 [selectedFiles] ="filesSelection "
32+ [hasViewOnly] ="hasViewOnly() "
3233 (deleteSelected) ="onDeleteSelected() "
3334 (moveSelected) ="onMoveSelected() "
3435 (copySelected) ="onCopySelected() "
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ <h4 class="ml-2">{{ item.label | translate }}</h4>
6464 @default {
6565 < div >
6666 < i class ="far fa-file "> </ i >
67- < span class ="ml-2 "> {{ item.label | translate }}</ span >
67+ < span class ="ml-2 "> {{ item.label }}</ span >
6868 </ div >
6969 }
7070 }
You can’t perform that action at this time.
0 commit comments