-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathindex-step.hbs
More file actions
59 lines (52 loc) · 1.64 KB
/
index-step.hbs
File metadata and controls
59 lines (52 loc) · 1.64 KB
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
{{#if authorPage}}
<div class="shareHistoryBtn">
{{#link-to 'patterns' class="history-index-btn btn"}}
{{t "history.step.index.shareButtonText"}}
{{/link-to}}
</div>
{{else}}
<h3 class="centered">{{authorName}}'s Health History</h3>
{{/if}}
{{#each patterns as |pattern|}}
<div class='pattern-block'>
<span class="pattern-name">{{pattern.name}}</span>
<span class='pattern-edit' {{action 'edit' pattern}}>Edit</span>
</div>
{{#with (find-by 'pattern_id' pattern.id chartData) as |data|}}
<div class='chart-legend'>
{{#each data.series as |item|}}
{{pattern/chart-legend-item item=item}}
{{/each}}
</div>
{{#pattern/chart-group data=data
startAt=startAt
endAt=endAt
colorIds=colorIds
backgroundMargin=backgroundMargin
daysRangeOffset=daysRangeOffset
as |chart|}}
{{#each chart.data.series as |item index|}}
{{pattern/chart-item data=item index=index chart=chart}}
{{/each}}
{{/pattern/chart-group}}
{{/with}}
{{/each}}
{{#if authorPage}}
<div class="newPatternLink">
<button class="history-index-btn btn" {{action "newPattern"}}>
{{t "history.step.index.newPatternText"}}
</button>
</div>
{{/if}}
{{ember-ic-you triggerDistance=40}}
{{#if loadingPatterns}}
{{partial "application/three-bounce-spinner"}}
{{/if}}
{{chart-navigation
endAt=endAt
startAt=startAt
patternNavbar=true
onNavigate=(action 'navigate')
onChangeStartAt=(action (mut startAt))
onChangeEndAt=(action (mut endAt))
}}