-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
reorder.hbs
44 lines (41 loc) · 1.58 KB
/
reorder.hbs
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
<div class="column sixteen wide">
<h2 class="ui header center aligned">
{{t 'Reorder Speakers'}}
</h2>
<div class="ui container">
<UiCheckbox
@class="toggle mb-8 ml-4"
@checked={{this.useSwap}}
@onChange={{action (mut this.useSwap)}}
@label={{t "Swap Places"}} />
<button class="ui primary button right floated mr-4" {{action this.save}}>{{t "Save"}}</button>
<button class="ui negative button right floated" {{action (confirm (t 'This will reset the order of all speakers to default unordered list. Continue?') this.reset)}}>{{t "Reset"}}</button>
<SortableObjects
@sortableObjectList={{this.model.speakers}}
@overrideClass="ui stackable grid container four column"
@sortEndAction={{action this.sortEndAction}}
@enableSort={{true}}
@useSwap={{this.useSwap}}>
{{#each this.model.speakers as |speaker|}}
<DraggableObject @content={{speaker}} @overrideClass="column" @isSortable={{true}}>
<div class="ui card pointer">
<div class="image">
<img src="{{speaker.image}}">
</div>
<div class="content">
<div class="header">
<span>{{speaker.name}}</span>
{{#if speaker.isFeatured}}
<i class="right floated star icon"></i>
{{/if}}
</div>
<div class="meta">
<span>{{speaker.positionOrganisation}}</span>
</div>
</div>
</div>
</DraggableObject>
{{/each}}
</SortableObjects>
</div>
</div>