added btn class to registration state buttons
[angular-drzb] / app / partials / list.html.ep
index d609334..6f48847 100644 (file)
@@ -5,91 +5,81 @@ Loading data...
 
 <form ng-controller="ListCtrl" class="form-search" ng-show="ready">
 
+<div class="controls-row">
+
 <h2>Odaberite tip registracije</h2>
 
-<label class="radio input-block-level" ng-repeat="type in RegistrationTypes" ng-switch on="type.code" ng-show="RegistrationTypeCount[type.code] > 0">
+<label class="radio input-block-level" ng-repeat="type in RegistrationTypes" ng-switch on="type.code" ng-show="Counts[type.code] > 0">
 <hr ng-switch-when="false">
 <span ng-switch-default>
- <tt>{{RegistrationTypeCount[type.code]}}</tt>
+ <span class="badge {{type.css_class}}">{{Counts[type.code]}}</span>
  <input type="radio" name="search.registration_type" ng-model="search.registration_type" value="{{type.code}}" >
  {{type.label}}
 <!--
  <i>{{type.description}}</i>
 -->
+ <span class="badge" ng-repeat="subtype in filters" ng-show="Counts[type.code+'+'+subtype]"+>
+       {{Counts[type.code+'+'+subtype]}} {{subtype}}
+ </span>
 </span>
 </label>
 
-<div>
-Search:
-<input class="search-query" ng-model="search.$">
-<a class="btn btn-invert" href="" ng-click="search.$ = ''">
-<i class="icon-remove"></i></a>
-<b>{{list.length}} results</b>
-<tt>{{search}}</tt>
 </div>
 
-<div ng-show="list.length">
+<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>
 
-<h2>Prijavljenje registracije {{search.registration_type}}</h2>
+</div>
 
+<div class="controls-row">
 
-<ol>
-<li ng-repeat="registration in list">
- <a class="btn" href="#/registration/{{registration.id}}">edit</a>
- {{registration.user.registration_type}}
- {{registration._id | registration_date_time}}
- <a class="btn" href="#/confirmation/{{registration.id}}" title="confirmation"><tt>{{registration.id}}</tt></a>
-% if ( $lang =~ m/-dev/ ) {
- <a class="btn" href="<%= $couchdb_view %>/{{registration._id}}" target="couchdb">couchdb</a>
-% }
+<label>
+Search:
+<input class="search-query" ng-model="search.$">
+</label>
 
-       <p>
-        {{registration.user.firstname}}
-        {{registration.user.surname}}
-        <em>{{registration.user.organization}}</em>,
-        {{registration.user.city}},
-        <i>{{registration.user.country}}</i>
-        <tt>&lt;{{registration.user.email}}&gt;</tt>
-       </p>
+<a class="btn btn-invert" href="" ng-click="search = {}">
+<i class="icon-remove"></i></a>
+<b>{{pager.results}} results</b>
+<tt>{{search}}</tt>
 
-<p ng-show="registration.user.registration_type == 'symposium'">
-{{registration.symposium.title}}
- <p class="abstract">
- {{registration.symposium.abstract}}
- </p>
-</p>
+<br>
+<button ng-click="search.$ = 'draft'" class="btn draft">draft</button>
+<button ng-click="search.$ = 'confirmation'" class="btn confirmation">confirmation</button>
+<button ng-click="search.$ = 'verified'" class="btn verified">verified</button>
+<input type="number" ng-model="pager.page" min="1" max="{{pager.last_page}}">
+<input type="number" ng-model="pager.limit">
 
-<h3 ng-show="registration.work.title">
-{{registration.work.title}}
-</h3>
+</div>
 
-<p ng-repeat="author in registration.work.persons" >
- {{author.firstname}}
- {{author.surname}},
- <em>{{author.organization}}</em>
- <tt>&lt;{{author.email}}&gt;</tt>
-</p>
 
-<p class="abstract">{{registration.work.abstract}}</p>
+<div ng-show="list.length">
 
-<ol ng-show="registration.user.registration_type == 'symposium'">
- <li ng-repeat="work in registration.work.symposium_works">
-  <h4>{{work.title}}</h4>
+<h2>Prijavljenje registracije {{search.registration_type}}</h2>
 
-       <p ng-repeat="author in work.persons" >
-        {{author.firstname}}
-        {{author.surname}},
-        <em>{{author.organization}}</em>
-        <tt>&lt;{{author.email}}&gt;</tt>
-       </p>
 
-    <p class="abstract">{{work.abstract}}</p>
+<ul>
 
- </li>
+<li ng-repeat="registration in list">
+{{registration.nr}}
+<a class="btn btn-primary" href="#/verified/{{registration.id}}" target="{{registration.id}}">change status</a>
+%= include 'registration/view'
+</li>
 
-</ol>
+</ul>
 
 </div><!-- ng-show="list.length"-->
 
+% if ( $lang =~ m/-dev/ ) {
+<pre class="controls-row">
+{{Counts}}
+</pre>
+% }
+
 </form>