move filter to controller to get number of results
[angular-drzb] / app / partials / list.html
1 <h1>Registracije</h1>
2
3
4
5
6 <form ng-controller="ListCtrl">
7
8 <h2>Odaberite tip registracije</h2>
9
10 <label class="left" ng-repeat="type in RegistrationTypes" ng-switch on="type.code">
11 <hr ng-switch-when="false">
12 <span ng-switch-default ng-show="RegistrationTypeCount[type.code] > 0">
13  <tt>{{RegistrationTypeCount[type.code]}}</tt>
14  <input type="radio" name="search.registration_type" ng-model="search.registration_type" value="{{type.code}}" >
15  {{type.label}}
16  <i>{{type.description}}</i>
17 </span>
18 </label>
19
20 <div>
21 Search:
22 <input ng-model="search.$">
23 <input type=button value="X" ng-click="search.$ = ''">
24 <b>{{list.length}} results</b>
25 <tt>{{search}}</tt>
26 </div>
27
28 <h2>Prijavljenje registracije</h2>
29
30
31 <ol>
32 <li ng-repeat="registration in list">
33  <a href="#/registration/{{registration.id}}">edit</a>
34  {{registration.user.registration_type}}
35  <tt ng-click="debug = 1" title="click to show JSON">{{registration._id}}</tt>
36  <tt ng-show="debug" title="click to hide" ng-click="debug = 0">{{registration}}</tt>
37  <a href="http://10.60.0.92:5984/_utils/document.html?drzb2013/{{registration._id}}" target="drzb">db</a>
38
39         <p>
40          {{registration.user.firstname}}
41          {{registration.user.surname}}
42          <em>{{registration.user.organization}}</em>,
43          {{registration.user.city}},
44          <i>{{registration.user.country}}</i>
45          <tt>&lt;{{registration.user.email}}&gt;</tt>
46         </p>
47
48 <p ng-show="registration.user.registration_type == 'symposium'">
49 {{registration.symposium.title}}
50  <p class="abstract">
51  {{registration.symposium.abstract}}
52  </p>
53 </p>
54
55 <h3 ng-show="registration.work.title">
56 {{registration.work.title}}
57 </h3>
58
59 <p ng-repeat="author in registration.work.persons" >
60  {{author.firstname}}
61  {{author.surname}},
62  <em>{{author.organization}}</em>
63  <tt>&lt;{{author.email}}&gt;</tt>
64 </p>
65
66 <p class="abstract">{{registration.work.abstract}}</p>
67
68 <ol ng-show="registration.user.registration_type == 'symposium'">
69  <li ng-repeat="work in registration.work.symposium_works">
70   <h4>{{work.title}}</h4>
71
72         <p ng-repeat="author in work.persons" >
73          {{author.firstname}}
74          {{author.surname}},
75          <em>{{author.organization}}</em>
76          <tt>&lt;{{author.email}}&gt;</tt>
77         </p>
78
79     <p class="abstract">{{work.abstract}}</p>
80
81  </li>
82
83 </ol>
84
85 </form>
86