-<div ng-show="! ready">
+
+<div ng-show="! ready" class="alert alert-important">
Loading data...
</div>
-
<form ng-controller="ListCtrl" class="form-search" ng-show="ready">
-<div class="controls-row">
-<h2>Odaberite tip registracije</h2>
+<fieldset ng-show="show.registration_type">
+<legend>
+Odaberite tip registracije
+</legend>
-<label class="radio input-block-level" ng-repeat="type in RegistrationTypes" ng-switch on="type.code" ng-show="Counts[type.code] > 0">
+<label class="radio input-block-level" ng-repeat="type in RegistrationTypes" ng-switch on="type.code">
<hr ng-switch-when="false">
<span ng-switch-default>
<span class="badge {{type.css_class}}">{{Counts[type.code]}}</span>
</span>
</label>
-</div>
+</fieldset>
+
+<fieldset ng-show="show.filters">
+<legend>
+Filters
+</legend>
-<div class="controls-row">
-Filters:
<label class="badge filter-{{search[filter]}}" ng-repeat="filter in filters">
<input ng-model="search[filter]" type="checkbox">
{{Counts[filter]}}
{{filter}}
</label>
-</div>
+</fieldset>
-<div class="controls-row">
+<fieldset>
+<legend>
+Search
+</legend>
-<label>
-Search:
-<input class="search-query" ng-model="search.$">
-</label>
+<input class="my-lebel-input search-query" ng-model="search.$" label="Search">
-<a class="btn btn-invert" href="" ng-click="search = {}">
+<a class="btn btn-invert" href="" ng-click="reset()">
<i class="icon-remove"></i></a>
+
<b>{{pager.results}} results</b>
<tt>{{search}}</tt>
-<br>
-<button ng-click="search.$ = 'draft'">draft</button>
-<button ng-click="search.$ = 'confirmation'">confirmation</button>
-<button ng-click="search.$ = 'accepted'">accepted</button>
-<input type="number" ng-model="pager.page" min="1" max="{{pager.last_page}}">
-<input type="number" ng-model="pager.limit">
+<label>
+<input type="checkbox" ng-model="pager.show_all">
+All results on single page <b>(can be slow!)</b>
+</label>
-</div>
+</fieldset>
+<fieldset ng-show="show.states">
+<button ng-repeat="state in RegistrationState" ng-click="search.$ = state" class="btn {{state}}">
+<span class="badge">{{Counts['state+'+state]}}</span>
+{{state}}
+</button>
+</fieldset>
-<div ng-show="list.length">
+<fieldset ng-show="show.pager_numeric">
+<input type="number" ng-model="pager.page" size="3" min="1" max="{{pager.last_page}}">
+<input type="number" ng-model="pager.limit">
+</fieldset>
-<h2>Prijavljenje registracije {{search.registration_type}}</h2>
+<div ng-show="list.length" class="content">
-<ul>
+<pagination class="pagination-large" max-size="12"
+ num-pages="pager.last_page"
+ current-page="pager.page"
+ hide-pagination="pager.show_all"
+></pagination>
-<li ng-repeat="registration in list">
+<dl ng-repeat="registration in list">
+%= include 'registration/view', before => begin
{{registration.nr}}
-<a class="btn btn-invert" href="#/accepted/{{registration.id}}" target="{{registration.id}}">accept</a>
-%= include 'registration/view'
-</li>
+<a class="btn btn-primary" href="#/verified/{{registration.id}}">change status</a>
+% end
+</dl>
-</ul>
+<pagination class="pagination-large" max-size="12"
+ num-pages="pager.last_page"
+ current-page="pager.page"
+ hide-pagination="pager.show_all"
+></pagination>
</div><!-- ng-show="list.length"-->
% if ( $lang =~ m/-dev/ ) {
<pre class="controls-row">
+{{pager}}
+
{{Counts}}
</pre>
% }