Add tags to motion pdf
Adds tags to motion pdf. Adjusts the export dialog to also support selecting and deselecting tags. Increases the target with of the export dialog to 1100px so the tags also fit there. Not too pretty, yet effective
This commit is contained in:
parent
6eea064862
commit
f2a4be702a
@ -49,6 +49,7 @@
|
|||||||
<mat-button-toggle value="state"> <span translate>State</span> </mat-button-toggle>
|
<mat-button-toggle value="state"> <span translate>State</span> </mat-button-toggle>
|
||||||
<mat-button-toggle value="recommendation"> <span translate>Recommendation</span> </mat-button-toggle>
|
<mat-button-toggle value="recommendation"> <span translate>Recommendation</span> </mat-button-toggle>
|
||||||
<mat-button-toggle value="category"> <span translate>Category</span> </mat-button-toggle>
|
<mat-button-toggle value="category"> <span translate>Category</span> </mat-button-toggle>
|
||||||
|
<mat-button-toggle value="tags"> <span translate>Tags</span> </mat-button-toggle>
|
||||||
<mat-button-toggle value="origin"> <span translate>Origin</span> </mat-button-toggle>
|
<mat-button-toggle value="origin"> <span translate>Origin</span> </mat-button-toggle>
|
||||||
<mat-button-toggle value="block"> <span translate>Motion block</span> </mat-button-toggle>
|
<mat-button-toggle value="block"> <span translate>Motion block</span> </mat-button-toggle>
|
||||||
<mat-button-toggle value="poll" #votingResultButton>
|
<mat-button-toggle value="poll" #votingResultButton>
|
||||||
@ -59,11 +60,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngIf="commentsToExport.length && exportForm.get('format').value === 'pdf'">
|
<div *ngIf="commentsToExport.length && exportForm.get('format').value === 'pdf'">
|
||||||
<p class="toggle-group-head" translate>Comments</p>
|
<p class="toggle-group-head" translate>Comments</p>
|
||||||
<mat-button-toggle-group
|
<mat-button-toggle-group class="smaller-buttons" multiple formControlName="comments">
|
||||||
class="smaller-buttons"
|
|
||||||
multiple
|
|
||||||
formControlName="comments"
|
|
||||||
>
|
|
||||||
<mat-button-toggle *ngFor="let comment of commentsToExport" [value]="comment.id">
|
<mat-button-toggle *ngFor="let comment of commentsToExport" [value]="comment.id">
|
||||||
<span>{{ comment.name }}</span>
|
<span>{{ comment.name }}</span>
|
||||||
</mat-button-toggle>
|
</mat-button-toggle>
|
||||||
|
@ -51,6 +51,7 @@ export class MotionExportDialogComponent implements OnInit {
|
|||||||
'recommendation',
|
'recommendation',
|
||||||
'category',
|
'category',
|
||||||
'origin',
|
'origin',
|
||||||
|
'tags',
|
||||||
'block',
|
'block',
|
||||||
'polls',
|
'polls',
|
||||||
'id'
|
'id'
|
||||||
|
@ -198,7 +198,7 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
|
|||||||
*/
|
*/
|
||||||
public openExportDialog(): void {
|
public openExportDialog(): void {
|
||||||
const exportDialogRef = this.dialog.open(MotionExportDialogComponent, {
|
const exportDialogRef = this.dialog.open(MotionExportDialogComponent, {
|
||||||
width: '950px',
|
width: '1100px',
|
||||||
maxWidth: '90vw',
|
maxWidth: '90vw',
|
||||||
maxHeight: '90vh',
|
maxHeight: '90vh',
|
||||||
data: this.dataSource
|
data: this.dataSource
|
||||||
|
@ -23,6 +23,7 @@ export type InfoToExport =
|
|||||||
| 'category'
|
| 'category'
|
||||||
| 'block'
|
| 'block'
|
||||||
| 'origin'
|
| 'origin'
|
||||||
|
| 'tags'
|
||||||
| 'polls'
|
| 'polls'
|
||||||
| 'id'
|
| 'id'
|
||||||
| 'allcomments';
|
| 'allcomments';
|
||||||
@ -252,6 +253,25 @@ export class MotionPdfService {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// tags
|
||||||
|
if (motion.tags.length && (!infoToExport || infoToExport.includes('tags'))) {
|
||||||
|
const tags = motion.tags
|
||||||
|
.map(tag => {
|
||||||
|
return tag;
|
||||||
|
})
|
||||||
|
.join(', ');
|
||||||
|
|
||||||
|
metaTableBody.push([
|
||||||
|
{
|
||||||
|
text: `${this.translate.instant('Tags')}:`,
|
||||||
|
style: 'boldText'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: tags
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
// motion block
|
// motion block
|
||||||
if (motion.motion_block && (!infoToExport || infoToExport.includes('block'))) {
|
if (motion.motion_block && (!infoToExport || infoToExport.includes('block'))) {
|
||||||
metaTableBody.push([
|
metaTableBody.push([
|
||||||
|
Loading…
Reference in New Issue
Block a user