Show subcategory in detail for every permission

Shows subcat. withoug manage rights
Hide empty recommendation field if the user cannot manage it
This commit is contained in:
Sean Engelhardt 2019-08-08 16:22:33 +02:00
parent 91238e83bb
commit 291a3b35e8
1 changed files with 19 additions and 4 deletions

View File

@ -267,7 +267,11 @@
</button> </button>
<div> <div>
<mat-divider *ngIf="motion.state.next_states.length > 0"></mat-divider> <mat-divider *ngIf="motion.state.next_states.length > 0"></mat-divider>
<button *ngFor="let state of motion.state.previous_states" mat-menu-item (click)="setState(state.id)"> <button
*ngFor="let state of motion.state.previous_states"
mat-menu-item
(click)="setState(state.id)"
>
<mat-icon>arrow_back</mat-icon> {{ state.name | translate }} <mat-icon>arrow_back</mat-icon> {{ state.name | translate }}
<span *ngIf="state.show_state_extension_field">&nbsp;...</span> <span *ngIf="state.show_state_extension_field">&nbsp;...</span>
</button> </button>
@ -280,7 +284,7 @@
</div> </div>
<!-- Recommendation --> <!-- Recommendation -->
<div *ngIf="recommender && !editMotion"> <div *ngIf="(perms.isAllowed('change_metadata') || motion.recommendation) && recommender && !editMotion">
<os-extension-field <os-extension-field
title="{{ recommender }}" title="{{ recommender }}"
[inputValue]="recommendationStateExtension" [inputValue]="recommendationStateExtension"
@ -362,7 +366,13 @@
class="grey" class="grey"
disableRipple disableRipple
> >
{{ motion.category.prefixedNameWithParents }} <div *ngIf="motion.category">
<div *ngIf="motion.category.parent">
{{ motion.category.parent }}
</div>
<span *ngIf="motion.category.parent">{{ 'Subcategory' | translate }}:</span>
{{ motion.category }}
</div>
</mat-basic-chip> </mat-basic-chip>
</div> </div>
@ -761,7 +771,12 @@
<div class="motion-text" *ngIf="!editMotion"><div [innerHtml]="sanitizedText(motion.reason)"></div></div> <div class="motion-text" *ngIf="!editMotion"><div [innerHtml]="sanitizedText(motion.reason)"></div></div>
<!-- The HTML Editor --> <!-- The HTML Editor -->
<editor formControlName="reason" [init]="tinyMceSettings" *ngIf="editMotion" [required]="reasonRequired"></editor> <editor
formControlName="reason"
[init]="tinyMceSettings"
*ngIf="editMotion"
[required]="reasonRequired"
></editor>
<div <div
*ngIf=" *ngIf="
reasonRequired && reasonRequired &&