2018-11-04 11:11:48 +01:00
|
|
|
<os-head-bar
|
|
|
|
[mainButton]="opCanEdit()"
|
|
|
|
mainButtonIcon="edit"
|
|
|
|
[nav]="false"
|
|
|
|
[editMode]="editMotion"
|
|
|
|
(mainEvent)="setEditMode(!editMotion)"
|
|
|
|
(saveEvent)="saveMotion()"
|
|
|
|
>
|
2018-10-05 16:34:08 +02:00
|
|
|
<!-- Title -->
|
|
|
|
<div class="title-slot">
|
|
|
|
<h2 *ngIf="motion && !newMotion">
|
|
|
|
<span translate>Motion</span>
|
|
|
|
<!-- Whitespace between "Motion" and identifier -->
|
2018-11-04 11:11:48 +01:00
|
|
|
<span> </span> <span *ngIf="!editMotion">{{ motion.identifier }}</span>
|
|
|
|
<span *ngIf="editMotion">{{ metaInfoForm.get('identifier').value }}</span>
|
2018-10-05 16:34:08 +02:00
|
|
|
</h2>
|
2018-11-04 11:11:48 +01:00
|
|
|
<h2 *ngIf="newMotion" translate>New motion</h2>
|
2018-08-09 16:03:24 +02:00
|
|
|
</div>
|
2018-08-22 16:03:49 +02:00
|
|
|
|
2018-11-04 11:11:48 +01:00
|
|
|
<!-- Back and forth buttons -->
|
2018-10-05 16:34:08 +02:00
|
|
|
<div *ngIf="!editMotion" class="extra-controls-slot on-transition-fade">
|
|
|
|
<div *ngIf="previousMotion">
|
|
|
|
<button mat-button (click)="navigateToMotion(previousMotion)">
|
|
|
|
<mat-icon>navigate_before</mat-icon>
|
|
|
|
<span>{{ previousMotion.identifier }}</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="nextMotion">
|
|
|
|
<button mat-button (click)="navigateToMotion(nextMotion)">
|
|
|
|
<span>{{ nextMotion.identifier }}</span>
|
|
|
|
<mat-icon>navigate_next</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-09-04 14:55:07 +02:00
|
|
|
</div>
|
2018-10-05 16:34:08 +02:00
|
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
<div class="menu-slot">
|
|
|
|
<button type="button" mat-icon-button [matMenuTriggerFor]="motionExtraMenu">
|
|
|
|
<mat-icon>more_vert</mat-icon>
|
2018-09-04 14:55:07 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
2018-08-22 16:03:49 +02:00
|
|
|
<mat-menu #motionExtraMenu="matMenu">
|
2018-10-23 14:20:29 +02:00
|
|
|
<div *ngIf="motion">
|
|
|
|
<button mat-menu-item>
|
|
|
|
<mat-icon>picture_as_pdf</mat-icon>
|
|
|
|
<span translate>PDF</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button mat-menu-item [routerLink]="getSpeakerLink()">
|
|
|
|
<mat-icon>mic</mat-icon>
|
|
|
|
<span translate>List of speakers</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button mat-menu-item>
|
|
|
|
<!-- possible icons: screen_share, cast, videocam -->
|
|
|
|
<mat-icon>videocam</mat-icon>
|
|
|
|
<span translate>Project</span>
|
|
|
|
</button>
|
|
|
|
|
2018-11-04 11:11:48 +01:00
|
|
|
<button
|
|
|
|
mat-menu-item
|
|
|
|
(click)="createAmendment()"
|
|
|
|
*ngIf="amendmentsEnabled && motion && !motion.isParagraphBasedAmendment()"
|
|
|
|
>
|
|
|
|
<mat-icon>add</mat-icon>
|
2018-11-30 10:23:09 +01:00
|
|
|
<span translate>New amendment</span>
|
2018-11-04 11:11:48 +01:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
mat-menu-item
|
|
|
|
(click)="showAmendmentContext = !showAmendmentContext"
|
|
|
|
*ngIf="motion && motion.isParagraphBasedAmendment()"
|
|
|
|
>
|
|
|
|
<mat-icon>{{ !showAmendmentContext ? 'check_box_outline_blank' : 'check_box' }}</mat-icon>
|
2018-11-30 10:23:09 +01:00
|
|
|
<span translate>Show entire motion text</span>
|
2018-11-04 11:11:48 +01:00
|
|
|
</button>
|
|
|
|
|
2018-10-23 14:20:29 +02:00
|
|
|
<mat-divider></mat-divider>
|
|
|
|
|
2018-11-04 11:11:48 +01:00
|
|
|
<button mat-menu-item class="red-warning-text" (click)="deleteMotionButton()">
|
2018-10-23 14:20:29 +02:00
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
<span translate>Delete</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-08-22 16:03:49 +02:00
|
|
|
</mat-menu>
|
2018-10-05 16:34:08 +02:00
|
|
|
</os-head-bar>
|
|
|
|
|
|
|
|
<!-- Title -->
|
|
|
|
<div *ngIf="motion" class="motion-title on-transition-fade">
|
|
|
|
<h2 *ngIf="!editMotion">{{ motion.title }}</h2>
|
2018-11-04 11:11:48 +01:00
|
|
|
<h2 *ngIf="editMotion">{{ contentForm.get('title').value }}</h2>
|
2018-10-05 16:34:08 +02:00
|
|
|
</div>
|
2018-08-09 16:03:24 +02:00
|
|
|
|
2018-11-04 11:11:48 +01:00
|
|
|
<ng-container *ngIf="vp.isMobile; then: mobileView; else: desktopView"></ng-container>
|
2018-09-03 14:23:54 +02:00
|
|
|
|
|
|
|
<ng-template #mobileView>
|
|
|
|
<mat-accordion multi='true' class='on-transition-fade'>
|
|
|
|
|
|
|
|
<!-- MetaInfo Panel-->
|
2018-11-23 13:59:14 +01:00
|
|
|
<mat-expansion-panel #metaInfoPanel [expanded]="true" class='meta-info-block meta-info-panel'>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-expansion-panel-header>
|
|
|
|
<mat-panel-title>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>info</mat-icon>
|
2018-09-03 14:23:54 +02:00
|
|
|
<span translate>Meta information</span>
|
|
|
|
</mat-panel-title>
|
|
|
|
</mat-expansion-panel-header>
|
|
|
|
|
|
|
|
<!-- Meta info -->
|
|
|
|
<div class="expansion-panel-custom-body">
|
|
|
|
<ng-container *ngTemplateOutlet="metaInfoTemplate"></ng-container>
|
2018-08-16 17:03:39 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
</mat-expansion-panel>
|
2018-08-16 17:03:39 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- Content -->
|
2018-11-04 11:11:48 +01:00
|
|
|
<mat-expansion-panel #contentPanel [expanded]="true">
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-expansion-panel-header>
|
|
|
|
<mat-panel-title>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>format_align_left</mat-icon>
|
2018-09-03 14:23:54 +02:00
|
|
|
<span translate>Content</span>
|
|
|
|
</mat-panel-title>
|
|
|
|
</mat-expansion-panel-header>
|
|
|
|
|
|
|
|
<div class="expansion-panel-custom-body">
|
|
|
|
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
</mat-expansion-panel>
|
2018-11-23 13:59:14 +01:00
|
|
|
|
|
|
|
<os-motion-comments *ngIf="!newMotion" [motion]="motion"></os-motion-comments>
|
|
|
|
<os-personal-note *ngIf="!newMotion" [motion]="motion"></os-personal-note>
|
2018-09-03 14:23:54 +02:00
|
|
|
</mat-accordion>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #desktopView>
|
|
|
|
<div class="desktop-view">
|
|
|
|
<div class="desktop-left on-transition-fade">
|
|
|
|
<!-- Meta Info -->
|
|
|
|
<div class="meta-info-block meta-info-desktop">
|
|
|
|
<ng-container *ngTemplateOutlet="metaInfoTemplate"></ng-container>
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-11-08 11:33:30 +01:00
|
|
|
<os-motion-comments *ngIf="!newMotion" [motion]="motion"></os-motion-comments>
|
|
|
|
<os-personal-note *ngIf="!newMotion" [motion]="motion"></os-personal-note>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
<div class="desktop-right ">
|
|
|
|
<!-- Content -->
|
2018-11-04 11:11:48 +01:00
|
|
|
<mat-card> <ng-container *ngTemplateOutlet="contentTemplate"></ng-container> </mat-card>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #metaInfoTemplate>
|
2018-11-04 11:11:48 +01:00
|
|
|
<form [formGroup]="metaInfoForm" (keydown)="onKeyDown($event)" (ngSubmit)="saveMotion()">
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- Identifier -->
|
|
|
|
<div *ngIf="editMotion && !newMotion">
|
|
|
|
<!-- <div *ngIf="editMotion"> -->
|
2018-11-04 11:11:48 +01:00
|
|
|
<div *ngIf="!editMotion">
|
2018-11-09 09:24:38 +01:00
|
|
|
<h4 translate>Identifier</h4>
|
2018-11-06 16:57:36 +01:00
|
|
|
{{ motion.identifier }}
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-form-field *ngIf="editMotion">
|
2018-11-04 11:11:48 +01:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
placeholder="{{ "Identifier" | translate }}"
|
|
|
|
formControlName="identifier"
|
|
|
|
[value]="motionCopy.identifier"
|
|
|
|
/>
|
2018-09-03 14:23:54 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2018-11-23 13:59:14 +01:00
|
|
|
<!-- Submitters -->
|
2018-11-09 09:24:38 +01:00
|
|
|
<div *ngIf="motion && motion.submitters || newMotion">
|
|
|
|
<div *ngIf="newMotion">
|
2018-11-08 11:33:30 +01:00
|
|
|
<div *osPerms="['motions.can_manage', 'motions.can_manage_metadata']">
|
2018-11-04 11:11:48 +01:00
|
|
|
<os-search-value-selector
|
|
|
|
ngDefaultControl
|
|
|
|
[form]="metaInfoForm"
|
|
|
|
[formControl]="metaInfoForm.get('submitters_id')"
|
|
|
|
[multiple]="true"
|
|
|
|
listname="{{ 'Submitters' | translate }}"
|
|
|
|
[InputListValues]="submitterObserver"
|
|
|
|
></os-search-value-selector>
|
2018-09-13 07:57:38 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-11-09 09:24:38 +01:00
|
|
|
<div *ngIf="!editMotion && !newMotion">
|
|
|
|
<h4 translate>Submitters</h4>
|
2018-11-06 16:57:36 +01:00
|
|
|
<mat-chip-list *ngFor="let submitter of motion.submitters">
|
|
|
|
<mat-chip>{{ submitter.full_name }}</mat-chip>
|
|
|
|
</mat-chip-list>
|
2018-09-13 07:57:38 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
|
2018-11-23 13:59:14 +01:00
|
|
|
<!-- Supporters -->
|
|
|
|
<div *ngIf='motion && minSupporters'>
|
2018-09-13 07:57:38 +02:00
|
|
|
<div *ngIf="editMotion">
|
2018-11-08 11:33:30 +01:00
|
|
|
<div *osPerms="['motions.can_manage', 'motions.can_manage_metadata']">
|
2018-11-04 11:11:48 +01:00
|
|
|
<os-search-value-selector
|
|
|
|
ngDefaultControl
|
|
|
|
[form]="metaInfoForm"
|
|
|
|
[formControl]="metaInfoForm.get('supporters_id')"
|
|
|
|
[multiple]="true"
|
|
|
|
listname="{{ 'Supporters' | translate }}"
|
|
|
|
[InputListValues]="supporterObserver"
|
|
|
|
></os-search-value-selector>
|
2018-09-13 07:57:38 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-11-23 13:59:14 +01:00
|
|
|
<div *ngIf="!editMotion">
|
|
|
|
<h4 *ngIf="perms.isAllowed('support', motion) || motion.hasSupporters()" translate>Supporters</h4>
|
|
|
|
<!-- support button -->
|
|
|
|
<button type="button" *ngIf="perms.isAllowed('support', motion)" (click)=support() mat-raised-button color="primary">
|
|
|
|
<mat-icon>thumb_up</mat-icon>
|
|
|
|
{{ 'Support' | translate }}
|
|
|
|
</button>
|
|
|
|
<!-- unsupport button -->
|
|
|
|
<button type="button" *ngIf="perms.isAllowed('unsupport', motion)" (click)=unsupport() mat-raised-button color="primary">
|
|
|
|
<mat-icon>thumb_down</mat-icon>
|
|
|
|
{{ 'Unsupport' | translate }}
|
|
|
|
</button>
|
|
|
|
<!-- show supporters (TODO: open in dialog) -->
|
|
|
|
<button type="button" *ngIf="motion.hasSupporters()" (click)=openSupportersDialog() mat-button>
|
|
|
|
{{ motion.supporters.length }} {{ 'supporters' | translate }}
|
|
|
|
</button>
|
|
|
|
<p *ngIf="showSupporters">
|
|
|
|
<mat-chip-list *ngFor="let supporter of motion.supporters">
|
|
|
|
<mat-chip>{{ supporter.full_name }}</mat-chip>
|
|
|
|
</mat-chip-list>
|
|
|
|
</p>
|
2018-09-13 07:57:38 +02:00
|
|
|
</div>
|
2018-11-23 13:59:14 +01:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- State -->
|
2018-11-23 13:59:14 +01:00
|
|
|
<div *ngIf='motion && !editMotion'>
|
|
|
|
<h4 translate>State</h4>
|
|
|
|
<mat-menu #stateMenu='matMenu'>
|
|
|
|
<button *ngFor='let state of motion.nextStates' mat-menu-item
|
|
|
|
(click)=setState(state.id)>{{ state.name | translate }}
|
|
|
|
</button>
|
|
|
|
<mat-divider></mat-divider>
|
|
|
|
<button mat-menu-item (click)=setState(null)>
|
|
|
|
<mat-icon>replay</mat-icon> {{ 'Reset state' | translate }}
|
|
|
|
</button>
|
|
|
|
</mat-menu>
|
|
|
|
<mat-basic-chip [matMenuTriggerFor]='stateMenu' [ngClass]="{
|
|
|
|
'green': motion.state.css_class === 'success',
|
|
|
|
'red': motion.state.css_class === 'danger',
|
|
|
|
'grey': motion.state.css_class === 'default',
|
|
|
|
'lightblue': motion.state.css_class === 'primary' }">
|
|
|
|
{{ motion.state.name | translate }}
|
|
|
|
</mat-basic-chip>
|
|
|
|
|
|
|
|
<!--*osPerms="['motions.can_manage', 'motions.can_manage_metadata']; -->
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- Recommendation -->
|
2018-11-23 13:59:14 +01:00
|
|
|
<div *ngIf='motion && recommender && !editMotion'>
|
2018-11-30 10:23:09 +01:00
|
|
|
<h4>{{ recommender }}</h4>
|
2018-11-23 13:59:14 +01:00
|
|
|
<mat-menu #recommendationMenu='matMenu'>
|
|
|
|
<button *ngFor='let recommendation of motion.possibleRecommendations' mat-menu-item
|
|
|
|
(click)=setRecommendation(recommendation.id)>{{ recommendation.recommendation_label | translate }}
|
|
|
|
</button>
|
|
|
|
<mat-divider></mat-divider>
|
|
|
|
<button mat-menu-item (click)=setRecommendation(null)>
|
|
|
|
<mat-icon>replay</mat-icon> {{ 'Reset recommendation' | translate }}
|
|
|
|
</button>
|
|
|
|
</mat-menu>
|
|
|
|
<mat-basic-chip [matMenuTriggerFor]='recommendationMenu' class="bluegrey">
|
|
|
|
{{ motion.recommendation ? (motion.recommendation.recommendation_label | translate) : ('not set' | translate) }}
|
|
|
|
</mat-basic-chip>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Category -->
|
2018-11-23 13:59:14 +01:00
|
|
|
<!-- Disabled during "new motion" since changing has no effect -->
|
|
|
|
<div *ngIf="motion && !editMotion">
|
|
|
|
<h4 translate>Category</h4>
|
|
|
|
<mat-menu #categoryMenu='matMenu'>
|
2018-12-06 12:28:05 +01:00
|
|
|
<button
|
|
|
|
mat-menu-item
|
|
|
|
*ngFor="let category of categoryObserver.value"
|
|
|
|
(click)="setCategory(category.id)"
|
|
|
|
>
|
|
|
|
{{ category }}
|
2018-11-23 13:59:14 +01:00
|
|
|
</button>
|
|
|
|
<button mat-menu-item (click)=setCategory(null)>
|
|
|
|
---
|
|
|
|
</button>
|
|
|
|
</mat-menu>
|
|
|
|
<mat-basic-chip [matMenuTriggerFor]='categoryMenu' class="grey">
|
|
|
|
{{ motion.category ? motion.category : ('not set' | translate) }}
|
|
|
|
</mat-basic-chip>
|
2018-11-22 12:33:40 +01:00
|
|
|
</div>
|
|
|
|
|
2018-12-06 12:28:05 +01:00
|
|
|
<!-- Block -->
|
|
|
|
<div *ngIf="motion && !editMotion">
|
|
|
|
<h4 translate>Motion block</h4>
|
|
|
|
|
|
|
|
<mat-menu #blockMenu='matMenu'>
|
|
|
|
<button
|
|
|
|
mat-menu-item
|
|
|
|
*ngFor="let block of blockObserver.value"
|
|
|
|
(click)="setBlock(block.id)"
|
|
|
|
>
|
|
|
|
{{ block }}
|
|
|
|
</button>
|
|
|
|
<button mat-menu-item (click)="setBlock(null)">
|
|
|
|
---
|
|
|
|
</button>
|
|
|
|
</mat-menu>
|
|
|
|
<mat-basic-chip [matMenuTriggerFor]='blockMenu' class="grey">
|
|
|
|
{{ motion.motion_block ? motion.motion_block : ('not set' | translate) }}
|
|
|
|
</mat-basic-chip>
|
|
|
|
</div>
|
|
|
|
|
2018-11-23 13:59:14 +01:00
|
|
|
<!-- Workflow -->
|
2018-11-22 12:33:40 +01:00
|
|
|
<div *ngIf="editMotion">
|
|
|
|
<div *osPerms="['motions.can_manage', 'motions.can_manage_metadata']">
|
2018-11-04 11:11:48 +01:00
|
|
|
<os-search-value-selector
|
|
|
|
ngDefaultControl
|
|
|
|
[form]="metaInfoForm"
|
|
|
|
[formControl]="metaInfoForm.get('workflow_id')"
|
|
|
|
[multiple]="false"
|
|
|
|
listname="{{ 'Workflow' | translate }}"
|
|
|
|
[InputListValues]="workflowObserver"
|
|
|
|
></os-search-value-selector>
|
2018-09-13 07:57:38 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Origin -->
|
2018-11-04 11:11:48 +01:00
|
|
|
<div *ngIf="(motion && motion.origin) || editMotion">
|
|
|
|
<div *ngIf="!editMotion">
|
2018-11-09 09:24:38 +01:00
|
|
|
<h4 translate>Origin</h4>
|
2018-11-08 11:33:30 +01:00
|
|
|
{{ motion.origin }}
|
|
|
|
</div>
|
|
|
|
<div *osPerms="['motions.can_manage', 'motions.can_manage_metadata']">
|
|
|
|
<mat-form-field *ngIf="editMotion">
|
2018-11-04 11:11:48 +01:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
placeholder="{{ 'Origin' | translate}}"
|
|
|
|
formControlName="origin"
|
|
|
|
[value]="motionCopy.origin"
|
|
|
|
/>
|
2018-11-08 11:33:30 +01:00
|
|
|
</mat-form-field>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Voting -->
|
2018-11-04 11:11:48 +01:00
|
|
|
<!--
|
|
|
|
<div *ngIf='motion.polls && motion.polls.length > 0 || editMotion'>
|
2018-11-09 09:24:38 +01:00
|
|
|
<h4 translate>Voting</h4>
|
2018-11-04 11:11:48 +01:00
|
|
|
</div>
|
|
|
|
-->
|
2018-09-03 14:23:54 +02:00
|
|
|
</form>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #contentTemplate>
|
2018-11-04 11:11:48 +01:00
|
|
|
<form
|
|
|
|
class="motion-content"
|
|
|
|
[formGroup]="contentForm"
|
|
|
|
(clickdown)="onKeyDown($event)"
|
|
|
|
(keydown)="onKeyDown($event)"
|
|
|
|
(ngSubmit)="saveMotion()"
|
|
|
|
>
|
|
|
|
<!-- Line Number and Diff buttons -->
|
2018-10-28 11:06:36 +01:00
|
|
|
<div *ngIf="motion && !editMotion && !motion.isStatuteAmendment()" class="motion-text-controls">
|
2018-11-04 11:11:48 +01:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
mat-icon-button
|
|
|
|
[matMenuTriggerFor]="lineNumberingMenu"
|
|
|
|
matTooltip="{{ 'Line numbering' | translate }}"
|
|
|
|
>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>format_list_numbered</mat-icon>
|
2018-09-28 15:10:48 +02:00
|
|
|
</button>
|
2018-11-04 11:11:48 +01:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
mat-icon-button
|
|
|
|
[matMenuTriggerFor]="changeRecoMenu"
|
|
|
|
matTooltip="{{ 'Change recommendations' | translate }}"
|
|
|
|
*ngIf="motion && !motion.isParagraphBasedAmendment() && allChangingObjects.length > 0"
|
|
|
|
>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>rate_review</mat-icon>
|
2018-09-28 15:10:48 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
2018-08-16 17:03:39 +02:00
|
|
|
|
2018-10-28 11:06:36 +01:00
|
|
|
<!-- Selecting statute paragraphs for amendment -->
|
|
|
|
<div class="statute-amendment-selector" *ngIf="editMotion && statuteParagraphs.length > 0 && statutesEnabled">
|
2018-11-30 10:23:09 +01:00
|
|
|
<mat-checkbox formControlName="statute_amendment" (change)="onStatuteAmendmentChange($event)">
|
|
|
|
{{ 'Statute amendment' | translate }}
|
2018-10-28 11:06:36 +01:00
|
|
|
</mat-checkbox>
|
|
|
|
|
|
|
|
<mat-form-field *ngIf="contentForm.value.statute_amendment">
|
2018-11-04 11:11:48 +01:00
|
|
|
<mat-select
|
2018-11-30 10:23:09 +01:00
|
|
|
[placeholder]="'Statute paragraph' | translate"
|
2018-11-04 11:11:48 +01:00
|
|
|
formControlName="statute_paragraph_id"
|
|
|
|
(valueChange)="onStatuteParagraphChange($event)"
|
|
|
|
>
|
2018-10-28 11:06:36 +01:00
|
|
|
<mat-option *ngFor="let paragraph of statuteParagraphs" [value]="paragraph.id">
|
|
|
|
{{ paragraph.title }}
|
|
|
|
</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- Title -->
|
2018-11-04 11:11:48 +01:00
|
|
|
<div *ngIf="(motion && motion.title) || editMotion">
|
|
|
|
<div *ngIf="!editMotion">
|
|
|
|
<h4>{{ motion.title }}</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<mat-form-field *ngIf="editMotion" class="wide-form">
|
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
osAutofocus
|
|
|
|
placeholder="{{ 'Title' | translate }}"
|
|
|
|
formControlName="title"
|
|
|
|
[value]="motionCopy.title"
|
|
|
|
required
|
|
|
|
/>
|
2018-08-16 17:03:39 +02:00
|
|
|
</mat-form-field>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Text -->
|
2018-11-23 13:59:14 +01:00
|
|
|
<span class="text-prefix-label">{{ preamble | translate }}</span>
|
2018-11-04 11:11:48 +01:00
|
|
|
|
|
|
|
<!-- Regular motions or traditional amendments -->
|
|
|
|
<ng-container
|
|
|
|
*ngIf="motion && !editMotion && !motion.isStatuteAmendment() && !motion.isParagraphBasedAmendment()"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
*ngIf="!isRecoModeDiff()"
|
|
|
|
class="motion-text"
|
|
|
|
[class.line-numbers-none]="isLineNumberingNone()"
|
|
|
|
[class.line-numbers-inline]="isLineNumberingInline()"
|
|
|
|
[class.line-numbers-outside]="isLineNumberingOutside()"
|
|
|
|
>
|
|
|
|
<os-motion-detail-original-change-recommendations
|
|
|
|
*ngIf="isLineNumberingOutside() && isRecoModeOriginal()"
|
|
|
|
[html]="getFormattedTextPlain()"
|
|
|
|
[changeRecommendations]="changeRecommendations"
|
|
|
|
(createChangeRecommendation)="createChangeRecommendation($event)"
|
|
|
|
(gotoChangeRecommendation)="gotoChangeRecommendation($event)"
|
|
|
|
></os-motion-detail-original-change-recommendations>
|
|
|
|
<div
|
|
|
|
*ngIf="!isLineNumberingOutside() || !isRecoModeOriginal()"
|
|
|
|
[innerHTML]="sanitizedText(getFormattedTextPlain())"
|
|
|
|
></div>
|
2018-09-30 18:43:20 +02:00
|
|
|
</div>
|
2018-11-04 11:11:48 +01:00
|
|
|
<os-motion-detail-diff
|
|
|
|
*ngIf="isRecoModeDiff()"
|
|
|
|
[motion]="motion"
|
|
|
|
[changes]="allChangingObjects"
|
|
|
|
[scrollToChange]="scrollToChange"
|
|
|
|
(createChangeRecommendation)="createChangeRecommendation($event)"
|
|
|
|
></os-motion-detail-diff>
|
2018-09-30 18:43:20 +02:00
|
|
|
</ng-container>
|
2018-11-04 11:11:48 +01:00
|
|
|
<div
|
|
|
|
class="motion-text line-numbers-none"
|
|
|
|
*ngIf="motion && !editMotion && motion.isStatuteAmendment()"
|
|
|
|
[innerHTML]="getFormattedStatuteAmendment()"
|
|
|
|
></div>
|
2018-10-28 11:06:36 +01:00
|
|
|
|
2018-11-20 13:31:56 +01:00
|
|
|
<!-- The HTML Editor -->
|
2018-11-04 11:11:48 +01:00
|
|
|
<editor formControlName="text" [init]="tinyMceSettings" *ngIf="motion && editMotion"></editor>
|
|
|
|
|
|
|
|
<!-- Paragraph-based amendments -->
|
|
|
|
<ng-container *ngIf="motion && !editMotion && motion.isParagraphBasedAmendment()">
|
|
|
|
<ng-container *ngTemplateOutlet="paragraphBasedAmendment"></ng-container>
|
|
|
|
</ng-container>
|
2018-09-03 14:23:54 +02:00
|
|
|
|
|
|
|
<!-- Reason -->
|
2018-11-20 13:31:56 +01:00
|
|
|
<div *ngIf="motion || editMotion">
|
|
|
|
<h5 *ngIf="motion.reason || editMotion" translate>Reason</h5>
|
2018-11-04 11:11:48 +01:00
|
|
|
<div class="motion-text" *ngIf="!editMotion"><div [innerHtml]="motion.reason"></div></div>
|
2018-11-20 13:31:56 +01:00
|
|
|
|
|
|
|
<!-- The HTML Editor -->
|
|
|
|
<editor
|
|
|
|
formControlName='reason'
|
|
|
|
[init]="tinyMceSettings"
|
|
|
|
*ngIf="editMotion"
|
|
|
|
></editor>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</ng-template>
|
2018-09-28 15:10:48 +02:00
|
|
|
|
2018-11-04 11:11:48 +01:00
|
|
|
<ng-template #paragraphBasedAmendment>
|
|
|
|
<section class="text-holder">
|
|
|
|
<div class="alert alert-info" *ngIf="this.getAmendedParagraphs().length === 0">
|
|
|
|
<span translate>No changes at the text.</span>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
*ngFor="let paragraph of this.getAmendedParagraphs()"
|
|
|
|
class="motion-text motion-text-diff amendment-view"
|
|
|
|
[class.line-numbers-none]="isLineNumberingNone()"
|
|
|
|
[class.line-numbers-inline]="isLineNumberingInline()"
|
|
|
|
[class.line-numbers-outside]="isLineNumberingOutside()"
|
|
|
|
[class.amendment-context]="showAmendmentContext"
|
|
|
|
>
|
|
|
|
<div class="amendment-context" *ngIf="showAmendmentContext">
|
|
|
|
<div [innerHTML]="getParentMotionRange(1, paragraph.paragraphLineFrom)" class="context"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h3
|
|
|
|
*ngIf="paragraph.diffLineTo === paragraph.diffLineFrom + 1 && !showAmendmentContext"
|
|
|
|
class="amendment-line-header"
|
|
|
|
>
|
|
|
|
<span translate>Line</span> {{ paragraph.diffLineFrom }}:
|
|
|
|
</h3>
|
|
|
|
<h3
|
|
|
|
*ngIf="paragraph.diffLineTo !== paragraph.diffLineFrom + 1 && !showAmendmentContext"
|
|
|
|
class="amendment-line-header"
|
|
|
|
>
|
|
|
|
<span translate>Line</span> {{ paragraph.diffLineFrom }} - {{ paragraph.diffLineTo - 1 }}:
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
<div class="paragraph-context" [innerHtml]="sanitizedText(paragraph.textPre)"></div>
|
|
|
|
<div [innerHtml]="sanitizedText(paragraph.text)"></div>
|
|
|
|
<div class="paragraph-context" [innerHtml]="sanitizedText(paragraph.textPost)"></div>
|
|
|
|
|
|
|
|
<div class="amendment-context" *ngIf="showAmendmentContext">
|
|
|
|
<div [innerHtml]="getParentMotionRange(paragraph.paragraphLineTo, null)"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</ng-template>
|
|
|
|
|
2018-09-28 15:10:48 +02:00
|
|
|
<!-- Line number Menu -->
|
2018-11-23 13:59:14 +01:00
|
|
|
<mat-menu #lineNumberingMenu="matMenu">
|
|
|
|
<div *ngIf="motion">
|
|
|
|
<button mat-menu-item translate (click)=setLineNumberingMode(0) [ngClass]="{ 'selected': motion.lnMode === 0 }">none</button>
|
|
|
|
<button mat-menu-item translate (click)=setLineNumberingMode(1) [ngClass]="{ 'selected': motion.lnMode === 1 }">inline</button>
|
|
|
|
<button mat-menu-item translate (click)=setLineNumberingMode(2) [ngClass]="{ 'selected': motion.lnMode === 2 }">outside</button>
|
|
|
|
</div>
|
2018-09-28 15:10:48 +02:00
|
|
|
</mat-menu>
|
|
|
|
|
|
|
|
<!-- Diff View Menu -->
|
|
|
|
<mat-menu #changeRecoMenu="matMenu">
|
2018-11-04 11:11:48 +01:00
|
|
|
<button mat-menu-item translate (click)="setChangeRecoMode(0)">Original version</button>
|
|
|
|
<button mat-menu-item translate (click)="setChangeRecoMode(1)">Changed version</button>
|
|
|
|
<button mat-menu-item translate (click)="setChangeRecoMode(2)">Diff version</button>
|
|
|
|
<button mat-menu-item translate (click)="setChangeRecoMode(3)">Final version</button>
|
2018-09-28 15:10:48 +02:00
|
|
|
</mat-menu>
|