OpenSlides/client/src/app/site/motions/motion-detail/motion-detail.component.html

180 lines
6.9 KiB
HTML
Raw Normal View History

<mat-toolbar color='primary'>
2018-08-16 17:03:39 +02:00
<button (click)='editMotionButton()' class='generic-mini-button on-transition-fade' mat-mini-fab>
<fa-icon *ngIf="!editMotion" icon='pen'></fa-icon>
<fa-icon *ngIf="editMotion" icon='check'></fa-icon>
</button>
<div class='motion-title on-transition-fade'>
2018-08-13 13:49:38 +02:00
<span translate>Motion</span> {{motion.identifier}}: {{motion.currentTitle}}
<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 -->
<mat-expansion-panel #metaInfoPanel [expanded]='true' class='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>
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">
<input matInput #identifier placeholder='Identifier' [value]='motion.identifier'>
</mat-form-field>
</div>
<!-- Submitter -->
<div *ngIf="motion.submitterName || editMotion">
<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>
<!-- 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">
<mat-select placeholder='State' formControlName='state'>
<mat-option *ngFor="let state of motion.possible_states" [value]="state">{{state}}</mat-option>
<mat-divider></mat-divider>
<mat-option>
<fa-icon icon='exclamation-triangle'></fa-icon>
Reset State
</mat-option>
</mat-select>
</mat-form-field>
</div>
2018-08-13 13:49:38 +02:00
2018-08-16 17:03:39 +02:00
<!-- Recommendation -->
<!-- TODO make sure this is only shown if the corresponding setting was set -->
<div *ngIf='motion.recommendation_id && editMotion'>
<h3>
<a [matMenuTriggerFor]="stateMenu">
<span>{{motion.recomBy}}</span>
<fa-icon icon='cog'></fa-icon>
</a>
</h3>
{{motion.recommendation}}
</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">
<mat-select placeholder='Category' formControlName='categoryFormControl'>
<mat-option>None</mat-option>
<mat-divider></mat-divider>
<mat-option *ngFor="let cat of getMotionCategories()" [value]="cat">{{cat}}</mat-option>
</mat-select>
</mat-form-field>
</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">
<input matInput #origin placeholder='Origin' [value]='motion.origin'>
</mat-form-field>
</div>
2018-08-16 17:03:39 +02:00
<!-- Voting -->
<!-- <div *ngIf='motion.polls && motion.polls.length > 0 || editMotion'>
<h3 translate>Voting</h3>
2018-08-16 17:03:39 +02:00
</div> -->
</form>
</mat-expansion-panel>
2018-08-16 17:03:39 +02:00
<!-- Personal Note -->
2018-08-13 13:49:38 +02:00
<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>
2018-08-16 17:03:39 +02:00
<!-- 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>
2018-08-16 17:03:39 +02:00
<div class='expansion-panel-custom-body'>
<!-- Title -->
<div *ngIf="motion.currentTitle || editMotion">
<div *ngIf='!editMotion'>
<h2>{{motion.currentTitle}}</h2>
</div>
<mat-form-field *ngIf="editMotion" class='wide-text'>
<input matInput #title placeholder='Title' [value]='motion.currentTitle'>
</mat-form-field>
</div>
<!-- Text -->
<h3 translate>The assembly may decide:</h3>
<div *ngIf='!editMotion'>
<div [innerHtml]='motion.currentText'></div>
</div>
<mat-form-field *ngIf="editMotion" class='wide-text'>
<textarea matInput #motionText placeholder='Motion Text' [value]='motion.currentText'></textarea>
</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'>
<textarea matInput #reason placeholder="Reason" [value]='motion.currentReason'></textarea>
</mat-form-field>
</div>
</div>
2018-08-13 13:49:38 +02:00
</mat-expansion-panel>
</mat-accordion>
<!-- dummy values -->
<mat-menu #stateMenu="matMenu">
<button mat-menu-item translate>Accept</button>
<button mat-menu-item translate>Reject</button>
<button mat-menu-item translate>Do not decice</button>
</mat-menu>