generate RegistrationState buttons from service data
[angular-drzb] / app / partials / list.html.ep
1
2 <div ng-show="! ready" class="alert alert-important">
3 Loading data...
4 </div>
5
6 <form ng-controller="ListCtrl" class="form-search" ng-show="ready">
7
8
9 <fieldset ng-show="show.registration_type">
10 <legend>
11 Odaberite tip registracije
12 </legend>
13
14 <label class="radio input-block-level" ng-repeat="type in RegistrationTypes" ng-switch on="type.code">
15 <hr ng-switch-when="false">
16 <span ng-switch-default>
17  <span class="badge {{type.css_class}}">{{Counts[type.code]}}</span>
18  <input type="radio" name="search.registration_type" ng-model="search.registration_type" value="{{type.code}}" >
19  {{type.label}}
20 <!--
21  <i>{{type.description}}</i>
22 -->
23  <span class="badge" ng-repeat="subtype in filters" ng-show="Counts[type.code+'+'+subtype]"+>
24         {{Counts[type.code+'+'+subtype]}} {{subtype}}
25  </span>
26 </span>
27 </label>
28
29 </fieldset>
30
31 <fieldset ng-show="show.filters">
32 <legend>
33 Filters
34 </legend>
35
36 <label class="badge filter-{{search[filter]}}" ng-repeat="filter in filters">
37  <input ng-model="search[filter]" type="checkbox">
38  {{Counts[filter]}}
39  {{filter}}
40 </label>
41
42 </fieldset>
43
44 <fieldset>
45 <legend>
46 Search
47 </legend>
48
49 <input class="my-lebel-input search-query" ng-model="search.$" label="Search">
50
51 <a class="btn btn-invert" href="" ng-click="reset()">
52 <i class="icon-remove"></i></a>
53
54 <b>{{pager.results}} results</b>
55 <tt>{{search}}</tt>
56
57 </fieldset>
58
59 <fieldset ng-show="show.states">
60 <button ng-repeat="state in RegistrationState" ng-click="search.$ = state" class="btn {{state}}">
61 {{state}}
62 </button>
63 </fieldset>
64
65 <fieldset ng-show="show.pager_numeric">
66 <input type="number" ng-model="pager.page" size="3" min="1" max="{{pager.last_page}}">
67 <input type="number" ng-model="pager.limit">
68 </fieldset>
69
70
71 <div ng-show="list.length" class="content">
72
73 <pagination class="pagination-large" max-size="12"
74         num-pages="pager.last_page"
75         current-page="pager.page"
76 ></pagination>
77
78 <dl ng-repeat="registration in list">
79 %= include 'registration/view', before => begin
80 {{registration.nr}}
81 <a class="btn btn-primary" href="#/verified/{{registration.id}}">change status</a>
82 % end
83 </dl>
84
85 <pagination class="pagination-large" max-size="12"
86         num-pages="pager.last_page"
87         current-page="pager.page"
88 ></pagination>
89
90 </div><!-- ng-show="list.length"-->
91
92 % if ( $lang =~ m/-dev/ ) {
93 <pre class="controls-row">
94 {{pager}}
95
96 {{Counts}}
97 </pre>
98 % }
99
100 </form>
101