forked from ezsystems/PlatformUIBundle
/
relationlist.hbt
73 lines (73 loc) · 4.15 KB
/
relationlist.hbt
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<div class="pure-g ez-editfield-row ez-asynchronousview">
<div class="pure-u ez-editfield-infos">
<label for="ez-field-{{ content.contentId }}-{{ fieldDefinition.identifier }}">
<p class="ez-fielddefinition-name">
{{ translate_property fieldDefinition.names }}{{#if isRequired}}*{{/if}}:
</p>
<p class="ez-editfield-not-translatable ez-font-icon">{{translate "fieldedit.notTranslatable" "fieldedit"}}</p>
<p class="ez-editfield-error-message"> </p>
<p class="ez-field-description is-showing-description">
{{ translate_property fieldDefinition.descriptions }}
</p>
<p class="ez-relationlist-help">
{{translate "relationlist.help" "fieldedit"}}
</p>
</label>
</div>
<div class="pure-u ez-editfield-input-area ez-default-error-style">
<div class="ez-editfield-input"><div class="ez-relation-input-ui">
{{#if isEmpty}}
<p class="ez-relation-empty">{{translate "relationlist.empty" "fieldedit"}}</p>
{{else}}
{{#if isLoaded }}
{{#if relatedContents }}
<table class="pure-table pure-table-striped ez-relationlist-contents">
<thead>
<tr>
<th>{{translate "relationlist.table.name" "fieldedit"}}</th>
<th>{{translate "relationlist.table.published" "fieldedit"}}</th>
<th>{{translate "relationlist.table.modified" "fieldedit"}}</th>
<th></th>
</tr>
</thead>
<tbody>
{{#each relatedContents}}
<tr class="ez-relation-content" data-content-id="{{id}}">
<td class="ez-relation-content-name" data-icon="" title="{{ name }}">{{ name }}</td>
<td class="ez-relation-property">{{ publishedDate }}</td>
<td class="ez-relation-property">{{ lastModificationDate }}</td>
<td class="ez-relation-remove-content">
<button data-content-id="{{id}}" class=" ez-button ez-button-delete ez-font-icon pure-button" {{#if ../isNotTranslatable}}disabled="disabled"{{/if}}>
{{translate "relationlist.remove" "fieldedit"}}
</button>
</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
{{#if loadingError}}
<p class="ez-asynchronousview-error ez-font-icon">
{{translate "relationlist.error" "fieldedit"}}
<button class="ez-asynchronousview-retry ez-button ez-font-icon pure-button">
{{translate "relationlist.retry" "fieldedit"}}
</button>
</p>
{{else}}
<p class="ez-relation-empty">{{translate "relationlist.empty" "fieldedit"}}</p>
{{/if}}
{{/if}}
{{else}}
<p class="ez-font-icon ez-asynchronousview-loading">
{{translate "relationlist.loading" "fieldedit"}}
</p>
{{/if}}
{{/if}}
<p class="ez-relation-tools">
<button class="ez-relation-discover ez-button ez-button-height ez-button-tree ez-font-icon pure-button" {{#if isNotTranslatable}}disabled="disabled"{{/if}}>
{{translate "relationlist.select" "fieldedit"}}
</button>
</p>
</div></div>
</div>
</div>