Hides amendments entry in menu if deactivated
This commit is contained in:
parent
dcf5d5316c
commit
a84bfccd07
@ -236,7 +236,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Amendments -->
|
<!-- Amendments -->
|
||||||
<div *ngIf="perms.isAllowed('manage') || hasAmendments()">
|
<div *ngIf="amendmentsEnabled && (perms.isAllowed('manage') || hasAmendments())">
|
||||||
<button mat-menu-item routerLink="amendments">
|
<button mat-menu-item routerLink="amendments">
|
||||||
<!-- color_lens -->
|
<!-- color_lens -->
|
||||||
<!-- format_paint -->
|
<!-- format_paint -->
|
||||||
|
@ -139,6 +139,11 @@ export class MotionListComponent extends BaseListViewComponent<ViewMotion> imple
|
|||||||
*/
|
*/
|
||||||
public statutesEnabled: boolean;
|
public statutesEnabled: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Value of the configuration variable `motions_amendments_enabled` - are amendments enabled?
|
||||||
|
*/
|
||||||
|
public amendmentsEnabled: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Value of the config variable `motions_show_sequential_numbers`
|
* Value of the config variable `motions_show_sequential_numbers`
|
||||||
*/
|
*/
|
||||||
@ -235,6 +240,9 @@ export class MotionListComponent extends BaseListViewComponent<ViewMotion> imple
|
|||||||
this.configService
|
this.configService
|
||||||
.get<boolean>('motions_statutes_enabled')
|
.get<boolean>('motions_statutes_enabled')
|
||||||
.subscribe(enabled => (this.statutesEnabled = enabled));
|
.subscribe(enabled => (this.statutesEnabled = enabled));
|
||||||
|
this.configService
|
||||||
|
.get<boolean>('motions_amendments_enabled')
|
||||||
|
.subscribe(enabled => (this.amendmentsEnabled = enabled));
|
||||||
this.configService.get<string>('motions_recommendations_by').subscribe(recommender => {
|
this.configService.get<string>('motions_recommendations_by').subscribe(recommender => {
|
||||||
this.recommendationEnabled = !!recommender;
|
this.recommendationEnabled = !!recommender;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user