-
Notifications
You must be signed in to change notification settings - Fork 0
/
catalogLookup.html
94 lines (84 loc) · 4.1 KB
/
catalogLookup.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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<template name="lookup">
<div id="lookup" class="container">
<form class="isbnSearchForm">
<div class="input-group" data-toggle="tooltip"
title="Enter the ISBN or title you'd like to lookup or press scan(mobile only) to read a barcode">
<span class="input-group-addon">ISBN</span>
<input id="isbn" class="form-control" aria-label="ISBN # to search for" type="text">
<span class="input-group-btn">
<button id="searchButton" class="btn btn-default" type="submit">Search</button>
<button id="scanButton" class="btn btn-default visible-xs-inline visible-sm-inline" type="submit">Scan</button>
</span>
</div>
</form>
{{#if searchResults}}
<div class="page-header alert {{#if isMature searchResults.books.[0].age}}alert-danger{{else}}alert-success{{/if}}">
{{#if searchResults.marked}}
<img id="markedCheck" align="left" src="/check.png" />
{{/if}}
<h1>{{searchResults.books.[0].title}}</h1>
</div>
<div aria-multiselectable="true" role="tablist" id="accordion" class="panel-group">
{{#each searchResults.books}}
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="heading{{@index}}">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse{{@index}}"
aria-expanded="true" aria-controls="collapse{{@index}}">
{{origin}}
</a>
</h4>
</div>
<div aria-labelledby="headingOne" role="tabpanel" class="panel-collapse collapse in" id="collapse{{@index}}">
<div class="panel-body">
<table class="table">
<tr>
<td><h3>Ages</h3></td>
<td>
<h3><span class="label {{#if isMature age}}label-danger{{else}}label-success{{/if}}">{{age}}</span></h3>
</td>
</tr>
<tr>
<td><h4>Author</h4></td>
<td>{{author}}</td>
</tr>
<tr>
<td><h4>Publisher</h4></td>
<td>{{publisher}}</td>
</tr>
<tr>
<td><h4>Pub date</h4></td>
<td>{{pubDate}}</td>
</tr>
<tr>
<td><h4>Lexile</h4></td>
<td>{{lexile}}</td>
</tr>
<tr>
<td><h4>ISBN</h4></td>
<td>{{isbn}}</td>
</tr>
<tr>
<td><h4>Pages</h4></td>
<td>{{page}}</td>
</tr>
</table>
</div>
</div>
</div>
{{/each}}
</div>
{{/if}}
</div>
</template>
<template name="bnBook">
{{!-- Aside - possibly iterate over props when prop/name associations are mapped
{#each searchResults.books}}
{{#each objectToPairs this}}
<tr>
<td><h4>{{key}}</h4></td>
<td>{{value}}</td>
</tr>
{{/each}}
{{/each}} --}}
</template>