Merge lp:~mhall119/loco-team-portal/event-attendee-registration into lp:loco-team-portal
- event-attendee-registration
- Merge into 0.2
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~mhall119/loco-team-portal/event-attendee-registration | ||||
Merge into: | lp:loco-team-portal | ||||
Diff against target: |
671 lines (+218/-78) 8 files modified
loco_directory/events/forms.py (+8/-2) loco_directory/events/models.py (+12/-2) loco_directory/events/urls.py (+1/-0) loco_directory/events/views.py (+25/-0) loco_directory/locale/loco-directory.pot (+129/-65) loco_directory/templates/events/team_event_detail.html (+19/-7) loco_directory/templates/events/team_event_register.html (+21/-0) loco_directory/templates/teams/team_detail.html (+3/-2) |
||||
To merge this branch: | bzr merge lp:~mhall119/loco-team-portal/event-attendee-registration | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
LoCo Team Portal Developers | Pending | ||
Review via email: mp+17073@code.launchpad.net |
This proposal has been superseded by a proposal from 2010-01-10.
Commit message
Description of the change
Michael Hall (mhall119) wrote : | # |
Thomas Bechtold (toabctl) wrote : | # |
some ideas:
- what does RSVP mean?
- ATTENDEE_
- for rsvp in self.attendee_
- form.is_valid(): ... a simple form.save() should work instead of attendee_
- would be cool if the translation file will be updated in an extra merge request because it's a more difficult to check the merge request with all the translation stuff inside.
Michael Hall (mhall119) wrote : | # |
RSVP is an acronym for a French term meaning "Please Reply" or something to that effect. I changed all user-visible instances to use "Register for Event" instead.
Meetup.com had the ability to register as not coming to an event, which is why I included it. Moreover, once you've registered "Coming" or "Maybe", if your plans change you would have to de-register without a "Not Coming" option.
I will make the change to use a filter on TeamEvent.
The problem with form.save() is that it would require having the attendee and team_event be passed as hidden form parameters or they will be None in the Attendee instance and I would have to manually set them and call attendee_
I agree that something different should be done with the translations file, should we talk to dholbach about that?
- 33. By Michael Hall
-
Modification from merge comments. Replaced RSVP with Registration, use only form.save, and use SQL filtering for TeamEvent.
is_attending
Michael Hall (mhall119) wrote : | # |
Nevermind my reply about form.save, you were right it does work in this case. My new merge propose has that fix in it too.
Unmerged revisions
Preview Diff
1 | === modified file 'loco_directory/events/forms.py' |
2 | --- loco_directory/events/forms.py 2010-01-05 14:40:39 +0000 |
3 | +++ loco_directory/events/forms.py 2010-01-10 14:16:15 +0000 |
4 | @@ -1,7 +1,7 @@ |
5 | # -*- coding: utf-8 -*- |
6 | |
7 | from django import forms |
8 | -from models import BaseEvent, GlobalEvent, TeamEvent |
9 | +from models import BaseEvent, GlobalEvent, TeamEvent, Attendee |
10 | |
11 | |
12 | |
13 | @@ -49,5 +49,11 @@ |
14 | # exclude = ('date_created') |
15 | |
16 | |
17 | - |
18 | +class AttendeeRegistrationForm(forms.ModelForm): |
19 | + """ |
20 | + a form to create/update an Attendee object |
21 | + """ |
22 | + class Meta: |
23 | + model = Attendee |
24 | + exclude = ('attendee', 'team_event') |
25 | |
26 | |
27 | === modified file 'loco_directory/events/models.py' |
28 | --- loco_directory/events/models.py 2010-01-08 12:26:31 +0000 |
29 | +++ loco_directory/events/models.py 2010-01-10 14:16:15 +0000 |
30 | @@ -2,10 +2,12 @@ |
31 | from teams.models import * |
32 | from venues.models import Venue |
33 | from django.utils.translation import ugettext_lazy as _ |
34 | +from django.contrib.auth.models import User |
35 | |
36 | ATTENDEE_PROMISE_CHOICES = ( |
37 | ('sure', _('come for sure')), |
38 | - ('maybe', _('come maybe')), |
39 | + ('maybe', _('maybe coming')), |
40 | + ('not', _('not coming')), |
41 | ) |
42 | |
43 | import datetime |
44 | @@ -111,6 +113,9 @@ |
45 | def get_absolute_url(self): |
46 | return ('team-event-detail', [str(self.id)]) |
47 | |
48 | + def is_attending(self, user): |
49 | + return self.attendee_set.filter(attendee=user).count() > 0 |
50 | + |
51 | #add manager |
52 | objects = TeamEventManager() |
53 | |
54 | @@ -121,6 +126,7 @@ |
55 | """ |
56 | team_event = models.ForeignKey(TeamEvent, help_text=_('the Team Event')) |
57 | date_created = models.DateTimeField(help_text=_('the date and time when the event comment was created'), default=datetime.datetime.now(), db_index=True) |
58 | + comment_by = models.ForeignKey(User) |
59 | comment = models.TextField(help_text=_('Comment this Event'), db_index=True) |
60 | |
61 | def __unicode__(self): |
62 | @@ -132,9 +138,13 @@ |
63 | """ |
64 | a event attendee |
65 | """ |
66 | + class Meta: |
67 | + unique_together = ('team_event', 'attendee') |
68 | + |
69 | team_event = models.ForeignKey(TeamEvent, help_text=_('the Team Event')) |
70 | - attendee = models.CharField(help_text=_('the name of the attendee'), max_length=100) |
71 | + attendee = models.ForeignKey(User, help_text=_('the name of the attendee')) |
72 | promise = models.CharField(help_text=_('how safe do you come'), max_length=50, choices=ATTENDEE_PROMISE_CHOICES) |
73 | + guests = models.PositiveSmallIntegerField(help_text=_('the number of guests coming with attendee')) |
74 | |
75 | def __unicode__(self): |
76 | return self.attendee |
77 | |
78 | === modified file 'loco_directory/events/urls.py' |
79 | --- loco_directory/events/urls.py 2010-01-06 21:30:56 +0000 |
80 | +++ loco_directory/events/urls.py 2010-01-10 14:16:15 +0000 |
81 | @@ -6,6 +6,7 @@ |
82 | url(r'^history/$', 'events.views.event_history_list', name='event-history-list'), |
83 | #team events |
84 | url(r'^team/ical/$', 'events.views.team_event_list_ical', name='team-event-list-ical'), |
85 | + url(r'^team/(?P<team_event_id>\d+)/register/$', 'events.views.team_event_register', name='team-event-register'), |
86 | url(r'^team/(?P<team_event_id>\d+)/detail/$', 'events.views.team_event_detail', name='team-event-detail'), |
87 | url(r'^team/(?P<team_event_id>\d+)/update/$', 'events.views.team_event_update', name='team-event-update'), |
88 | url(r'^team/(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/add/$', 'events.views.team_event_new', name='team-event-new'), |
89 | |
90 | === modified file 'loco_directory/events/views.py' |
91 | --- loco_directory/events/views.py 2010-01-08 12:26:31 +0000 |
92 | +++ loco_directory/events/views.py 2010-01-10 14:16:15 +0000 |
93 | @@ -11,9 +11,11 @@ |
94 | from events.models import TeamEvent |
95 | from events.models import GlobalEvent |
96 | from teams.models import Team |
97 | +from events.models import Attendee |
98 | |
99 | from forms import TeamEventForm |
100 | from forms import GlobalEventForm |
101 | +from forms import AttendeeRegistrationForm |
102 | |
103 | from common import launchpad |
104 | |
105 | @@ -74,6 +76,7 @@ |
106 | team_event_object = get_object_or_404(TeamEvent, pk=team_event_id) |
107 | context = { |
108 | 'team_event_object': team_event_object, |
109 | + 'user_is_attending': team_event_object.is_attending(request.user) |
110 | } |
111 | return render_to_response('events/team_event_detail.html', |
112 | context, RequestContext(request)) |
113 | @@ -143,6 +146,28 @@ |
114 | return redirect( team_event_object ) |
115 | |
116 | |
117 | +def team_event_register(request, team_event_id): |
118 | + team_event_object = get_object_or_404(TeamEvent, pk=team_event_id) |
119 | + if team_event_object.is_attending(request.user): |
120 | + attendee_object = team_event_object.attendee_set.get(attendee=request.user) |
121 | + else: |
122 | + attendee_object = Attendee(team_event=team_event_object, attendee=request.user) |
123 | + |
124 | + if request.method == 'POST': |
125 | + form = AttendeeRegistrationForm(instance=attendee_object, data=request.POST) |
126 | + if form.is_valid(): |
127 | + form.save() |
128 | + request.user.message_set.create(message=_('Your registration has been saved')) |
129 | + return redirect( team_event_object ) |
130 | + else: |
131 | + form = AttendeeRegistrationForm(instance=attendee_object) |
132 | + |
133 | + context = { |
134 | + 'form': form |
135 | + } |
136 | + |
137 | + return render_to_response('events/team_event_register.html', |
138 | + context, RequestContext(request)) |
139 | |
140 | ################################################################# |
141 | # Global Events |
142 | |
143 | === modified file 'loco_directory/locale/loco-directory.pot' |
144 | --- loco_directory/locale/loco-directory.pot 2010-01-05 14:09:50 +0000 |
145 | +++ loco_directory/locale/loco-directory.pot 2010-01-10 14:16:15 +0000 |
146 | @@ -8,7 +8,7 @@ |
147 | msgstr "" |
148 | "Project-Id-Version: PACKAGE VERSION\n" |
149 | "Report-Msgid-Bugs-To: \n" |
150 | -"POT-Creation-Date: 2010-01-05 14:09+0000\n" |
151 | +"POT-Creation-Date: 2010-01-10 14:09+0000\n" |
152 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
153 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
154 | "Language-Team: LANGUAGE <LL@li.org>\n" |
155 | @@ -16,12 +16,16 @@ |
156 | "Content-Type: text/plain; charset=UTF-8\n" |
157 | "Content-Transfer-Encoding: 8bit\n" |
158 | |
159 | -#: events/models.py:7 |
160 | +#: events/models.py:8 |
161 | msgid "come for sure" |
162 | msgstr "" |
163 | |
164 | -#: events/models.py:8 |
165 | -msgid "come maybe" |
166 | +#: events/models.py:9 |
167 | +msgid "maybe coming" |
168 | +msgstr "" |
169 | + |
170 | +#: events/models.py:10 |
171 | +msgid "not coming" |
172 | msgstr "" |
173 | |
174 | #: events/models.py:19 |
175 | @@ -56,169 +60,189 @@ |
176 | msgid "the date and time when the event was created" |
177 | msgstr "" |
178 | |
179 | -#: events/models.py:52 |
180 | +#: events/models.py:68 |
181 | msgid "Hash Tag used for microbloggers to mention this event" |
182 | msgstr "" |
183 | |
184 | -#: events/models.py:52 |
185 | +#: events/models.py:68 |
186 | msgid "Microblogging Hash Tag" |
187 | msgstr "" |
188 | |
189 | -#: events/models.py:53 |
190 | +#: events/models.py:69 |
191 | msgid "tag used in welb albums like; picasa, flickr, and more" |
192 | msgstr "" |
193 | |
194 | -#: events/models.py:53 |
195 | +#: events/models.py:69 |
196 | msgid "Picture Tag" |
197 | msgstr "" |
198 | |
199 | -#: events/models.py:86 |
200 | +#: events/models.py:106 |
201 | msgid "teams of this event." |
202 | msgstr "" |
203 | |
204 | -#: events/models.py:86 |
205 | +#: events/models.py:106 |
206 | msgid "Teams Participating" |
207 | msgstr "" |
208 | |
209 | -#: events/models.py:87 |
210 | +#: events/models.py:107 |
211 | msgid "this team event is part of the selected global event" |
212 | msgstr "" |
213 | |
214 | -#: events/models.py:87 |
215 | +#: events/models.py:107 |
216 | msgid "Related Global Event" |
217 | msgstr "" |
218 | |
219 | -#: events/models.py:88 |
220 | +#: events/models.py:108 |
221 | msgid "Venue of the Event" |
222 | msgstr "" |
223 | |
224 | -#: events/models.py:100 events/models.py:110 |
225 | +#: events/models.py:127 events/models.py:144 |
226 | msgid "the Team Event" |
227 | msgstr "" |
228 | |
229 | -#: events/models.py:101 |
230 | +#: events/models.py:128 |
231 | msgid "the date and time when the event comment was created" |
232 | msgstr "" |
233 | |
234 | -#: events/models.py:102 |
235 | +#: events/models.py:130 |
236 | msgid "Comment this Event" |
237 | msgstr "" |
238 | |
239 | -#: events/models.py:111 |
240 | +#: events/models.py:145 |
241 | msgid "the name of the attendee" |
242 | msgstr "" |
243 | |
244 | -#: events/models.py:112 |
245 | +#: events/models.py:146 |
246 | msgid "how safe do you come" |
247 | msgstr "" |
248 | |
249 | -#: events/views.py:76 |
250 | +#: events/models.py:147 |
251 | +msgid "the number of guests coming with attendee" |
252 | +msgstr "" |
253 | + |
254 | +#: events/views.py:101 |
255 | msgid "New event created" |
256 | msgstr "" |
257 | |
258 | -#: events/views.py:88 |
259 | +#: events/views.py:113 |
260 | msgid "You can not add a new event for this team." |
261 | msgstr "" |
262 | |
263 | -#: events/views.py:102 |
264 | +#: events/views.py:134 |
265 | msgid "Team Event updated" |
266 | msgstr "" |
267 | |
268 | -#: events/views.py:144 |
269 | +#: events/views.py:145 |
270 | +msgid "You can not update this team event." |
271 | +msgstr "" |
272 | + |
273 | +#: events/views.py:160 |
274 | +msgid "Your registration has been saved" |
275 | +msgstr "" |
276 | + |
277 | +#: events/views.py:198 |
278 | msgid "New Global Event created" |
279 | msgstr "" |
280 | |
281 | -#: events/views.py:155 |
282 | +#: events/views.py:209 |
283 | msgid "You can not add a new global event." |
284 | msgstr "" |
285 | |
286 | -#: events/views.py:169 |
287 | +#: events/views.py:225 |
288 | msgid "Global Event updated" |
289 | msgstr "" |
290 | |
291 | -#: teams/models.py:8 |
292 | +#: events/views.py:236 |
293 | +msgid "You can not update this global event." |
294 | +msgstr "" |
295 | + |
296 | +#: teams/forms.py:22 templates/teams/team_list.html:19 |
297 | +msgid "Search" |
298 | +msgstr "" |
299 | + |
300 | +#: teams/models.py:9 |
301 | msgid "Launchpad ID" |
302 | msgstr "" |
303 | |
304 | -#: teams/models.py:13 |
305 | +#: teams/models.py:14 |
306 | msgid "Launchpad Team ID" |
307 | msgstr "" |
308 | |
309 | -#: teams/models.py:14 |
310 | +#: teams/models.py:15 |
311 | msgid "Team Name" |
312 | msgstr "" |
313 | |
314 | -#: teams/models.py:15 |
315 | +#: teams/models.py:16 |
316 | msgid "Country" |
317 | msgstr "" |
318 | |
319 | -#: teams/models.py:16 |
320 | +#: teams/models.py:17 |
321 | msgid "State/Province/Region" |
322 | msgstr "" |
323 | |
324 | -#: teams/models.py:17 templates/venues/venue_detail.html:19 |
325 | +#: teams/models.py:18 templates/venues/venue_detail.html:19 |
326 | msgid "City" |
327 | msgstr "" |
328 | |
329 | -#: teams/models.py:18 |
330 | +#: teams/models.py:19 |
331 | msgid "Ubuntu Wiki Page" |
332 | msgstr "" |
333 | |
334 | -#: teams/models.py:19 |
335 | +#: teams/models.py:20 |
336 | msgid "Website" |
337 | msgstr "" |
338 | |
339 | -#: teams/models.py:20 |
340 | +#: teams/models.py:21 |
341 | msgid "Mailing List URL" |
342 | msgstr "" |
343 | |
344 | -#: teams/models.py:21 |
345 | +#: teams/models.py:22 |
346 | msgid "Forums URL" |
347 | msgstr "" |
348 | |
349 | -#: teams/models.py:22 templates/teams/team_detail.html:80 |
350 | +#: teams/models.py:23 templates/teams/team_detail.html:79 |
351 | msgid "Email Address" |
352 | msgstr "" |
353 | |
354 | -#: teams/models.py:23 templates/teams/team_detail.html:74 |
355 | +#: teams/models.py:24 templates/teams/team_detail.html:73 |
356 | msgid "IRC Channel" |
357 | msgstr "" |
358 | |
359 | -#: teams/models.py:25 |
360 | +#: teams/models.py:26 |
361 | msgid "" |
362 | "IRC Channel name that is hosted on the freenode IRC network. Ex. #ubuntu-" |
363 | "chicago" |
364 | msgstr "" |
365 | |
366 | -#: teams/models.py:27 |
367 | +#: teams/models.py:28 |
368 | msgid "Provides local support" |
369 | msgstr "" |
370 | |
371 | -#: teams/models.py:29 |
372 | +#: teams/models.py:30 |
373 | msgid "Approved Team" |
374 | msgstr "" |
375 | |
376 | -#: teams/models.py:30 |
377 | +#: teams/models.py:31 |
378 | msgid "Date Approved" |
379 | msgstr "" |
380 | |
381 | -#: teams/models.py:31 |
382 | +#: teams/models.py:32 |
383 | msgid "Date Expires" |
384 | msgstr "" |
385 | |
386 | -#: teams/models.py:32 |
387 | +#: teams/models.py:33 |
388 | msgid "Launchpad Team Owner" |
389 | msgstr "" |
390 | |
391 | -#: teams/models.py:34 |
392 | +#: teams/models.py:35 |
393 | msgid "URL of mugshot" |
394 | msgstr "" |
395 | |
396 | -#: teams/views.py:88 |
397 | +#: teams/views.py:97 |
398 | msgid "Team details updated" |
399 | msgstr "" |
400 | |
401 | -#: teams/views.py:91 |
402 | +#: teams/views.py:100 |
403 | msgid "Team details could not be saved." |
404 | msgstr "" |
405 | |
406 | @@ -456,6 +480,14 @@ |
407 | msgstr "" |
408 | |
409 | #: templates/events/event_list.html:32 |
410 | +msgid "Get the team events in ical Calendar format" |
411 | +msgstr "" |
412 | + |
413 | +#: templates/events/event_list.html:32 |
414 | +msgid "Calendar ical" |
415 | +msgstr "" |
416 | + |
417 | +#: templates/events/event_list.html:36 |
418 | msgid "There are currently no LoCo Team Events :(" |
419 | msgstr "" |
420 | |
421 | @@ -485,7 +517,6 @@ |
422 | |
423 | #: templates/events/global_event_detail.html:22 |
424 | #: templates/events/global_event_detail.html:46 |
425 | -#: templates/events/team_event_detail.html:22 |
426 | #: templates/events/team_event_detail.html:46 |
427 | msgid "Comment:" |
428 | msgstr "" |
429 | @@ -556,10 +587,35 @@ |
430 | msgid "Edit team event details." |
431 | msgstr "" |
432 | |
433 | -#: templates/events/team_event_detail.html:50 |
434 | +#: templates/events/team_event_detail.html:22 |
435 | +msgid "Description:" |
436 | +msgstr "" |
437 | + |
438 | +#: templates/events/team_event_detail.html:52 |
439 | +msgid "Change your Registration Status" |
440 | +msgstr "" |
441 | + |
442 | +#: templates/events/team_event_detail.html:54 |
443 | +msgid "Register for this Event" |
444 | +msgstr "" |
445 | + |
446 | +#: templates/events/team_event_detail.html:57 |
447 | +msgid "" |
448 | +"You must <a href=\"/openid/login\">log in</a> to register for this event." |
449 | +msgstr "" |
450 | + |
451 | +#: templates/events/team_event_detail.html:62 |
452 | msgid "Event Attendees" |
453 | msgstr "" |
454 | |
455 | +#: templates/events/team_event_detail.html:62 |
456 | +msgid "Registration Status" |
457 | +msgstr "" |
458 | + |
459 | +#: templates/events/team_event_detail.html:62 |
460 | +msgid "Guests" |
461 | +msgstr "" |
462 | + |
463 | #: templates/events/team_event_new.html:4 |
464 | msgid "New Team Event" |
465 | msgstr "" |
466 | @@ -568,6 +624,14 @@ |
467 | msgid "Add new Team Event" |
468 | msgstr "" |
469 | |
470 | +#: templates/events/team_event_register.html:4 |
471 | +msgid "Team Event Registration" |
472 | +msgstr "" |
473 | + |
474 | +#: templates/events/team_event_register.html:12 |
475 | +msgid "Register for event " |
476 | +msgstr "" |
477 | + |
478 | #: templates/events/team_event_update.html:4 |
479 | #: templates/events/team_event_update.html:12 |
480 | msgid "Update Team Event" |
481 | @@ -581,63 +645,63 @@ |
482 | msgid "Edit team details." |
483 | msgstr "" |
484 | |
485 | -#: templates/teams/team_detail.html:24 |
486 | +#: templates/teams/team_detail.html:23 |
487 | msgid "Add new Event." |
488 | msgstr "" |
489 | |
490 | -#: templates/teams/team_detail.html:34 |
491 | +#: templates/teams/team_detail.html:33 |
492 | msgid "Location:" |
493 | msgstr "" |
494 | |
495 | -#: templates/teams/team_detail.html:38 templates/teams/team_detail.html:100 |
496 | +#: templates/teams/team_detail.html:37 templates/teams/team_detail.html:100 |
497 | msgid "None Specified" |
498 | msgstr "" |
499 | |
500 | -#: templates/teams/team_detail.html:43 |
501 | +#: templates/teams/team_detail.html:42 |
502 | msgid "Team Owner:" |
503 | msgstr "" |
504 | |
505 | -#: templates/teams/team_detail.html:49 |
506 | +#: templates/teams/team_detail.html:48 |
507 | msgid "Approval Date:" |
508 | msgstr "" |
509 | |
510 | -#: templates/teams/team_detail.html:55 |
511 | +#: templates/teams/team_detail.html:54 |
512 | msgid "Expires Date:" |
513 | msgstr "" |
514 | |
515 | -#: templates/teams/team_detail.html:61 |
516 | +#: templates/teams/team_detail.html:60 |
517 | msgid "Admins:" |
518 | msgstr "" |
519 | |
520 | -#: templates/teams/team_detail.html:68 |
521 | +#: templates/teams/team_detail.html:67 |
522 | msgid "Resources:" |
523 | msgstr "" |
524 | |
525 | -#: templates/teams/team_detail.html:71 |
526 | +#: templates/teams/team_detail.html:70 |
527 | msgid "Team Wiki" |
528 | msgstr "" |
529 | |
530 | -#: templates/teams/team_detail.html:77 |
531 | +#: templates/teams/team_detail.html:76 |
532 | msgid "Team Mailing List" |
533 | msgstr "" |
534 | |
535 | -#: templates/teams/team_detail.html:83 |
536 | +#: templates/teams/team_detail.html:82 |
537 | msgid "Team Forums" |
538 | msgstr "" |
539 | |
540 | -#: templates/teams/team_detail.html:86 |
541 | +#: templates/teams/team_detail.html:85 |
542 | msgid "Team Website" |
543 | msgstr "" |
544 | |
545 | -#: templates/teams/team_detail.html:89 |
546 | +#: templates/teams/team_detail.html:88 |
547 | msgid "Provides Support" |
548 | msgstr "" |
549 | |
550 | -#: templates/teams/team_detail.html:95 |
551 | +#: templates/teams/team_detail.html:94 |
552 | msgid "Upcoming Events:" |
553 | msgstr "" |
554 | |
555 | -#: templates/teams/team_detail.html:99 |
556 | +#: templates/teams/team_detail.html:98 |
557 | #, python-format |
558 | msgid "%(start_date)s in %(city)s" |
559 | msgstr "" |
560 | @@ -665,15 +729,15 @@ |
561 | msgid "Ubuntu LoCo Teams List" |
562 | msgstr "" |
563 | |
564 | -#: templates/teams/team_list.html:9 |
565 | +#: templates/teams/team_list.html:12 |
566 | msgid "Ubuntu LoCo Teams" |
567 | msgstr "" |
568 | |
569 | -#: templates/teams/team_list.html:13 |
570 | +#: templates/teams/team_list.html:16 |
571 | msgid "Select a team below to see more information about it:" |
572 | msgstr "" |
573 | |
574 | -#: templates/teams/team_list.html:27 |
575 | +#: templates/teams/team_list.html:34 |
576 | msgid "There are currently no teams in the Ubuntu LoCo Directory. :(" |
577 | msgstr "" |
578 | |
579 | |
580 | === modified file 'loco_directory/templates/events/team_event_detail.html' |
581 | --- loco_directory/templates/events/team_event_detail.html 2009-12-21 20:45:43 +0000 |
582 | +++ loco_directory/templates/events/team_event_detail.html 2010-01-10 14:16:15 +0000 |
583 | @@ -10,7 +10,7 @@ |
584 | <p><b><a href="{% url team-event-update team_event_object.id %}">{% trans "Edit team event details." %}</a></b></p> |
585 | {% endif %} |
586 | <h2>{{team_event_object.name}}</h2> |
587 | -<table cellpadding="0" cellspacing="0"> |
588 | +<table cellpadding="3" cellspacing="0"> |
589 | <tr><th colspan="2">{% trans "Event Information" %}</th></tr> |
590 | {% if team_event_object.date_begin %} |
591 | <tr><td width="35%"><strong>{% trans "Date begin:" %}</strong></td><td>{% trans team_event_object.date_begin %}</td></tr> |
592 | @@ -18,8 +18,8 @@ |
593 | {% if team_event_object.date_end %} |
594 | <tr><td width="35%"><strong>{% trans "Date end:" %}</strong></td><td>{% trans team_event_object.date_end %}</td></tr> |
595 | {% endif %} |
596 | -{% if team_event_object.comment %} |
597 | -<tr><td width="35%"><strong>{% trans "Comment:" %}</strong></td><td>{% trans team_event_object.comment %}</td></tr> |
598 | +{% if team_event_object.description %} |
599 | +<tr><td width="35%"><strong>{% trans "Description:" %}</strong></td><td>{% trans team_event_object.description %}</td></tr> |
600 | {% endif %} |
601 | |
602 | <tr><th colspan="2">{% trans "Location Information" %}</th></tr> |
603 | @@ -46,10 +46,22 @@ |
604 | <tr><td width="35%"><strong>{% trans "Comment:" %}</strong></td><td>{% trans team_event_object.venue.comment %}</td></tr> |
605 | {% endif %} |
606 | |
607 | -{% if team_event_object.attendee.all %} |
608 | -<tr><th colspan="2">{% trans "Event Attendees" %}</th></tr> |
609 | -{% for attendee in team_event_object.attendee.all %} |
610 | -{{attendee.name}} |
611 | +<tr><td colspan="2"> |
612 | +{% if user.is_authenticated %} |
613 | +{% if user_is_attending %} |
614 | +<a href="{% url team-event-register team_event_object.id %}">{% trans 'Change your Registration Status' %}</a> |
615 | +{% else %} |
616 | +<a href="{% url team-event-register team_event_object.id %}">{% trans 'Register for this Event' %}</a> |
617 | +{% endif %} |
618 | +{% else %} |
619 | +{% blocktrans %}You must <a href="/openid/login">log in</a> to register for this event.{% endblocktrans %} |
620 | +{% endif %} |
621 | +</td></tr> |
622 | + |
623 | +{% if team_event_object.attendee_set.all %} |
624 | +<tr><th>{% trans "Event Attendees" %}</th><th>{% trans "Registration Status" %}</th><th>{% trans "Guests" %}</th></tr> |
625 | +{% for registration in team_event_object.attendee_set.all %} |
626 | +<tr><td>{{registration.attendee.username}}</td><td align="center">{{registration.get_promise_display}}</td><td align="center">{{registration.guests}}</td></tr> |
627 | {% endfor %} |
628 | {% endif %} |
629 | |
630 | |
631 | === added file 'loco_directory/templates/events/team_event_register.html' |
632 | --- loco_directory/templates/events/team_event_register.html 1970-01-01 00:00:00 +0000 |
633 | +++ loco_directory/templates/events/team_event_register.html 2010-01-10 14:16:15 +0000 |
634 | @@ -0,0 +1,21 @@ |
635 | +{% extends "base.html" %} |
636 | +{% load i18n admin_modify adminmedia %} |
637 | + |
638 | +{% block title %}{% trans "Team Event Registration" %}{% endblock %} |
639 | + |
640 | +{% block extrahead %}{{ block.super }} |
641 | +{{form.media}} |
642 | +{% endblock %} |
643 | + |
644 | +{% block content %} |
645 | + |
646 | +<h1>{% trans "Register for event " %}</h1> |
647 | +<form action="." method="post"> |
648 | + <table> |
649 | + {{ form.as_table }} |
650 | + </table> |
651 | + <p><input type="submit" value="Submit" /></p> |
652 | +</form> |
653 | + |
654 | + |
655 | +{% endblock %} |
656 | |
657 | === modified file 'loco_directory/templates/teams/team_detail.html' |
658 | --- loco_directory/templates/teams/team_detail.html 2010-01-06 19:14:12 +0000 |
659 | +++ loco_directory/templates/teams/team_detail.html 2010-01-10 14:16:15 +0000 |
660 | @@ -95,8 +95,9 @@ |
661 | <td>{% if team.teamevent_set.next_5_events %} |
662 | {% for team_event in team.teamevent_set.next_5_events %} |
663 | {% comment %}TRANSLATORS: If event has a venue, show: date "in" city{% endcomment %} |
664 | - <a title="{% if team_event.venue %}{% blocktrans with team_event.date_begin|date:"M d" as start_date and team_event.venue.city as city %}{{start_date}} in {{city}}{% endblocktrans %}{% else %}{{team_event.date_begin|date:"M d"}}{% endif %}" href="{% url team-event-detail team_event.id %}">{{ team_event.name }}</a>{% if not forloop.last %},{% endif %} (<a href="{% url team-event-list team.lp_name %}">{% trans "Show detailed Event List" %}</a>) |
665 | - {% endfor %}{% else %}{% trans "None Specified" %}{% endif %}</td> |
666 | + <a title="{% if team_event.venue %}{% blocktrans with team_event.date_begin|date:"M d" as start_date and team_event.venue.city as city %}{{start_date}} in {{city}}{% endblocktrans %}{% else %}{{team_event.date_begin|date:"M d"}}{% endif %}" href="{% url team-event-detail team_event.id %}">{{ team_event.name }}</a>{% if not forloop.last %},{% endif %} |
667 | + {% endfor %} (<a href="{% url team-event-list team.lp_name %}">{% trans "Show detailed Event List" %}</a>) |
668 | + {% else %}{% trans "None Specified" %}{% endif %}</td> |
669 | </tr> |
670 | |
671 | </table> |
Added elements to allow users to login and register for an event