filter list by few facet checkboxes
[angular-drzb] / app / partials / list.html.ep
1 <div ng-show="! ready">
2 Loading data...
3 </div>
4
5
6 <form ng-controller="ListCtrl" class="form-search" ng-show="ready">
7
8 <div class="controls-row">
9
10 <h2>Odaberite tip registracije</h2>
11
12 <label class="radio input-block-level" ng-repeat="type in RegistrationTypes" ng-switch on="type.code" ng-show="Counts[type.code] > 0">
13 <hr ng-switch-when="false">
14 <span ng-switch-default>
15  <span class="badge {{type.css_class}}">{{Counts[type.code]}}</span>
16  <input type="radio" name="search.registration_type" ng-model="search.registration_type" value="{{type.code}}" >
17  {{type.label}}
18 <!--
19  <i>{{type.description}}</i>
20 -->
21  <span class="badge" ng-repeat="subtype in filters" ng-show="Counts[type.code+'+'+subtype]"+>
22         {{Counts[type.code+'+'+subtype]}} {{subtype}}
23  </span>
24 </span>
25 </label>
26
27 </div>
28
29 <div class="controls-row">
30 filters
31 <label class="badge" ng-repeat="filter in filters">
32  <input ng-model="search[filter]" type="checkbox">
33  <span class="blob">{{Counts[filter]}}</span>
34  {{filter}}
35 </label>
36
37 </div>
38
39 <div>
40
41 <label>
42 Search:
43 <input class="search-query" ng-model="search.$">
44 </label>
45
46 <a class="btn btn-invert" href="" ng-click="search = {}">
47 <i class="icon-remove"></i></a>
48 <b>{{list.length}} results</b>
49 <tt>{{search}}</tt>
50 </div>
51
52 <div ng-show="list.length">
53
54 <h2>Prijavljenje registracije {{search.registration_type}}</h2>
55
56
57 <ol>
58 <li ng-repeat="registration in list">
59 %= include 'registration/view'
60 </li>
61
62 </ol>
63
64 </div><!-- ng-show="list.length"-->
65
66 % if ( $lang =~ m/-dev/ ) {
67 <pre class="controls-row">
68 {{Counts}}
69 </pre>
70 % }
71
72 </form>
73