2018-08-09 16:03:24 +02:00
|
|
|
<mat-toolbar color='primary'>
|
|
|
|
|
2018-08-20 18:13:28 +02:00
|
|
|
<button (click)='editMotionButton()' [ngClass]="{'save-button': editMotion}" class='generic-mini-button on-transition-fade save-button' mat-mini-fab>
|
2018-08-16 17:03:39 +02:00
|
|
|
<fa-icon *ngIf="!editMotion" icon='pen'></fa-icon>
|
|
|
|
<fa-icon *ngIf="editMotion" icon='check'></fa-icon>
|
2018-08-09 16:03:24 +02:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<div class='motion-title on-transition-fade'>
|
2018-08-20 18:13:28 +02:00
|
|
|
<span translate>Motion</span>
|
|
|
|
<span *ngIf="!editMotion"> {{motion.identifier}}</span>
|
|
|
|
<span *ngIf="editMotion"> {{metaInfoForm.get('identifier').value}}</span>
|
|
|
|
<span>:</span>
|
|
|
|
<span *ngIf="!editMotion"> {{motion.currentTitle}}</span>
|
|
|
|
<span *ngIf="editMotion"> {{contentForm.get('currentTitle').value}}</span>
|
2018-08-09 16:03:24 +02:00
|
|
|
<br>
|
|
|
|
<div class='motion-submitter'>
|
|
|
|
<span translate>by</span> {{motion.submitterName}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</mat-toolbar>
|
|
|
|
|
|
|
|
<mat-accordion multi='true' class='on-transition-fade'>
|
2018-08-16 17:03:39 +02:00
|
|
|
|
|
|
|
<!-- MetaInfo -->
|
2018-08-20 18:13:28 +02:00
|
|
|
<!-- <mat-expansion-panel #metaInfoPanel [expanded]='true' class='meta-info-panel'> -->
|
|
|
|
<mat-expansion-panel #metaInfoPanel class='meta-info-panel'>
|
2018-08-09 16:03:24 +02:00
|
|
|
<mat-expansion-panel-header>
|
|
|
|
<mat-panel-title>
|
|
|
|
<fa-icon icon='info-circle' [fixedWidth]="true"></fa-icon>
|
|
|
|
<span translate>Meta information</span>
|
|
|
|
</mat-panel-title>
|
|
|
|
</mat-expansion-panel-header>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-08-16 17:03:39 +02:00
|
|
|
<!-- Meta info -->
|
|
|
|
<form [formGroup]='metaInfoForm' class='expansion-panel-custom-body' (ngSubmit)='saveMotion()'>
|
|
|
|
|
|
|
|
<!-- Identifier -->
|
|
|
|
<div *ngIf="editMotion">
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3 translate>Identifier</h3>
|
|
|
|
{{motion.identifier}}
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion">
|
2018-08-20 18:13:28 +02:00
|
|
|
<input matInput placeholder='Identifier' formControlName='identifier' [value]='motion.identifier'>
|
2018-08-16 17:03:39 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Submitter -->
|
|
|
|
<div *ngIf="motion.submitterName || editMotion">
|
2018-08-14 12:55:45 +02:00
|
|
|
<h3 translate>Submitters</h3>
|
|
|
|
{{motion.submitterName}}
|
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-08-16 17:03:39 +02:00
|
|
|
<!-- Supporter -->
|
|
|
|
<div *ngIf='motion.supporters_id && motion.supporters_id.length > 0 || editMotion'>
|
|
|
|
<h3 translate>Supporters</h3>
|
2018-08-14 12:55:45 +02:00
|
|
|
<!-- print all motion supporters -->
|
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-08-16 17:03:39 +02:00
|
|
|
<!-- State -->
|
|
|
|
<div *ngIf='motion.state_id || editMotion'>
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3 translate>State</h3>
|
|
|
|
{{motion.state.name}}
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion">
|
2018-08-20 18:13:28 +02:00
|
|
|
<mat-select placeholder='State' formControlName='state_id'>
|
|
|
|
<mat-option *ngFor="let state of motion.possible_states" [value]="state.id">{{state}}</mat-option>
|
2018-08-16 17:03:39 +02:00
|
|
|
<mat-divider></mat-divider>
|
|
|
|
<mat-option>
|
|
|
|
<fa-icon icon='exclamation-triangle'></fa-icon>
|
2018-08-20 18:13:28 +02:00
|
|
|
<span translate>Reset State</span>
|
2018-08-16 17:03:39 +02:00
|
|
|
</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-08-16 17:03:39 +02:00
|
|
|
<!-- Recommendation -->
|
2018-08-20 18:13:28 +02:00
|
|
|
<!-- The suggestion of the work group weather or not a motion should be accepted -->
|
|
|
|
<div *ngIf='motion.recomBy && (motion.recommendation_id || editMotion)'>
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3>{{motion.recomBy}}</h3>
|
|
|
|
{{motion.recommendation.name}}
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion">
|
|
|
|
<mat-select placeholder='Recommendation' formControlName='recommendation_id'>
|
|
|
|
<mat-option *ngFor="let state of motion.possible_states" [value]="state.id">{{state}}</mat-option>
|
|
|
|
<mat-divider></mat-divider>
|
|
|
|
<mat-option>
|
|
|
|
<fa-icon icon='exclamation-triangle'></fa-icon>
|
|
|
|
<span translate>Reset recommendation</span>
|
|
|
|
</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
<!-- <h3>
|
2018-08-14 12:55:45 +02:00
|
|
|
<a [matMenuTriggerFor]="stateMenu">
|
|
|
|
<span>{{motion.recomBy}}</span>
|
|
|
|
</a>
|
2018-08-20 18:13:28 +02:00
|
|
|
</h3> -->
|
|
|
|
<!-- {{motion.recommendation}} -->
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-08-16 17:03:39 +02:00
|
|
|
<!-- Category -->
|
|
|
|
<div *ngIf="motion.category_id || editMotion">
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3 translate> Category</h3>
|
|
|
|
{{motion.category}}
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion">
|
2018-08-20 18:13:28 +02:00
|
|
|
<mat-select placeholder='Category' formControlName='category_id'>
|
2018-08-16 17:03:39 +02:00
|
|
|
<mat-option>None</mat-option>
|
|
|
|
<mat-divider></mat-divider>
|
2018-08-20 18:13:28 +02:00
|
|
|
<mat-option *ngFor="let cat of getMotionCategories()" [value]="cat.id">{{cat}}</mat-option>
|
2018-08-16 17:03:39 +02:00
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-08-16 17:03:39 +02:00
|
|
|
<!-- Origin -->
|
|
|
|
<div *ngIf="motion.origin || editMotion">
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3 translate> Origin</h3>
|
|
|
|
{{motion.origin}}
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion">
|
2018-08-20 18:13:28 +02:00
|
|
|
<input matInput placeholder='Origin' formControlName='origin' [value]='motion.origin'>
|
2018-08-14 12:55:45 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2018-08-16 17:03:39 +02:00
|
|
|
<!-- 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> -->
|
|
|
|
</form>
|
2018-08-09 16:03:24 +02:00
|
|
|
</mat-expansion-panel>
|
2018-08-16 17:03:39 +02:00
|
|
|
|
|
|
|
<!-- Personal Note -->
|
2018-08-13 13:49:38 +02:00
|
|
|
<mat-expansion-panel>
|
2018-08-09 16:03:24 +02:00
|
|
|
<mat-expansion-panel-header>
|
|
|
|
<mat-panel-title>
|
|
|
|
<fa-icon icon='file-signature' [fixedWidth]="true"></fa-icon>
|
|
|
|
<span translate>Personal note</span>
|
|
|
|
</mat-panel-title>
|
|
|
|
</mat-expansion-panel-header>
|
|
|
|
TEST
|
|
|
|
</mat-expansion-panel>
|
2018-08-16 17:03:39 +02:00
|
|
|
|
|
|
|
<!-- Content -->
|
|
|
|
<mat-expansion-panel #contentPanel [expanded]='true' class='content-panel'>
|
2018-08-09 16:03:24 +02:00
|
|
|
<mat-expansion-panel-header>
|
|
|
|
<mat-panel-title>
|
|
|
|
<fa-icon icon='align-left' [fixedWidth]="true"></fa-icon>
|
|
|
|
<span translate>Content</span>
|
|
|
|
</mat-panel-title>
|
|
|
|
</mat-expansion-panel-header>
|
|
|
|
|
2018-08-20 18:13:28 +02:00
|
|
|
<form [formGroup]='contentForm' class='expansion-panel-custom-body' (ngSubmit)='saveMotion()'>
|
|
|
|
|
2018-08-16 17:03:39 +02:00
|
|
|
<!-- Title -->
|
|
|
|
<div *ngIf="motion.currentTitle || editMotion">
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h2>{{motion.currentTitle}}</h2>
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion" class='wide-text'>
|
2018-08-20 18:13:28 +02:00
|
|
|
<input matInput placeholder='Title' formControlName='currentTitle' [value]='motion.currentTitle'>
|
2018-08-16 17:03:39 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Text -->
|
2018-08-20 18:13:28 +02:00
|
|
|
<!-- TODO: this is a config variable. Read it out -->
|
2018-08-16 17:03:39 +02:00
|
|
|
<h3 translate>The assembly may decide:</h3>
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<div [innerHtml]='motion.currentText'></div>
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion" class='wide-text'>
|
2018-08-20 18:13:28 +02:00
|
|
|
<textarea matInput placeholder='Motion Text' formControlName='currentText' [value]='motion.currentText'></textarea>
|
2018-08-16 17:03:39 +02:00
|
|
|
</mat-form-field>
|
|
|
|
|
|
|
|
<!-- Reason -->
|
|
|
|
<div *ngIf="motion.currentReason || editMotion">
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h4 translate>Reason</h4>
|
|
|
|
<div [innerHtml]='motion.currentReason'></div>
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editMotion" class='wide-text'>
|
2018-08-20 18:13:28 +02:00
|
|
|
<textarea matInput placeholder="Reason" formControlName='currentReason' [value]='motion.currentReason'></textarea>
|
2018-08-16 17:03:39 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
2018-08-20 18:13:28 +02:00
|
|
|
</form>
|
2018-08-09 16:03:24 +02:00
|
|
|
|
|
|
|
</mat-expansion-panel>
|
2018-08-20 18:13:28 +02:00
|
|
|
</mat-accordion>
|