2018-10-05 16:34:08 +02:00
|
|
|
<os-head-bar [nav]="false" [backButton]=true [allowEdit]="opCanEdit()" [editMode]="editMotion" (editEvent)="setEditMode($event)"
|
|
|
|
(saveEvent)="saveMotion()">
|
|
|
|
|
|
|
|
<!-- Title -->
|
|
|
|
<div class="title-slot">
|
|
|
|
<h2 *ngIf="motion && !newMotion">
|
|
|
|
<span translate>Motion</span>
|
|
|
|
<!-- Whitespace between "Motion" and identifier -->
|
|
|
|
<span> </span>
|
|
|
|
<span *ngIf="!editMotion">{{ motion.identifier }}</span>
|
|
|
|
<span *ngIf="editMotion">{{ metaInfoForm.get("identifier").value }}</span>
|
|
|
|
</h2>
|
|
|
|
<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-10-05 16:34:08 +02:00
|
|
|
<!-- Back and forth buttons-->
|
|
|
|
<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-05 16:34:08 +02:00
|
|
|
<button mat-menu-item>
|
|
|
|
<mat-icon>picture_as_pdf</mat-icon>
|
|
|
|
<span translate>PDF</span>
|
|
|
|
</button>
|
|
|
|
<button mat-menu-item>
|
|
|
|
<!-- possible icons: screen_share, cast, videocam -->
|
|
|
|
<mat-icon>videocam</mat-icon>
|
|
|
|
<span translate>Project</span>
|
|
|
|
</button>
|
2018-08-22 16:03:49 +02:00
|
|
|
<mat-divider></mat-divider>
|
2018-10-05 16:34:08 +02:00
|
|
|
<button mat-menu-item class='red-warning-text' (click)='deleteMotionButton()'>
|
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
<span translate>Delete</span>
|
|
|
|
</button>
|
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>
|
|
|
|
<h2 *ngIf="editMotion">{{ contentForm.get("title").value }}</h2>
|
|
|
|
</div>
|
2018-08-09 16:03:24 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<ng-container *ngIf="vp.isMobile ; then mobileView; else desktopView"></ng-container>
|
|
|
|
|
|
|
|
<ng-template #mobileView>
|
|
|
|
<mat-accordion multi='true' class='on-transition-fade'>
|
|
|
|
|
|
|
|
<!-- MetaInfo Panel-->
|
2018-10-05 16:34:08 +02:00
|
|
|
<mat-expansion-panel #metaInfoPanel [expanded]="this.editMotion" class='meta-info-block meta-info-panel'>
|
|
|
|
<!-- <mat-expansion-panel #metaInfoPanel [expanded]="this.editReco && this.newReco" 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-10-16 12:41:46 +02:00
|
|
|
<os-motion-comments [motion]="motion"></os-motion-comments>
|
|
|
|
<os-personal-note [motion]="motion"></os-personal-note>
|
2018-09-03 14:23:54 +02:00
|
|
|
|
|
|
|
<!-- Content -->
|
2018-10-05 16:34:08 +02: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>
|
|
|
|
</mat-accordion>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #desktopView>
|
|
|
|
<div class="desktop-view">
|
|
|
|
<div class="desktop-left on-transition-fade">
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- 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-10-16 12:41:46 +02:00
|
|
|
<os-motion-comments [motion]="motion"></os-motion-comments>
|
|
|
|
<os-personal-note [motion]="motion"></os-personal-note>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
<div class="desktop-right ">
|
|
|
|
|
|
|
|
<!-- Content -->
|
2018-10-05 16:34:08 +02:00
|
|
|
<mat-card>
|
2018-09-03 14:23:54 +02:00
|
|
|
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
|
|
|
</mat-card>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #metaInfoTemplate>
|
|
|
|
<form [formGroup]='metaInfoForm' (ngSubmit)='saveMotion()'>
|
|
|
|
|
|
|
|
<!-- Identifier -->
|
|
|
|
<div *ngIf="editMotion && !newMotion">
|
|
|
|
<!-- <div *ngIf="editMotion"> -->
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3 translate>Identifier</h3>
|
|
|
|
{{motion.identifier}}
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-form-field *ngIf="editMotion">
|
|
|
|
<input matInput placeholder='Identifier' formControlName='identifier' [value]='motionCopy.identifier'>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Submitter -->
|
|
|
|
<div *ngIf="motion && motion.submitters || editMotion">
|
2018-09-13 07:57:38 +02:00
|
|
|
<div *ngIf="editMotion && newMotion">
|
|
|
|
<div *ngIf="motion && editMotion">
|
2018-09-20 12:25:37 +02:00
|
|
|
<os-search-value-selector ngDefaultControl [form]="metaInfoForm" [formControl]="this.metaInfoForm.get('submitters_id')"
|
|
|
|
[multiple]="true" listname="Submitter" [InputListValues]="this.submitterObserver"></os-search-value-selector>
|
2018-09-13 07:57:38 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="!editMotion || !newMotion">
|
|
|
|
<h3 translate>Submitters</h3>
|
2018-09-13 09:23:57 +02:00
|
|
|
<ul *ngFor="let submitter of motion.submitters">
|
|
|
|
<li>{{submitter.full_name}}</li>
|
2018-09-13 07:57:38 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Supporter -->
|
2018-09-04 14:55:07 +02:00
|
|
|
<div *ngIf='motion && motion.hasSupporters() || editMotion'>
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- print all motion supporters -->
|
2018-09-13 07:57:38 +02:00
|
|
|
<div *ngIf="editMotion">
|
|
|
|
<div *ngIf="motion && editMotion">
|
2018-09-20 12:25:37 +02:00
|
|
|
<os-search-value-selector ngDefaultControl [form]="metaInfoForm" [formControl]="this.metaInfoForm.get('supporters_id')"
|
|
|
|
[multiple]="true" listname="Supporter" [InputListValues]="this.supporterObserver"></os-search-value-selector>
|
2018-09-13 07:57:38 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="!editMotion && motion.hasSupporters()">
|
|
|
|
<h3 translate>Supporters</h3>
|
2018-09-13 09:23:57 +02:00
|
|
|
<ul *ngFor="let supporter of motion.supporters">
|
|
|
|
<li>{{supporter.full_name}}</li>
|
2018-09-13 07:57:38 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
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-05 17:43:44 +01:00
|
|
|
<div *ngIf='motion && motion.state'>
|
|
|
|
<mat-form-field *ngIf="!editMotion && !newMotion">
|
|
|
|
<mat-select placeholder='State' formControlName='state_id' (selectionChange)="onChangeState($event)">
|
|
|
|
<mat-option [value]="motion.state_id">{{motion.state}}</mat-option>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-divider></mat-divider>
|
2018-11-05 17:43:44 +01:00
|
|
|
<mat-option *ngFor="let state of motion.nextStates" [value]="state.id">{{state}}</mat-option>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-divider></mat-divider>
|
2018-11-05 17:43:44 +01:00
|
|
|
<mat-option [value]="null">
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>replay</mat-icon><span translate>Reset State</span>
|
2018-09-03 14:23:54 +02:00
|
|
|
</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- Recommendation -->
|
|
|
|
<!-- The suggestion of the work group weather or not a motion should be accepted -->
|
2018-11-05 17:43:44 +01:00
|
|
|
<div *ngIf='motion && motion.state && recommender'>
|
|
|
|
<mat-form-field *ngIf="!editMotion && !newMotion">
|
|
|
|
<mat-select [placeholder]=recommender formControlName='recommendation_id' (selectionChange)="onChangerRecommenderState($event)">
|
|
|
|
<mat-option *ngFor="let state of motion.possibleRecommendations" [value]="state.id">{{state}}</mat-option>
|
2018-09-03 14:23:54 +02:00
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Category -->
|
2018-10-05 16:34:08 +02:00
|
|
|
<div *ngIf="motion && motion.category_id || editMotion">
|
2018-09-03 14:23:54 +02:00
|
|
|
<div *ngIf='!editMotion'>
|
2018-09-19 15:18:57 +02:00
|
|
|
<h3 translate>Category</h3>
|
2018-09-03 14:23:54 +02:00
|
|
|
{{motion.category}}
|
|
|
|
</div>
|
2018-09-13 07:57:38 +02:00
|
|
|
<div *ngIf="editMotion">
|
2018-09-20 12:25:37 +02:00
|
|
|
<os-search-value-selector ngDefaultControl [form]="metaInfoForm" [formControl]="this.metaInfoForm.get('category_id')"
|
|
|
|
[multiple]="false" listname="Category" [InputListValues]="this.categoryObserver"></os-search-value-selector>
|
2018-09-13 07:57:38 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Origin -->
|
|
|
|
<div *ngIf="motion && motion.origin || editMotion">
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3 translate> Origin</h3>
|
|
|
|
{{motion.origin}}
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion">
|
|
|
|
<input matInput placeholder='Origin' formControlName='origin' [value]='motionCopy.origin'>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Voting -->
|
|
|
|
<!-- <div *ngIf='motion.polls && motion.polls.length > 0 || editMotion'>
|
2018-08-14 12:55:45 +02:00
|
|
|
<h3 translate>Voting</h3>
|
2018-08-16 17:03:39 +02:00
|
|
|
</div> -->
|
2018-09-03 14:23:54 +02:00
|
|
|
</form>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #contentTemplate>
|
2018-09-28 15:10:48 +02:00
|
|
|
<form class="motion-content" [formGroup]='contentForm' (ngSubmit)='saveMotion()'>
|
|
|
|
|
|
|
|
<!-- Line Number and Diff buttons-->
|
|
|
|
<div class="motion-text-controls">
|
|
|
|
<button type="button" mat-icon-button [matMenuTriggerFor]="lineNumberingMenu">
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>format_list_numbered</mat-icon>
|
2018-09-28 15:10:48 +02:00
|
|
|
</button>
|
|
|
|
<button type="button" mat-icon-button [matMenuTriggerFor]="changeRecoMenu">
|
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-09-03 14:23:54 +02:00
|
|
|
<!-- Title -->
|
2018-08-31 15:33:41 +02:00
|
|
|
<div *ngIf="motion && motion.title || editMotion">
|
2018-09-03 14:23:54 +02:00
|
|
|
<div *ngIf='!editMotion'>
|
2018-10-05 16:34:08 +02:00
|
|
|
<h4>{{motion.title}}</h4>
|
2018-08-16 17:03:39 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-form-field *ngIf="editMotion" class="wide-form">
|
2018-10-05 16:34:08 +02:00
|
|
|
<input matInput osAutofocus placeholder='Title' formControlName='title' [value]='motionCopy.title'>
|
2018-08-16 17:03:39 +02:00
|
|
|
</mat-form-field>
|
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Text -->
|
|
|
|
<!-- TODO: this is a config variable. Read it out -->
|
2018-10-05 16:34:08 +02:00
|
|
|
<span class="text-prefix-label" translate>The assembly may decide:</span>
|
2018-09-30 18:43:20 +02:00
|
|
|
<ng-container *ngIf='motion && !editMotion'>
|
2018-10-05 16:34:08 +02:00
|
|
|
<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>
|
2018-09-30 18:43:20 +02:00
|
|
|
<div *ngIf="!isLineNumberingOutside() || !isRecoModeOriginal()" [innerHTML]="getFormattedText()"></div>
|
|
|
|
</div>
|
2018-10-05 16:34:08 +02: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-09-03 14:23:54 +02:00
|
|
|
<mat-form-field *ngIf="motion && editMotion" class="wide-form">
|
2018-08-31 15:33:41 +02:00
|
|
|
<textarea matInput placeholder='Motion Text' formControlName='text' [value]='motionCopy.text'></textarea>
|
2018-09-03 14:23:54 +02:00
|
|
|
</mat-form-field>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Reason -->
|
2018-08-31 15:33:41 +02:00
|
|
|
<div *ngIf="motion && motion.reason || editMotion">
|
2018-10-05 16:34:08 +02:00
|
|
|
<h5 translate>Reason</h5>
|
|
|
|
<div class="motion-text" *ngIf='!editMotion'>
|
2018-08-31 15:33:41 +02:00
|
|
|
<div [innerHtml]='motion.reason'></div>
|
2018-08-16 17:03:39 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-form-field *ngIf="editMotion" class="wide-form">
|
2018-08-31 15:33:41 +02:00
|
|
|
<textarea matInput placeholder="Reason" formControlName='reason' [value]='motionCopy.reason'></textarea>
|
2018-09-03 14:23:54 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
2018-08-09 16:03:24 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
</form>
|
|
|
|
</ng-template>
|
2018-09-28 15:10:48 +02:00
|
|
|
|
|
|
|
<!-- Line number Menu -->
|
|
|
|
<mat-menu #lineNumberingMenu="matMenu">
|
|
|
|
<button mat-menu-item translate (click)=setLineNumberingMode(0)>None</button>
|
|
|
|
<button mat-menu-item translate (click)=setLineNumberingMode(1)>Inline</button>
|
|
|
|
<button mat-menu-item translate (click)=setLineNumberingMode(2)>Outside</button>
|
|
|
|
</mat-menu>
|
|
|
|
|
|
|
|
<!-- Diff View Menu -->
|
|
|
|
<mat-menu #changeRecoMenu="matMenu">
|
|
|
|
<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>
|
|
|
|
</mat-menu>
|