cms/app-client/app/templates/components/notice-component.hbs
author ymh <ymh.work@gmail.com>
Tue, 11 Oct 2016 16:39:11 +0200
changeset 327 13564bb13ccc
parent 326 226d5b17a119
child 339 766af1228b05
permissions -rw-r--r--
In the serialized document the lan files id 'languages' and not 'language'
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
231
b883755cc0b8 Remove close button on notice when not from queryparams
Chloe Laisne <chloe.laisne@gmail.com>
parents: 228
diff changeset
     1
{{#if model}}
228
a2497a2b6224 Notice display logic and design
Chloe Laisne <chloe.laisne@gmail.com>
parents: 226
diff changeset
     2
<i class="fa fa-close" {{action 'close'}}>Close</i>
231
b883755cc0b8 Remove close button on notice when not from queryparams
Chloe Laisne <chloe.laisne@gmail.com>
parents: 228
diff changeset
     3
{{/if}}
b883755cc0b8 Remove close button on notice when not from queryparams
Chloe Laisne <chloe.laisne@gmail.com>
parents: 228
diff changeset
     4
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     5
<h2>Notice</h2>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     6
<h3>{{ item.title }}</h3>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     7
<table>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     8
<tr>
269
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
     9
	<td class="title">Editeur{{#if (if-operator item.publishers.length '>' 1)}}s{{/if}}</td>
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    10
	<td>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    11
		<ul>
269
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    12
		{{#each item.publishers as |publisher|}}
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    13
			<li>{{ publisher }}</li>
269
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    14
		{{/each}}
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    15
		</ul>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    16
	</td>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    17
</tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    18
<tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    19
	<td class="title">Langue</td>
327
13564bb13ccc In the serialized document the lan files id 'languages' and not 'language'
ymh <ymh.work@gmail.com>
parents: 326
diff changeset
    20
	<td>{{#each item.languages as |lang index|}}{{if index ", "}}{{doc-language url=lang class="language"}}{{/each}}</td>
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    21
</tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    22
<tr>
269
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    23
	<td class="title">Sujet{{#if (if-operator item.computedSubjects.length '>' 1)}}s{{/if}}</td>
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    24
	<td>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    25
		<ul>
270
6ddc52965fb8 Remove participants doubles
Chloe Laisne <chloe.laisne@gmail.com>
parents: 269
diff changeset
    26
		{{#each subjects as |subject|}}
269
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    27
			<li>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    28
			{{#if subject.url}}
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    29
				<a href="{{subject.url}}" target="_blank">
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    30
					{{#if subject.name}}{{subject.name}}{{else}}{{component (getLinkType subject.url) url=subject.url}}{{/if}}
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    31
				</a>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    32
			{{else}}
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    33
				{{subject.name}}
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    34
			{{/if}}
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    35
			</li>
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    36
		{{/each}}
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    37
		</ul>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    38
	</td>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    39
</tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    40
<tr>
269
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    41
	<td class="title">Enregistré en</td>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    42
	<td>{{ short-date item.issued }}</td>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    43
</tr>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    44
<tr>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    45
	<td class="title">Participant{{#if (if-operator participants.length '>' 1)}}s{{/if}}</td>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    46
	<td>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    47
		<ul>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    48
		{{#each participants as |participant|}}
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    49
			<li>{{ participant.name }} ({{ participant.role }})</li>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    50
		{{/each}}
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    51
		</ul>
9659e91242e1 Add subjects to notice + Background color two notice type + Remove empty notice fields
Chloe Laisne <chloe.laisne@gmail.com>
parents: 231
diff changeset
    52
	</td>
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    53
</tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    54
<tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    55
	<td class="title">Lieu</td>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    56
	<td>{{ location }}</td>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    57
</tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    58
<tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    59
	<td class="title">Durée</td>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    60
	<td>{{to-minutes item.duration}}</td>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    61
</tr>
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    62
</table>