added btn class to registration state buttons
[angular-drzb] / app / partials / list.html.ep
index 7fbbb32..6f48847 100644 (file)
@@ -5,86 +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">
+<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 ng-show="RegistrationTypeCount[type.code] > 0">
- <tt>{{RegistrationTypeCount[type.code]}}</tt>
+<span ng-switch-default>
+ <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>
+</div>
+
+<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>
+
+<div class="controls-row">
+
+<label>
 Search:
 <input class="search-query" ng-model="search.$">
-<a class="btn btn-invert" href="" ng-click="search.$ = ''">
+</label>
+
+<a class="btn btn-invert" href="" ng-click="search = {}">
 <i class="icon-remove"></i></a>
-<b>{{list.length}} results</b>
+<b>{{pager.results}} results</b>
 <tt>{{search}}</tt>
+
+<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">
+
 </div>
 
+
 <div ng-show="list.length">
 
 <h2>Prijavljenje registracije {{search.registration_type}}</h2>
 
 
-<ol>
+<ul>
+
 <li ng-repeat="registration in list">
- <a href="#/registration/{{registration.id}}">edit</a>
- {{registration.user.registration_type}}
- <tt>{{registration._id}}</tt>
- {{registration._id | registration_timestamp}}
-
-       <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>
-
-<p ng-show="registration.user.registration_type == 'symposium'">
-{{registration.symposium.title}}
- <p class="abstract">
- {{registration.symposium.abstract}}
- </p>
-</p>
-
-<h3 ng-show="registration.work.title">
-{{registration.work.title}}
-</h3>
-
-<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>
-
-<ol ng-show="registration.user.registration_type == 'symposium'">
- <li ng-repeat="work in registration.work.symposium_works">
-  <h4>{{work.title}}</h4>
-
-       <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>
-
- </li>
-
-</ol>
+{{registration.nr}}
+<a class="btn btn-primary" href="#/verified/{{registration.id}}" target="{{registration.id}}">change status</a>
+%= include 'registration/view'
+</li>
+
+</ul>
 
 </div><!-- ng-show="list.length"-->
 
+% if ( $lang =~ m/-dev/ ) {
+<pre class="controls-row">
+{{Counts}}
+</pre>
+% }
+
 </form>