added lf2p filter and use it to format abstracts
[angular-mojolicious.git] / public / app / drzb2011 / abstracts.html
1 <!DOCTYPE HTML>
2 <html xmlns:ng="http://angularjs.org">
3 <head>
4 <meta charset="utf-8">
5 <script src="angular.js" ng:autobind></script>
6
7 <script>
8 Registrations.$inject = ['$xhr']; 
9
10 function Registrations(xhr){ 
11         this.xhr = xhr; 
12         var self = this;
13         this.xhr("JSON"
14                 , "/data/drzb2011/Registration?callback=JSON_CALLBACK"
15                 , function(code, response){ 
16 //                      console.log('xhr JSON', code, response);
17                         self.data = response;
18                 }
19         ); 
20
21
22
23 angular.filter('lf2p', function(input) {
24         if ( input && input.length )
25                 return input.replace(/\n/g,"<p>");
26 });
27
28 </script>
29
30 <title>DRZB2011 Registrations</title>
31
32 <style>
33 .address {
34 }
35 .abstract {
36         font-style: italic;
37         font-size: 90%;
38         color: #3f3f3f;
39 }
40
41 li {
42         margin-top: 40px;
43 }
44
45 .participant {
46         background-color: #ffcccc;
47         font-weight: bold;
48 }
49 .sparticipant {
50         background-color: #ccffe6;
51         font-weight: bold;
52
53 }
54 .symposium {
55         background-color: #ccccff;
56         font-weight: bold;
57
58 }
59 .round {
60         background-color: #e6ccff;
61         background-color:  #99ffcc;
62         font-weight: bold;
63
64 }
65 .lecture {
66         background-color: #ffccff;
67         font-weight: bold;
68
69 }
70 .poster {
71         background-color: #ffcce6;
72         background-color: #ffcc99;
73         font-weight: bold;
74
75 }
76 .student {
77         background-color: #ffff99;
78         font-weight: bold;
79
80 }
81 .accomp {
82         background-color: #ccff99;
83         font-weight: bold;
84
85 }
86
87 </style>
88
89 </head>
90 <body>
91
92 <div ng:controller="Registrations"> 
93
94 Odabir: <br/>
95
96 <label class="symposium"><input name="selection" type="radio" value="symposium">Rad unutar simpozija<br></label>
97 <label class="lecture"><input name="selection" type="radio" value="lecture">Usmeno priopćenje <br></label>
98 <label class="poster"><input name="selection" type="radio" value="poster">Poster <br></label>
99
100
101 <div>
102 <div ng:repeat="registration in data" ng:show="registration.type == selection || selection == 'all'">
103 <!--
104 <span class="{{registration.type}}">
105         <span ng:show="registration.type == 'participant'">samo registracija</span> 
106         <span ng:show="registration.type == 'sparticipant'">sudionik simpozija/okruglog stola</span> 
107         <span ng:show="registration.type == 'symposium'">organizator simpozija</span> 
108         <span ng:show="registration.type == 'round'">organizator okruglog stola</span> 
109         <span ng:show="registration.type == 'lecture'">usmeno priopćenje</span> 
110         <span ng:show="registration.type == 'poster'">poster</span> 
111         <span ng:show="registration.type == 'student'">student - samo registracija</span> 
112         <span ng:show="registration.type == 'accomp'">osoba u pratnji</span> 
113 </span>
114         <span ng:show="registration.student == thrue"> - student</span><br>
115 -->
116
117         <h1 style="font-size: 14pt; text-align: center; padding-top:48pt">{{registration.work.title | uppercase}}</h1>
118         <span ng:repeat="author in registration.work.authors" ng:show="registration.work.title">
119                 <div style="font-size: 12pt; font-weight: bold; text-align: center; margin: 0; padding: 0">{{author.name}} {{author.surname}}</div>
120                 <div style="font-size: 12pt; font-style: italic; font-weight: normal; text-align: center; padding-top: 6pt; padding-bottom: 12pt; margin: 0;">{{author.inst}}</div>
121         </span>
122         <div>{{registration.work.abstract | lf2p | html}}</div>
123         <div>{{registration._id}}</div>
124 </div>
125 </div>
126
127 <div>
128 <input name=debug type=checkbox style="float: right;">
129 <pre ng:show="debug">
130 data={{data}}
131 </pre>
132 </div>
133
134 </div>
135
136
137 </body>
138 </html>