-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathsearch.html
198 lines (182 loc) · 12.2 KB
/
search.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<script type="text/ng-template" id="autocompleteTemplate.html">
<a>
<span ng-if="match.model.posterUrl">
<img ng-src="{{ match.model.posterUrl }}" style="width: 50px"></span> {{ match.model.title
}} <span ng-if="match.model.year">( {{ match.model.year }} )</span>
</a>
</script>
<div ng-if="::availableIndexers.length == 0">
<div class="row d-sm-flex justify-content-center">
<div class="col-xs-20 col-sm-18 col-md-10 alert alert-info" role="alert">
No indexers are configured or enabled. Please go to the <a ui-sref="root.config.indexers"
style="text-decoration: underline">indexer
configuration</a> and add or enable some.
</div>
</div>
</div>
<div ng-show="::availableIndexers.length > 0">
<div class="row d-sm-flex justify-content-center">
<div class="col-xs-20 col-sm-18 col-md-14">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">Search</label>
<div class="col-sm-18">
<div class="input-group">
<span class="input-group-btn input-group-btn2">
<button type="button" class="btn btn-default dropdown-toggle search-category-button"
data-toggle="dropdown" aria-expanded="false" id="searchCategoryDropdownButton"
ng-cloak>
{{ category.name }} <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu"
style="right: auto; top:initial; margin:0px;">
<li ng-repeat="category in categories">
<a href="" class="searchCategoryButton search-category-option"
ng-click="toggleCategory(category)">{{ category.name }}</a>
</li>
</ul>
</span>
<span class="input-group-addon by-id-checkbox" ng-if="isAskById"
uib-tooltip="If enabled the search is done using an ID from TheTVDB or IMDB. The ID is retrieved using autocomplete."
tooltip-placement="top"
tooltip-trigger="mouseenter"
style="border-right-width: 0; width: 40px">
<input type="checkbox" name="by-id" id="by-id" ng-model="isById.value"
style="margin-top:0;">
</span>
<div class="input-group-addon"
style="border-right-style: none; max-width: 250px; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; width: {{selectedItemWidth}}"
ng-show="selectedItem.title">
<button style="position: relative; top: -9px; right:-3px; font-size: xx-small; float: right; z-index: 1000; margin: 0; padding: 0; border: none; background-color: unset"
ng-click="clearAutocomplete()" id="clear-autocomplete-button">
<span class="glyphicon glyphicon-remove" style="font-size: xx-small;"></span>
</button>
<span id="selected-item-title">
{{selectedItem.title}}
</span>
</div>
<input id="searchfield" type="search" ngtype="search" ng-model="query"
ng-enter="onTypeAheadEnter()" placeholder="Search" typeahead-min-length="2"
typeahead-wait-ms="typeAheadWait" ng-keydown="onTypeAheadKeyDown($event)"
uib-typeahead="item as item.label for item in getAutocomplete($viewValue)"
typeahead-template-url="autocompleteTemplate.html"
ng-class="{'autocompleteLoading': (loadingItems && autocompleteActive), 'search-border': !seriesSelected}"
typeahead-loading="loadingItems"
typeahead-on-select="selectAutocompleteItem($item)" class="form-control"
focus-on="focus-query-box"
autofocus auto-focus
uib-tooltip="{{searchBoxTooltip}}"
tooltip-placement="top"
tooltip-trigger="mouseenter"
style="border-right: none"
ng-on-drop="onDropOnQueryInput($event)">
<button style="position: absolute; top: 2px; right:{{seriesSelected() ? 185 : 105}}px; font-size: xx-small; float: right; z-index: 1000; margin: 0; padding: 0; border: none; background-color: unset"
ng-click="clearQuery()" id="clear-query-button">
<span class="glyphicon glyphicon-remove" style="font-size: xx-small;"></span>
</button>
<span class="input-group-btn" style="width:40px; border-left: none" ng-show="seriesSelected()">
<input type="text" class="form-control season-input" placeholder="S" name="season"
id="seriesSearchS" style="width:40px; " ng-model="season"
ng-enter="initiateSearch()"
uib-tooltip="Enter a season to search for."
tooltip-placement="top"
tooltip-trigger="mouseenter">
</span>
<span class="input-group-btn" style="width:40px;" ng-show="seriesSelected()">
<input type="text" class="form-control episode-input" placeholder="E" name="episode"
id="seriesSearchE" style="width:40px;" ng-model="episode"
ng-enter="initiateSearch()"
uib-tooltip="Enter an episode to search for."
tooltip-placement="top"
tooltip-trigger="mouseenter">
</span>
<span class="input-group-btn input-group-btn1" style="border-left-width: 1px">
<div class="btn-group" uib-dropdown is-open="status.isopen">
<button id="history-dropdown-button" type="button" class="btn btn-default"
uib-dropdown-toggle
ng-enter="initiateSearch()"
uib-tooltip="Search history"
tooltip-placement="top"
tooltip-trigger="mouseenter">
<span class="glyphicon glyphicon-time" style="margin-right: 3px"></span><span class="caret"></span>
</button>
<ul class="dropdown-menu" uib-dropdown-menu
template-url="static/html/search-searchhistory-dropdown.html"
aria-labelledby="button-template-url">
</ul>
</div>
</span>
<span class="input-group-btn input-group-btn2" style="width:51px;">
<button class="btn btn-default" type="button" id="startsearch"
ng-click="initiateSearch()">Go!</button>
</span>
</div>
</div>
</div>
</form>
<div ng-if="::showIndexerSelection">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">Indexers</label>
<div class="col-sm-18">
<div class="d-flex flex-wrap align-items-center">
<div indexer-selection-button available-indexers="availableIndexers"
selected-indexers="selectedIndexers" class="indexer-selection-button" style="margin-right: 10px;">
</div>
<label ng-repeat="indexer in availableIndexers" class="mb-0 mx-2 my-3">
<input type="checkbox" ng-class="{'indexer-checkbox': $index > 0}"
class="indexer-selection-checkbox" data-checklist-model="selectedIndexers"
data-checklist-value="indexer.name" indexer-name="{{indexer.name}}"> {{ indexer.name }}
</label>
</div>
</div>
</div>
</form>
</div>
<form class="form-horizontal form-search">
<div class="form-group">
<div class="col-xs-20 col-sm-10">
<div class="form-group">
<label class="col-xs-4 control-label">Age</label>
<div class="col-xs-8 pe-2">
<div class="input-group">
<span class="input-group-addon">Min</span>
<input type="number" class="form-control" id="minage" ng-model="minage" ng-enter="initiateSearch()">
<span class="input-group-addon">days</span>
</div>
</div>
<div class="col-xs-8 ps-0">
<div class="input-group">
<span class="input-group-addon">Max</span>
<input type="number" class="form-control" id="maxage" ng-model="maxage" ng-enter="initiateSearch()">
<span class="input-group-addon">days</span>
</div>
</div>
</div>
</div>
<div class="col-xs-20 col-sm-10">
<div class="form-group">
<label class="col-xs-4 control-label">Size</label>
<div class="col-xs-8 pe-2">
<div class="input-group">
<span class="input-group-addon">Min</span>
<input type="number" class="form-control" id="minsize" ng-model="minsize" ng-enter="initiateSearch()">
<span class="input-group-addon">MB</span>
</div>
</div>
<div class="col-xs-8 ps-0">
<div class="input-group">
<span class="input-group-addon">Max</span>
<input type="number" class="form-control" id="maxsize" ng-model="maxsize" ng-enter="initiateSearch()">
<span class="input-group-addon">MB</span>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- Search results go here -->
<div ui-view="results"></div>
</div>