Merge pull request #4375 from tsiegleauq/pdf-motion-tag
Add tags to motion pdf
This commit is contained in:
commit
3bcb3de249
@ -49,6 +49,7 @@
|
||||
<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="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="block"> <span translate>Motion block</span> </mat-button-toggle>
|
||||
<mat-button-toggle value="poll" #votingResultButton>
|
||||
@ -59,11 +60,7 @@
|
||||
</div>
|
||||
<div *ngIf="commentsToExport.length && exportForm.get('format').value === 'pdf'">
|
||||
<p class="toggle-group-head" translate>Comments</p>
|
||||
<mat-button-toggle-group
|
||||
class="smaller-buttons"
|
||||
multiple
|
||||
formControlName="comments"
|
||||
>
|
||||
<mat-button-toggle-group class="smaller-buttons" multiple formControlName="comments">
|
||||
<mat-button-toggle *ngFor="let comment of commentsToExport" [value]="comment.id">
|
||||
<span>{{ comment.name }}</span>
|
||||
</mat-button-toggle>
|
||||
|
@ -51,6 +51,7 @@ export class MotionExportDialogComponent implements OnInit {
|
||||
'recommendation',
|
||||
'category',
|
||||
'origin',
|
||||
'tags',
|
||||
'block',
|
||||
'polls',
|
||||
'id'
|
||||
|
@ -198,7 +198,7 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
|
||||
*/
|
||||
public openExportDialog(): void {
|
||||
const exportDialogRef = this.dialog.open(MotionExportDialogComponent, {
|
||||
width: '950px',
|
||||
width: '1100px',
|
||||
maxWidth: '90vw',
|
||||
maxHeight: '90vh',
|
||||
data: this.dataSource
|
||||
|
@ -23,6 +23,7 @@ export type InfoToExport =
|
||||
| 'category'
|
||||
| 'block'
|
||||
| 'origin'
|
||||
| 'tags'
|
||||
| 'polls'
|
||||
| 'id'
|
||||
| '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
|
||||
if (motion.motion_block && (!infoToExport || infoToExport.includes('block'))) {
|
||||
metaTableBody.push([
|
||||
|
Loading…
Reference in New Issue
Block a user