Fix mediafile multi download permission
Fixes a permission issue in the mediafile list. Without manage right, the vertical dot menu was not visible. Also allows multi selection and selective download without manage rights. Fixes a ngrid css error in mediafile list
This commit is contained in:
parent
9607f05454
commit
d22e0bf2f6
@ -49,7 +49,7 @@ export class PermsDirective implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a true-false-condition additional to osPerms
|
* Add a true-false-condition additional to osPerms
|
||||||
* `*osPerms="'motions.can_manage';and:isRecoMode(ChangeRecoMode.Final)"`
|
* `*osPerms="permission.mediafilesCanManage; and: !isMultiSelect"`
|
||||||
*/
|
*/
|
||||||
private and = true;
|
private and = true;
|
||||||
|
|
||||||
|
@ -5,8 +5,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Menu -->
|
<!-- Menu -->
|
||||||
<div class="menu-slot" *osPerms="'mediafiles.can_manage'">
|
<div class="menu-slot">
|
||||||
<button type="button" mat-icon-button (click)="createNewFolder(newFolderDialog)" *ngIf="!isMultiSelect">
|
<button
|
||||||
|
type="button"
|
||||||
|
mat-icon-button
|
||||||
|
(click)="createNewFolder(newFolderDialog)"
|
||||||
|
*osPerms="permission.mediafilesCanManage; and: !isMultiSelect"
|
||||||
|
>
|
||||||
<mat-icon>create_new_folder</mat-icon>
|
<mat-icon>create_new_folder</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" mat-icon-button [matMenuTriggerFor]="mediafilesMenu">
|
<button type="button" mat-icon-button [matMenuTriggerFor]="mediafilesMenu">
|
||||||
@ -182,7 +187,7 @@
|
|||||||
<!-- Menu for single files in the list -->
|
<!-- Menu for single files in the list -->
|
||||||
<mat-menu #singleMediafileMenu="matMenu">
|
<mat-menu #singleMediafileMenu="matMenu">
|
||||||
<ng-template matMenuContent let-mediafile="mediafile">
|
<ng-template matMenuContent let-mediafile="mediafile">
|
||||||
<div *osPerms="'core.can_manage_logos_and_fonts'">
|
<div *osPerms="permission.coreCanManageLogosAndFonts">
|
||||||
<!-- Exclusive for images -->
|
<!-- Exclusive for images -->
|
||||||
<div *ngIf="mediafile.isImage()">
|
<div *ngIf="mediafile.isImage()">
|
||||||
<div *ngFor="let action of logoActions">
|
<div *ngFor="let action of logoActions">
|
||||||
@ -233,7 +238,7 @@
|
|||||||
<mat-icon>cloud_download</mat-icon>
|
<mat-icon>cloud_download</mat-icon>
|
||||||
<span>{{ 'Download folder' | translate }}</span>
|
<span>{{ 'Download folder' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item *osPerms="'mediafiles.can_manage'" (click)="toggleMultiSelect()">
|
<button mat-menu-item (click)="toggleMultiSelect()">
|
||||||
<mat-icon>library_add</mat-icon>
|
<mat-icon>library_add</mat-icon>
|
||||||
<span>{{ 'Multiselect' | translate }}</span>
|
<span>{{ 'Multiselect' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
@ -243,7 +248,12 @@
|
|||||||
<mat-icon>cloud_download</mat-icon>
|
<mat-icon>cloud_download</mat-icon>
|
||||||
<span>{{ 'Download' | translate }}</span>
|
<span>{{ 'Download' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="move(moveDialog, selectedRows)">
|
<button
|
||||||
|
mat-menu-item
|
||||||
|
*osPerms="permission.mediafilesCanManage"
|
||||||
|
[disabled]="!selectedRows.length"
|
||||||
|
(click)="move(moveDialog, selectedRows)"
|
||||||
|
>
|
||||||
<mat-icon>near_me</mat-icon>
|
<mat-icon>near_me</mat-icon>
|
||||||
<span>{{ 'Move' | translate }}</span>
|
<span>{{ 'Move' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
@ -256,10 +266,10 @@
|
|||||||
<mat-icon>clear</mat-icon>
|
<mat-icon>clear</mat-icon>
|
||||||
<span>{{ 'Deselect all' | translate }}</span>
|
<span>{{ 'Deselect all' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<mat-divider></mat-divider>
|
<mat-divider *osPerms="permission.mediafilesCanManage"></mat-divider>
|
||||||
<button
|
<button
|
||||||
mat-menu-item
|
mat-menu-item
|
||||||
*osPerms="'mediafiles.can_manage'"
|
*osPerms="permission.mediafilesCanManage"
|
||||||
[disabled]="!selectedRows.length"
|
[disabled]="!selectedRows.length"
|
||||||
(click)="deleteSelected()"
|
(click)="deleteSelected()"
|
||||||
>
|
>
|
||||||
|
@ -63,6 +63,16 @@ $navbar-size: 64px;
|
|||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compilcated ngrid hack: The meta row won't disappear (just like that)
|
||||||
|
* Select the first ever container pbl-ngrid-container div and hide
|
||||||
|
*/
|
||||||
|
.pbl-ngrid-container {
|
||||||
|
> div {
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.pbl-ngrid-row {
|
.pbl-ngrid-row {
|
||||||
$size: 60px;
|
$size: 60px;
|
||||||
height: $size !important;
|
height: $size !important;
|
||||||
|
Loading…
Reference in New Issue
Block a user