Merge pull request #5563 from tsiegleauq/hide-id-in-amendment-list

Show or hide motion id in amendment list by config
This commit is contained in:
Emanuel Schütze 2020-09-17 15:03:42 +02:00 committed by GitHub
commit 688b1b276d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

View File

@ -59,11 +59,13 @@
{{ motion.submitters }}
</span>
<span *ngIf="showSequentialNumber">
<span *ngIf="motion.submitters.length">
&middot;
</span>
<span>{{ 'Sequential number' | translate }}</span>
{{ motion.id }}
</span>
</div>
<!-- State -->

View File

@ -13,6 +13,7 @@ import { AmendmentFilterListService } from '../../services/amendment-filter-list
import { AmendmentSortListService } from '../../services/amendment-sort-list.service';
import { StorageService } from 'app/core/core-services/storage.service';
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
import { ConfigService } from 'app/core/ui-services/config.service';
import { LinenumberingService } from 'app/core/ui-services/linenumbering.service';
import { OverlayService } from 'app/core/ui-services/overlay.service';
import { ItemVisibilityChoices } from 'app/shared/models/agenda/item';
@ -51,6 +52,8 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
*/
public itemVisibility = ItemVisibilityChoices;
public showSequentialNumber: boolean;
/**
* Column defintiion
*/
@ -85,7 +88,7 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
* @param motionRepo get the motions
* @param motionSortService the default motion sorter
*
* @param configService get config vars
* @param Service get config vars
*/
public constructor(
titleService: Title,
@ -102,7 +105,8 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
private motionExport: MotionExportService,
private linenumberingService: LinenumberingService,
private pdfExport: MotionPdfExportService,
private overlayService: OverlayService
private overlayService: OverlayService,
private configService: ConfigService
) {
super(titleService, translate, matSnackBar, storage);
super.setTitle('Amendments');
@ -124,6 +128,10 @@ export class AmendmentListComponent extends BaseListViewComponent<ViewMotion> im
} else {
this.amendmentFilterService.parentMotionId = undefined;
}
this.configService
.get<boolean>('motions_show_sequential_numbers')
.subscribe(show => (this.showSequentialNumber = show));
}
/**