Merge pull request #4593 from MaximilianKrambach/multiSelectMotionExport
Multi select motion export
This commit is contained in:
commit
a831ccd2b2
@ -169,20 +169,20 @@
|
||||
</button>
|
||||
|
||||
<!-- Deselect all -->
|
||||
<button mat-menu-item (click)="deselectAll()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="deselectAll()">
|
||||
<mat-icon>clear</mat-icon>
|
||||
<span translate>Deselect all</span>
|
||||
</button>
|
||||
<mat-divider></mat-divider>
|
||||
<div *osPerms="'agenda.can_manage'">
|
||||
<!-- Close selected -->
|
||||
<button mat-menu-item (click)="setClosedSelected(true)">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setClosedSelected(true)">
|
||||
<mat-icon>done</mat-icon>
|
||||
<span translate>Close</span>
|
||||
</button>
|
||||
|
||||
<!-- Open selected -->
|
||||
<button mat-menu-item (click)="setClosedSelected(false)">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setClosedSelected(false)">
|
||||
<mat-icon>redo</mat-icon>
|
||||
<span translate>Open</span>
|
||||
</button>
|
||||
@ -190,26 +190,26 @@
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<!-- Set multiple to public -->
|
||||
<button mat-menu-item (click)="setAgendaType(1)">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setAgendaType(1)">
|
||||
<mat-icon>public</mat-icon>
|
||||
<span translate>Set public</span>
|
||||
</button>
|
||||
|
||||
<!-- Set multiple to internal -->
|
||||
<button mat-menu-item (click)="setAgendaType(2)">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setAgendaType(2)">
|
||||
<mat-icon>visibility</mat-icon>
|
||||
<span translate>Set internal</span>
|
||||
</button>
|
||||
|
||||
<!-- Set multiple to hidden -->
|
||||
<button mat-menu-item (click)="setAgendaType(3)">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setAgendaType(3)">
|
||||
<mat-icon>visibility_off</mat-icon>
|
||||
<span translate>Set hidden</span>
|
||||
</button>
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<!-- Delete selected -->
|
||||
<button mat-menu-item class="red-warning-text" (click)="deleteSelected()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" class="red-warning-text" (click)="deleteSelected()">
|
||||
<mat-icon>delete</mat-icon>
|
||||
<span translate>Delete</span>
|
||||
</button>
|
||||
|
@ -95,7 +95,7 @@
|
||||
<mat-icon>done_all</mat-icon>
|
||||
<span translate>Select all</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="deselectAll()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="deselectAll()">
|
||||
<mat-icon>clear</mat-icon>
|
||||
<span translate>Deselect all</span>
|
||||
</button>
|
||||
@ -104,6 +104,7 @@
|
||||
mat-menu-item
|
||||
class="red-warning-text"
|
||||
*osPerms="'assignment.can_manage'"
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="deleteSelected()"
|
||||
>
|
||||
<mat-icon>delete</mat-icon>
|
||||
|
@ -196,12 +196,17 @@
|
||||
<mat-icon>done_all</mat-icon>
|
||||
<span translate>Select all</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="deselectAll()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="deselectAll()">
|
||||
<mat-icon>clear</mat-icon>
|
||||
<span translate>Deselect all</span>
|
||||
</button>
|
||||
<mat-divider></mat-divider>
|
||||
<button mat-menu-item *osPerms="'mediafiles.can_manage'" (click)="deleteSelected()">
|
||||
<button
|
||||
mat-menu-item
|
||||
*osPerms="'mediafiles.can_manage'"
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="deleteSelected()"
|
||||
>
|
||||
<mat-icon>delete</mat-icon>
|
||||
<span translate>Delete</span>
|
||||
</button>
|
||||
|
@ -92,8 +92,11 @@
|
||||
<mat-icon>{{ !showAmendmentContext ? 'check_box_outline_blank' : 'check_box' }}</mat-icon>
|
||||
<span translate>Show entire motion text</span>
|
||||
</button>
|
||||
|
||||
<div *ngIf="perms.isAllowed('manage')">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="openExportDialog()">
|
||||
<mat-icon>archive</mat-icon>
|
||||
<span translate>Export selected motions</span>
|
||||
</button>
|
||||
<mat-divider></mat-divider>
|
||||
<!-- Delete -->
|
||||
<button mat-menu-item class="red-warning-text" (click)="deleteMotionButton()">
|
||||
@ -557,7 +560,10 @@
|
||||
|
||||
<div class="form-id-title">
|
||||
<!-- Identifier -->
|
||||
<div *ngIf="editMotion && !newMotion && perms.isAllowed('change_metadata', motion)" class="content-field form-identifier">
|
||||
<div
|
||||
*ngIf="editMotion && !newMotion && perms.isAllowed('change_metadata', motion)"
|
||||
class="content-field form-identifier"
|
||||
>
|
||||
<mat-form-field *ngIf="editMotion">
|
||||
<input
|
||||
matInput
|
||||
@ -628,7 +634,8 @@
|
||||
<editor formControlName="text" [init]="tinyMceSettings" required></editor>
|
||||
<div
|
||||
*ngIf="
|
||||
contentForm.get('text').invalid && (contentForm.get('text').dirty || contentForm.get('text').touched)
|
||||
contentForm.get('text').invalid &&
|
||||
(contentForm.get('text').dirty || contentForm.get('text').touched)
|
||||
"
|
||||
class="red-warning-text"
|
||||
translate
|
||||
@ -642,17 +649,20 @@
|
||||
<section *ngFor="let paragraph of contentForm.value.selected_paragraphs">
|
||||
<h4>
|
||||
<span *ngIf="paragraph.lineFrom >= paragraph.lineTo - 1" class="line-number">
|
||||
{{ 'Line' | translate }} {{ paragraph.lineFrom }}</span>
|
||||
{{ 'Line' | translate }} {{ paragraph.lineFrom }}</span
|
||||
>
|
||||
<span *ngIf="paragraph.lineFrom < paragraph.lineTo - 1" class="line-number">
|
||||
{{ 'Line' | translate }} {{ paragraph.lineFrom }} - {{ paragraph.lineTo - 1 }}</span>
|
||||
{{ 'Line' | translate }} {{ paragraph.lineFrom }} - {{ paragraph.lineTo - 1 }}</span
|
||||
>
|
||||
<span>*</span>
|
||||
</h4>
|
||||
<editor [formControlName]="'text_' + paragraph.paragraphNo" [init]="tinyMceSettings" required></editor>
|
||||
<div
|
||||
*ngIf="contentForm.get('text_' + paragraph.paragraphNo).invalid && (
|
||||
contentForm.get('text_' + paragraph.paragraphNo).dirty ||
|
||||
contentForm.get('text_' + paragraph.paragraphNo).touched
|
||||
)"
|
||||
*ngIf="
|
||||
contentForm.get('text_' + paragraph.paragraphNo).invalid &&
|
||||
(contentForm.get('text_' + paragraph.paragraphNo).dirty ||
|
||||
contentForm.get('text_' + paragraph.paragraphNo).touched)
|
||||
"
|
||||
class="red-warning-text"
|
||||
translate
|
||||
>
|
||||
|
@ -215,22 +215,23 @@
|
||||
<mat-icon>done_all</mat-icon>
|
||||
<span translate>Select all</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="deselectAll()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="deselectAll()">
|
||||
<mat-icon>clear</mat-icon>
|
||||
<span translate>Deselect all</span>
|
||||
</button>
|
||||
<div *ngIf="perms.isAllowed('change_metadata')">
|
||||
<mat-divider></mat-divider>
|
||||
<button mat-menu-item (click)="multiselectWrapper(multiselectService.bulkToggleFavorite(selectedRows))">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="multiselectWrapper(multiselectService.bulkSetFavorite(selectedRows))">
|
||||
<mat-icon>star</mat-icon>
|
||||
<span translate>Set/unset Favorite</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="multiselectWrapper(multiselectService.setStateOfMultiple(selectedRows))">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="multiselectWrapper(multiselectService.setStateOfMultiple(selectedRows))">
|
||||
<mat-icon>label</mat-icon>
|
||||
<span translate>Set status</span>
|
||||
</button>
|
||||
<button
|
||||
*ngIf="recomendationEnabled"
|
||||
[disabled]="!selectedRows.length"
|
||||
mat-menu-item
|
||||
(click)="multiselectWrapper(multiselectService.setRecommendation(selectedRows))"
|
||||
>
|
||||
@ -240,6 +241,7 @@
|
||||
</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
[disabled]="!selectedRows.length"
|
||||
*ngIf="categories.length"
|
||||
(click)="multiselectWrapper(multiselectService.setCategory(selectedRows))"
|
||||
>
|
||||
@ -250,6 +252,7 @@
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="motionBlocks.length"
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="multiselectWrapper(multiselectService.setMotionBlock(selectedRows))"
|
||||
>
|
||||
<mat-icon>widgets</mat-icon>
|
||||
@ -257,7 +260,9 @@
|
||||
<span translate>Set motion block</span>
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="multiselectWrapper(multiselectService.changeSubmitters(selectedRows))">
|
||||
<button mat-menu-item
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="multiselectWrapper(multiselectService.changeSubmitters(selectedRows))">
|
||||
<mat-icon>person_add</mat-icon>
|
||||
<!-- TODO: icon -->
|
||||
<span translate>Add/remove submitters</span>
|
||||
@ -265,17 +270,22 @@
|
||||
<button
|
||||
mat-menu-item
|
||||
*ngIf="tags.length"
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="multiselectWrapper(multiselectService.changeTags(selectedRows))"
|
||||
>
|
||||
<mat-icon>bookmarks</mat-icon>
|
||||
<!-- TODO: icon -->
|
||||
<span translate>Add/remove tags</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="multiselectWrapper(multiselectService.moveToItem(selectedRows))">
|
||||
<button mat-menu-item
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="multiselectWrapper(multiselectService.moveToItem(selectedRows))">
|
||||
<mat-icon>sort</mat-icon>
|
||||
<span translate>Move to agenda item</span>
|
||||
</button>
|
||||
<button mat-menu-item (click)="multiselectWrapper(multiselectService.bulkMoveItems(selectedRows))">
|
||||
<button mat-menu-item
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="multiselectWrapper(multiselectService.bulkMoveItems(selectedRows))">
|
||||
<mat-icon>format_indent_increase</mat-icon>
|
||||
<span translate>Move in call list</span>
|
||||
</button>
|
||||
@ -285,6 +295,7 @@
|
||||
<button
|
||||
mat-menu-item
|
||||
class="red-warning-text"
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="multiselectService.delete(selectedRows); toggleMultiSelect()"
|
||||
>
|
||||
<mat-icon>delete</mat-icon>
|
||||
|
@ -198,7 +198,9 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the export dialog
|
||||
* Opens the export dialog.
|
||||
* The export will be limited to the selected data if multiselect modus is
|
||||
* active and there are rows selected
|
||||
*/
|
||||
public openExportDialog(): void {
|
||||
const exportDialogRef = this.dialog.open(MotionExportDialogComponent, {
|
||||
@ -210,9 +212,10 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
|
||||
|
||||
exportDialogRef.afterClosed().subscribe((result: any) => {
|
||||
if (result && result.format) {
|
||||
const data = this.isMultiSelect ? this.selectedRows : this.dataSource.filteredData;
|
||||
if (result.format === 'pdf') {
|
||||
this.pdfExport.exportMotionCatalog(
|
||||
this.dataSource.filteredData,
|
||||
data,
|
||||
result.lnMode,
|
||||
result.crMode,
|
||||
result.content,
|
||||
@ -220,13 +223,9 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
|
||||
result.comments
|
||||
);
|
||||
} else if (result.format === 'csv') {
|
||||
this.motionCsvExport.exportMotionList(
|
||||
this.dataSource.filteredData,
|
||||
result.content,
|
||||
result.metaInfo
|
||||
);
|
||||
this.motionCsvExport.exportMotionList(data, result.content, result.metaInfo);
|
||||
} else if (result.format === 'xlsx') {
|
||||
this.motionXlsxExport.exportMotionList(this.dataSource.filteredData, result.metaInfo);
|
||||
this.motionXlsxExport.exportMotionList(data, result.metaInfo);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -152,20 +152,25 @@
|
||||
<span translate>Select all</span>
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="deselectAll()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="deselectAll()">
|
||||
<mat-icon>clear</mat-icon>
|
||||
<span translate>Deselect all</span>
|
||||
</button>
|
||||
|
||||
<div *osPerms="'users.can_manage'">
|
||||
<mat-divider></mat-divider>
|
||||
<button mat-menu-item (click)="setGroupSelected()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setGroupSelected()">
|
||||
<mat-icon>people</mat-icon>
|
||||
<span translate>Add/remove groups ...</span>
|
||||
</button>
|
||||
|
||||
<div *ngIf="presenceViewConfigured">
|
||||
<button mat-menu-item *osPerms="'users.can_manage'" routerLink="presence">
|
||||
<button
|
||||
mat-menu-item
|
||||
*osPerms="'users.can_manage'"
|
||||
[disabled]="!selectedRows.length"
|
||||
routerLink="presence"
|
||||
>
|
||||
<mat-icon>transfer_within_a_station</mat-icon>
|
||||
<span translate>Presence</span>
|
||||
</button>
|
||||
@ -179,34 +184,39 @@
|
||||
<div *osPerms="'users.can_manage'">
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<button mat-menu-item (click)="setActiveSelected()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setActiveSelected()">
|
||||
<mat-icon>block</mat-icon>
|
||||
<span translate>Enable/disable account ...</span>
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="setPresentSelected()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setPresentSelected()">
|
||||
<mat-icon>check_box</mat-icon>
|
||||
<span translate>Set presence ...</span>
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="setCommitteeSelected()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="setCommitteeSelected()">
|
||||
<mat-icon>account_balance</mat-icon>
|
||||
<span translate>Set committee ...</span>
|
||||
</button>
|
||||
|
||||
<mat-divider></mat-divider>
|
||||
|
||||
<button mat-menu-item (click)="sendInvitationEmailSelected()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="sendInvitationEmailSelected()">
|
||||
<mat-icon>mail</mat-icon>
|
||||
<span translate>Send invitation email</span>
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="resetPasswordsSelected()">
|
||||
<button mat-menu-item [disabled]="!selectedRows.length" (click)="resetPasswordsSelected()">
|
||||
<mat-icon>vpn_key</mat-icon>
|
||||
<span translate>Generate new passwords</span>
|
||||
</button>
|
||||
<mat-divider></mat-divider>
|
||||
<button mat-menu-item class="red-warning-text" (click)="deleteSelected()">
|
||||
<button
|
||||
mat-menu-item
|
||||
class="red-warning-text"
|
||||
[disabled]="!selectedRows.length"
|
||||
(click)="deleteSelected()"
|
||||
>
|
||||
<mat-icon>delete</mat-icon>
|
||||
<span translate>Delete</span>
|
||||
</button>
|
||||
|
Loading…
Reference in New Issue
Block a user