replace Symposium $resource with $xhr CouchDB view
[angular-mojolicious.git] / public / app / conference / registration.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 <title>Conference registration</title>
8
9 <script src="registration.js"></script>
10
11 <style type="text/css">
12
13 body {
14         background: #F6F6F6;
15         margin: 40px;
16         font-family: Arial;
17         color: #374E5A;
18         font-size: 14px;
19         line-height: 16px;
20 }
21
22
23 label {
24         display: block;
25         color: #D74F25;
26         color: #374E5A;
27         color: #afafaf;
28         margin-top: 10px;
29         font-size: 14px;
30         font-family: Arial;
31 }
32 h1 {
33 /*      margin-bottom: 6px;     */
34         padding-left: 20px;
35         font: 18px arial;
36         color: #0c1426;
37         text-decoration: none;
38         display: block;
39         background: url(http://mjesec.ffzg.hr/drzb2011/images/kvadrat.gif) no-repeat left;
40         border-bottom: 1px solid #CCC;
41 }
42 h2 {
43         margin-top: 60px;
44         font-size: 14px;
45         padding: 2px 0;
46         border-bottom: 2px solid #D74F25;
47         border-bottom: 1px solid #46d0fe;
48 }
49
50 a {
51         color: #D74F25;
52 }
53
54 label {
55         color: #374E5A;
56 }
57
58 .input {
59         color: #afafaf;
60         float: left;
61         margin: 2px;
62         padding: 0 6px;
63 }
64
65 .input1 {
66         width: 40.8em;
67 }
68
69 .input2 {
70         width: 8em;
71 }
72
73 .input3 {
74         width: 13em;
75 }
76 .input4 {
77         width: 10em;
78 }
79
80 .input5 {
81         width: 21.4em;
82 }
83 .input6 {
84         width: 6.3em;
85 }
86
87 .clear {
88         clear: both;
89 }
90
91
92 .authors {
93         clear: both;
94         margin-bottom: 6px;
95 }
96
97 .addPerson {
98         color: #D74F25;
99         color: #EDC8BC;
100         color: #EAB3A2;
101         font-size: 90%;
102 }
103
104 input, textarea, .gohome {
105         font: 14px arial;
106         color: #000000;
107         border: solid 1px #dedede;
108         padding: 6px;
109         background: #f6f6f6;
110 }
111
112 input:focus, textarea:focus
113 {
114         
115         background: #ffffff;
116         font-family: arial;
117         color: #000000;
118 /*      border: 1px solid #46d0fe; */
119 }
120
121 .ng-validation-error {
122         border: 1px solid #FF6666;
123         border: 1px solid #EDC8BC;
124         border: 1px solid #FF9966;
125         border: 1px solid #EAB3A2;
126         border: 1px solid #D74F25;
127         border: 1px solid #DC6844;
128         border: 1px solid #DE7F61;
129 }
130
131
132
133 #work, #submission {
134         margin-bottom: 20px;
135 }
136
137 .button {
138         margin-top: 20px;
139         width: 40.8em;
140 }
141
142 .button input {
143         margin-bottom: 10px;
144         float: left;
145         color: #ffffff;
146         display: block;
147         text-decoration: none;
148         background: #d74f25;
149 }
150
151 .button input:hover, .gohome:hover {
152         background: #dc6844;
153 }
154
155 .button2 input {
156         background: #F6F6F6;
157         color: #374E5A;
158         border: 1px solid #d74f25;
159         display: inline;
160         float: none;
161 }
162
163
164 .gohome  {
165         float: left;
166         color: #ffffff;
167         display: block;
168         text-decoration: none;
169         background: #d74f25;
170         padding: 7px;
171 }
172
173 .gohome a {
174         color: #fff;
175         text-decoration: none;
176 }
177
178 .list {
179         margin-top: 20px;
180         font-weight: bold;
181 }
182
183 .warrning {
184         color: #FF6666;
185 }
186
187 .sworks {
188         margin-top: 20px;
189 }
190
191
192 .newWork {
193         clear: left;
194         margin-top: 50px;
195 }
196 .saved {
197         margin-bottom: 20px;
198         margin-top: 20px;
199 }
200 .saved2 {
201         color: #374E5A;
202         color: #d74f25;
203         font-weight: bold;
204         font-style: italic;
205         display: block;
206 }
207 .saved3 {
208         color: #374E5A;
209         font-weight: normal;
210         margin-top: 20px;
211 }
212 .footer {
213         height: 10px;
214 }
215 hr {
216         border: 1px solid #ccc;
217 }
218 </style>
219
220
221 </head>
222 <body>
223
224
225 <h1>Registration and Proposal Submission</h1>
226
227 <div>
228 <p>Svi sudionici skupa, bez obzira na to jesu li izlagači, suautori ili slušači, trebaju prijaviti svoje sudjelovanje kroz sustav elektroničke prijave.</p>
229  
230 <p>Sažetak izlaganja/postera prijavljuje samo prvi autor, odnosno onaj autor koji će rad izložiti. Ostali suautori prilikom prijave na skup ne trebaju prijaviti sažetak, nego se samo registrirati.</p>
231  
232 <p>Organizatori simpozija/okruglog stola prijavljuju i sažetak simpozija i/ili okruglog stola,  i sažetak svakog pripadajućeg rada. Autori radova unutar simpozija ne prijavljuju pojedinačno svoje sažetke.</p>
233  
234 <p>Duljina sažetka ne može prelaziti 2000 znakova.</p>
235
236 <p>Jedna osoba može biti autor u najviše tri rada, pri čemu na samo jednom može biti prvi ili jedini autor.</p>
237
238 </div>
239
240
241 <div class="root" ng:controller="Registration" ng:init="$window.$root = this;">
242
243
244 <div ng:show="last_saved.$id || symposium">
245         <h2>{{registration.person.name}} {{registration.person.surname}}</h2>
246 </div>
247
248
249 <div id="participant" ng:show="! last_saved.$id && ! symposium">
250         <h2>Contact Information</h2>
251         <div class="labelTop">
252                 <div class="input input4">First name</div>
253                 <div class="input input4">Surname</div>
254         </div>
255         <div style="clear: both">
256                 <input class="input4" name="registration.person.name" ng:required>
257                 <input class="input4" name="registration.person.surname" ng:required>
258         </div>
259         <div class="labelTop">
260                 <div class="input input5">Institution</div>
261         </div>  
262         <div style="clear: both">
263                 <input class="input5" name="registration.person.inst">
264         </div>
265         <div class="labelTop">
266                 <div class="input input5">Address</div>
267         </div>  
268         <div style="clear: both">
269                 <input class="input5" name="registration.person.address1" ng:required>
270         </div>
271         <div class="labelTop">
272                 <div class="input input6">City</div>
273                 <div class="input input6">ZIP</div>
274                 <div class="input input6">Country</div>
275         </div>
276         <div style="clear: both">
277                 <input class="input6" name="registration.person.city" ng:required>
278                 <input class="input6" name="registration.person.zip">
279                 <input class="input6" name="registration.person.country">
280         </div>
281         <div class="labelTop">
282                 <div class="input input4">E-mail</div>
283                 <div class="input input4">Phone number</div>
284         </div>
285         <div style="clear: both">
286                 <input class="input4" name="registration.person.email" ng:validate="email" ng:required>
287                 <input class="input4" name="registration.person.phone">
288         </div>
289 </div>
290
291
292 <div id="submission" ng:show="registration.type != 'symposium' && ! last_saved.$id">
293         <div>
294                 <h2>Registration Type</h2>
295                 <label><input type="radio" name="registration.type" value="participant" ng:required>Attendance with no presentation</label>
296                 <label><input type="radio" name="registration.type" value="sparticipant" ng:required>Symposium participant</label>
297                 <label><input type="radio" name="registration.type" value="symposium" ng:required>Symposium organizer</label>
298                 <label><input type="radio" name="registration.type" value="lecture" ng:required>Oral presentation</label>
299                 <label><input type="radio" name="registration.type" value="poster" ng:required>Poster presentation</label>
300                 <label><input type="radio" name="registration.type" value="round" ng:required>Round table discussion</label>
301         </div>
302 </div>
303
304         <!-- dodano za syposium participants -->
305         <div ng:show="registration.type == 'sparticipant' && ! last_saved.$id">
306                 <h2>Symposia</h2>
307                 <label for="registration.sympattend">Topic:</label>
308                 <input class="input1" name="registration.sympattend" ng:required>
309         </div>
310
311
312 <div id="work" ng:show="registration.type != 'participant' && registration.type != 'sparticipant'">
313 <div ng:show="registration.type == 'symposium' && ! last_saved.$id && registration.symposium.work_nr < 2">
314
315         <h2>Symposia</h2>
316         <label for="registration.symposium.title">Topic:</label>
317                 <input class="input1" name="registration.symposium.title" ng:required>
318         <label>Organizer:</label>
319                 <div class="input input2">First name</div><div class="input input2">Surname</div><div class="input input3">Institution</div><div class="input input2">E-mail</div>
320                 <div class="clear" ng:repeat="organizer in registration.symposium.organizers">
321                 <input class="input2" name="organizer.name" ng:required>
322                 <input class="input2" name="organizer.surname" ng:required>
323                 <input class="input3" name="organizer.inst" >
324                 <input class="input2" name="organizer.email" ng:required ng:validate="email">
325                 <a href="" ng:click="registration.symposium.organizers.$remove(organizer)">X</a>
326                 </div>
327         <a class="addPerson" href="" ng:click="registration.symposium.organizers.$add()">Add another organizer</a>
328         <label>Summary (2000 characters max.)</label>
329                 <textarea class="input1" name="registration.symposium.abstract" rows="10" ng:validate="max_length:2000" ng:required></textarea>
330 </div>
331
332
333 <div ng:show="registration.type && ! last_saved.$id">
334
335                 <div ng:show="symposium">
336                         <b>Symposium:</b> {{registration.symposium.title}}
337                         <blockquote>
338                         <label>Submitted papers for this symposium:</label>
339                         <ol>
340                         <li ng:repeat="w in symposium.works">
341                         <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
342                         <b ng:show="registration.$id == w.$id">{{w.title}}</b>
343                         </li>
344                         </ol>
345                         </blockquote>
346                 </div>
347 <h2 ng:show="registration.type == 'symposium'">Add Symposia Paper ({{registration.symposium.work_nr}})</h2>
348 <h2 ng:show="registration.type == 'lecture'">Oral Presentation Sumbission</h2>
349 <h2 ng:show="registration.type == 'poster'">Poster Presentation Sumbission</h2>
350 <h2 ng:show="registration.type == 'round'">Round Table Disscussion Sumbission</h2>
351
352
353 <label>Title:</label>
354         <input class="input1" name="registration.work.title" ng:required>
355 <label>Authors</label>
356 <div>
357         <div class="input input2">First name</div><div class="input input2">Surname</div><div class="input input3">Institution</div><div class="input input2">E-mail</div>
358 </div>
359 <div class="clear" ng:repeat="author in registration.work.authors">
360         <input class="input2" name="author.name" ng:required>
361         <input class="input2" name="author.surname" ng:required>
362         <input class="input3" name="author.inst" >
363         <input class="input2" name="author.email" ng:required ng:validate="email">
364         <a href="" ng:click="registration.work.authors.$remove(author)">X</a>
365 </div>
366 <a class="addPerson" href="" ng:click="registration.work.authors.$add()">Add another author</a>
367
368
369 <label>Abstract (2000 characters max.):</label>
370         <textarea class="input1" name="registration.work.abstract" rows="10" ng:validate="max_length:2000" ng:required></textarea>
371
372
373 </div> <!-- ng:show="registration.type" -->
374 </div>
375
376 <div class="button" ng:show="! last_saved.$equals(registration) && $invalidWidgets.visible() == 0">
377 <input type="submit" value="Save" ng:click="save();" ng:show="! last_saved.$equals(registration) && $invalidWidgets.visible() == 0">
378 </div>
379
380 <div ng:show="$invalidWidgets.visible() &gt; 0" style="color:red; margin-top: 20px">Please fill all required fields correctly ({{$invalidWidgets.visible()}} fields left). Red colored fields call for your attention.
381 </div>
382
383
384
385
386 <div style="margin-bottom: 40px" ng:show="registration.$id && last_saved.$equals(registration)">
387
388 <div>
389 <input type="checkbox" name="last_saved.$id"> Hide submitted registration
390 </div>
391
392 <div class="saved" ng:show="registration.type == 'participant' || registration.type == 'sparticipant'">
393                 <span class="saved2">Your registration has been submitted successfully!</span>
394                 <br><br>
395                 <span ng:show="registration.sympattend">You will participate in the symosium <b>"{{registration.sympattend}}"</b><br><br><br></span>
396                 <span class="saved3">
397                 Thank you. We look forward to seeing you at the conference<br><br>
398                 .. Kotizacija upute ..
399                 </span>
400         </div>
401
402         <div class="saved" ng:show="registration.type != 'participant' && registration.type != 'sparticipant'">
403                 <span class="saved2">You submitted the paper successfully! <br><br></span>
404
405                 <b>Paper title</b>: {{registration.work.title}} <br><br>
406                 <div ng:show="symposium">
407                         <b>Symposium:</b> {{registration.symposium.title}}
408                         <blockquote>
409                         <label>Already submitted papers for this symposium:</label>
410                         <ol>
411                         <li ng:repeat="w in symposium.works">
412                         <!--
413                         <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
414                         -->
415                         <span ng:show="registration.$id != w.$id">{{w.title}}</span>
416                         <b ng:show="registration.$id == w.$id">{{w.title}}</b>
417                         </li>
418                         </ol>
419                         </blockquote>
420                 </div>
421         </div>
422         <div class="button button2" ng:show="registration.$id && registration.type != 'participant' && registration.type != 'sparticipant' && last_saved.$equals(registration)">
423                 You can <input type="reset" value="Submit another paper" ng:click="reset()"> or <a href="http://psihologija.ffzg.hr/drzb2011/">just leave</a> this page. <br><br> ... conference fee ... instructions ...<br><br>
424         </div>
425         <!--    
426         <div>
427         Registration ID: {{registration.$id}}. You can bookmark this page and review it later.
428         </div>
429         -->
430
431         <!--
432         <div class=""><a href="http://psihologija.ffzg.hr/drzb2011/">Go to conference home page</a></div>
433         -->
434 </div>
435 <!--
436 <div class="button2" ng:show="registration.$id && registration.type != 'participant' && registration.type != 'sparticipant' && last_saved.$equals(registration)">
437         <input type="reset" value="Submit another paper" ng:click="reset()">
438         <div class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011/">Go to conference home page</a></div>
439 </div>
440 -->
441
442 <div class="footer"></div>
443
444 <!--
445 <div ng:show="registration.$id">
446 Permalink to <a href="#{{registration.$id}}">DRZB2011 registration</a> which you can bookmark
447 </div>
448 -->
449
450 <input type=checkbox name=debug style="float: right; clear: both">
451 <pre ng:show="debug">
452
453 dirty={{! last_saved.$equals(registration)}} invalid={{$invalidWidgets.visible()}}
454
455 registration = {{registration}}
456
457 last_saved = {{last_saved}}
458
459 master = {{master}}
460
461 symposium = {{symposium}}
462
463 $id={{$id}}
464 registration.$id={{registration.$id}}
465 </pre>
466
467 </body>
468 </html>