2018-08-09 16:03:24 +02:00
|
|
|
<mat-toolbar color='primary'>
|
|
|
|
|
2018-08-21 14:56:26 +02:00
|
|
|
<button (click)='editMotionButton()' [ngClass]="{'save-button': editMotion}" class='generic-mini-button on-transition-fade'
|
|
|
|
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-21 14:56:26 +02:00
|
|
|
<span *ngIf="newMotion">New </span>
|
2018-08-20 18:13:28 +02:00
|
|
|
<span translate>Motion</span>
|
2018-08-22 11:26:53 +02:00
|
|
|
<span *ngIf="motion && !editMotion"> {{motion.identifier}}</span>
|
2018-08-21 14:56:26 +02:00
|
|
|
<span *ngIf="editMotion && !newMotion"> {{metaInfoForm.get('identifier').value}}</span>
|
2018-08-20 18:13:28 +02:00
|
|
|
<span>:</span>
|
2018-08-31 15:33:41 +02:00
|
|
|
<span *ngIf="motion && !editMotion"> {{motion.title}}</span>
|
|
|
|
<span *ngIf="editMotion"> {{contentForm.get('title').value}}</span>
|
2018-08-09 16:03:24 +02:00
|
|
|
<br>
|
2018-08-22 11:26:53 +02:00
|
|
|
<div *ngIf="motion" class='motion-submitter'>
|
|
|
|
<span translate>by</span> {{motion.submitterAsUser}}
|
2018-08-09 16:03:24 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-22 16:03:49 +02:00
|
|
|
<span class='spacer'></span>
|
|
|
|
|
|
|
|
<button class='on-transition-fade' mat-icon-button [matMenuTriggerFor]="motionExtraMenu">
|
|
|
|
<fa-icon icon='ellipsis-v'></fa-icon>
|
|
|
|
</button>
|
|
|
|
<mat-menu #motionExtraMenu="matMenu">
|
|
|
|
<!-- TODO the functions for the buttons -->
|
|
|
|
<button mat-menu-item translate>Export As...</button>
|
|
|
|
<button mat-menu-item translate>Project</button>
|
|
|
|
<mat-divider></mat-divider>
|
|
|
|
<button mat-menu-item class='deleteMotionButton' (click)='deleteMotionButton()' translate>DeleteMotion</button>
|
|
|
|
</mat-menu>
|
2018-08-09 16:03:24 +02:00
|
|
|
</mat-toolbar>
|
|
|
|
|
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-->
|
|
|
|
<mat-expansion-panel #metaInfoPanel [expanded]='this.editMotion && this.newMotion' class='meta-info-block meta-info-panel'>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<!-- 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
|
|
|
<!-- Personal Note -->
|
|
|
|
<mat-expansion-panel>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<!-- Content -->
|
|
|
|
<mat-expansion-panel #contentPanel [expanded]='true' class='content-panel'>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<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-09-03 14:23:54 +02:00
|
|
|
<!-- Personal Note -->
|
|
|
|
<div class="personal-note">
|
|
|
|
<mat-card>
|
|
|
|
<mat-card-header>
|
|
|
|
<mat-card-title>
|
|
|
|
<span translate>Personal Note</span>
|
|
|
|
<div class="title-right">
|
|
|
|
<fa-icon icon="pen" [fixedWidth]=" true"></fa-icon>
|
|
|
|
<fa-icon icon="ellipsis-v" [fixedWidth]="true"></fa-icon>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</mat-card-title>
|
|
|
|
</mat-card-header>
|
|
|
|
<mat-card-content>
|
|
|
|
Hier könnte ihre Werbung stehen. 1 2 3 4 5 6 Hier könnte ihre Werbung stehen. 1 2 3 4 5 6
|
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
<div class="desktop-right ">
|
|
|
|
|
|
|
|
<!-- Content -->
|
|
|
|
<mat-card class="content-panel">
|
|
|
|
<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">
|
|
|
|
<h3 translate>Submitters</h3>
|
|
|
|
{{motion.submitterAsUser}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Supporter -->
|
|
|
|
<div *ngIf='motion && motion.supporters_id && motion.supporters_id.length > 0 || editMotion'>
|
|
|
|
<h3 translate>Supporters</h3>
|
|
|
|
<!-- print all motion supporters -->
|
|
|
|
</div>
|
2018-08-13 13:49:38 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- State -->
|
|
|
|
<div *ngIf='!newMotion && motion && motion.workflow && motion.state_id || editMotion'>
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3 translate>State</h3>
|
|
|
|
{{motion.state}}
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-form-field *ngIf="editMotion && !newMotion">
|
|
|
|
<mat-select placeholder='State' formControlName='state_id'>
|
|
|
|
<mat-option [value]="motionCopy.state.id">{{motionCopy.state}}</mat-option>
|
|
|
|
<mat-divider></mat-divider>
|
|
|
|
<mat-option *ngFor="let state of motionCopy.nextStates" [value]="state.id">{{state}}</mat-option>
|
|
|
|
<mat-divider></mat-divider>
|
|
|
|
<mat-option>
|
|
|
|
<fa-icon icon='exclamation-triangle'></fa-icon> <span translate>Reset State</span>
|
|
|
|
</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 -->
|
|
|
|
<div *ngIf='motion && motion.recomBy && (motion.recommendation_id || editMotion)'>
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3>{{motion.recomBy}}</h3>
|
|
|
|
{{motion.recommendation.name}}
|
2018-08-14 12:55:45 +02:00
|
|
|
</div>
|
2018-09-03 14:23:54 +02:00
|
|
|
<mat-form-field *ngIf="motion && editMotion">
|
|
|
|
<mat-select placeholder='Recommendation' formControlName='recommendation_id'>
|
|
|
|
<mat-option *ngFor="let state of motionCopy.nextStates" [value]="state.id">{{state}}</mat-option>
|
|
|
|
<mat-divider></mat-divider>
|
2018-08-14 12:55:45 +02:00
|
|
|
|
2018-09-03 14:23:54 +02:00
|
|
|
<!-- TODO has no effect -->
|
|
|
|
<mat-option>
|
|
|
|
<fa-icon icon='exclamation-triangle'></fa-icon>
|
|
|
|
<span translate>Reset recommendation</span>
|
|
|
|
</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Category -->
|
|
|
|
<div *ngIf="motion && motion.category_id || editMotion">
|
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h3 translate> Category</h3>
|
|
|
|
{{motion.category}}
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="motion && editMotion">
|
|
|
|
<mat-select placeholder='Category' formControlName='category_id'>
|
|
|
|
<mat-option>None</mat-option>
|
|
|
|
<mat-divider></mat-divider>
|
|
|
|
<mat-option *ngFor="let cat of getMotionCategories()" [value]="cat.id">{{cat}}</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
</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>
|
|
|
|
<form [formGroup]='contentForm' (ngSubmit)='saveMotion()'>
|
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-08-31 15:33:41 +02:00
|
|
|
<h2>{{motion.title}}</h2>
|
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
|
|
|
<input matInput 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 -->
|
|
|
|
<h3 translate>The assembly may decide:</h3>
|
|
|
|
<div *ngIf='motion && !editMotion'>
|
2018-08-31 15:33:41 +02:00
|
|
|
<div [innerHtml]='motion.text'></div>
|
2018-09-03 14:23:54 +02:00
|
|
|
</div>
|
|
|
|
<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-09-03 14:23:54 +02:00
|
|
|
<div *ngIf='!editMotion'>
|
|
|
|
<h4 translate>Reason</h4>
|
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>
|