rename RegistrationState to ValidStates
[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 <label>
58 <input type="checkbox" ng-model="pager.show_all">
59 All results on single page <b>(can be slow!)</b>
60 </label>
61
62 {{pager}}
63
64 </fieldset>
65
66 <fieldset ng-show="show.states">
67 <button ng-repeat="state in ValidStates" ng-click="search.$ = state" class="btn {{state}}">
68 <span class="badge">{{Counts['state+'+state]}}</span>
69 {{state}}
70 </button>
71 </fieldset>
72
73 <fieldset ng-show="show.pager_numeric">
74 <input type="number" ng-model="pager.page" size="3" min="1" max="{{pager.last_page}}">
75 <input type="number" ng-model="pager.limit">
76 </fieldset>
77
78
79 <div ng-show="list.length" class="content">
80
81 <pagination class="pagination-large" max-size="12"
82         num-pages="pager.last_page"
83         current-page="pager.page"
84         hide-pagination="pager.show_all"
85 ></pagination>
86
87 <dl ng-repeat="registration in list">
88 %= include 'registration/view', before => begin
89 {{registration.nr}}
90 <a class="btn btn-primary" href="#/verified/{{registration.id}}">change status</a>
91 % end
92 </dl>
93
94 <pagination class="pagination-large" max-size="12"
95         num-pages="pager.last_page"
96         current-page="pager.page"
97         hide-pagination="pager.show_all"
98 ></pagination>
99
100 </div><!-- ng-show="list.length"-->
101
102 % if ( $lang =~ m/-dev/ ) {
103 <pre class="controls-row">
104 {{pager}}
105
106 {{Counts}}
107 </pre>
108 % }
109
110 </form>
111