/
view.html
35 lines (33 loc) · 1.11 KB
/
view.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<button *ngIf="mode !== 'edit'"
(click)="changeMode('edit')">Edit</button>
<button *ngIf="mode !== 'edit'"
(click)="changeMode('advanced-edit')">Advanced edit</button>
<ng-container *ngIf="mode === 'view'">
<h1>{{ context.title }}</h1>
<strong>{{ context.description }}</strong>
<div [innerHTML]="text"></div>
<div *ngIf="context.file && context.file.download">
<h3>Download file</h3>
<a href="#" [download]="context.file" (onDownloaded)="downloaded=true">
{{ context.file.filename }}
</a>
<span *ngIf="downloaded">Download done</span>
</div>
<div *ngIf="context.subjects && context.subjects.length">
<h3 *ngIf="context.subjects && context.subjects.length > 0">Subjects</h3>
<ul>
<li *ngFor="let subject of context.subjects">
{{subject}}
</li>
</ul>
</div>
<plone-comments></plone-comments>
<h3>Workflow</h3>
<plone-workflow></plone-workflow>
</ng-container>
<ng-container *ngIf="mode === 'edit'">
<plone-edit></plone-edit>
</ng-container>
<ng-container *ngIf="mode === 'advanced-edit'">
<custom-sf-edit></custom-sf-edit>
</ng-container>