Merge lp:~cjohnston/loco-team-portal/722570 into lp:loco-team-portal

Proposed by Chris Johnston
Status: Merged
Approved by: Chris Johnston
Approved revision: 407
Merged at revision: 409
Proposed branch: lp:~cjohnston/loco-team-portal/722570
Merge into: lp:loco-team-portal
Diff against target: 120 lines (+13/-13)
2 files modified
loco_directory/events/views.py (+5/-5)
loco_directory/meetings/views.py (+8/-8)
To merge this branch: bzr merge lp:~cjohnston/loco-team-portal/722570
Reviewer Review Type Date Requested Status
Ronnie (community) Approve
Review via email: mp+50844@code.launchpad.net

Description of the change

Fixes problem described in bug as well as some other issues that were found.

To post a comment you must log in.
Revision history for this message
Ronnie (ronnie.vd.c) wrote :

Good to go

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'loco_directory/events/views.py'
--- loco_directory/events/views.py 2011-02-22 02:53:01 +0000
+++ loco_directory/events/views.py 2011-02-23 01:09:57 +0000
@@ -144,14 +144,14 @@
144 return render_to_response('events/team_event_delete_confirm.html', context, RequestContext(request))144 return render_to_response('events/team_event_delete_confirm.html', context, RequestContext(request))
145145
146 else:146 else:
147 request.user.message_set.create(message='%s %s' % (_('You can not remove this team event.'), _('You are not admin/owner of the Launchpad team or on the LoCo Council.')))147 request.user.message_set.create(message='%s %s' % (_('You can not remove this team event.'), _('You are not an admin/owner of the Launchpad team or on the LoCo Council.')))
148 return redirect( team_event_object )148 return redirect( team_event_object )
149149
150@login_required150@login_required
151def team_event_select(request):151def team_event_select(request):
152 teams = Team.objects.filter(lp_name__in=[g.name for g in request.user.groups.all()])152 teams = Team.objects.filter(lp_name__in=[g.name for g in request.user.groups.all()])
153 if len(teams) == 0:153 if len(teams) == 0:
154 request.user.message_set.create(message='%s %s' % (_('You can not add a new team event.'), _('You are not member of any of the LoCo Teams.')))154 request.user.message_set.create(message='%s %s' % (_('You can not add a new team event.'), _('You are not a member of any LoCo Teams.')))
155 return redirect( 'event-list' )155 return redirect( 'event-list' )
156 elif len(teams) == 1:156 elif len(teams) == 1:
157 from django.core import urlresolvers157 from django.core import urlresolvers
@@ -219,7 +219,7 @@
219 context, RequestContext(request))219 context, RequestContext(request))
220 else:220 else:
221 # XXX: Once we move to a new ACL system, this needs fixing.221 # XXX: Once we move to a new ACL system, this needs fixing.
222 request.user.message_set.create(message='%s %s' % (_('You can not add a new event for this team.'), _('You are not member of the team or on the LoCo Council.')))222 request.user.message_set.create(message='%s %s' % (_('You can not add a new event for this team.'), _('You are not a member of the team or on the LoCo Council.')))
223 return redirect( team_object )223 return redirect( team_object )
224224
225@login_required225@login_required
@@ -254,7 +254,7 @@
254 context, RequestContext(request))254 context, RequestContext(request))
255 else:255 else:
256 # XXX: Once we move to a new ACL system, this needs fixing.256 # XXX: Once we move to a new ACL system, this needs fixing.
257 request.user.message_set.create(message='%s %s' % (_('You can not add a new event for this team.'), _('You are not member of the team or on the LoCo Council.')))257 request.user.message_set.create(message='%s %s' % (_('You can not add a new event for this team.'), _('You are not a member of the team or on the LoCo Council.')))
258 return redirect( team_object )258 return redirect( team_object )
259259
260@login_required260@login_required
@@ -288,7 +288,7 @@
288 return render_to_response('events/team_event_update.html', 288 return render_to_response('events/team_event_update.html',
289 context, RequestContext(request))289 context, RequestContext(request))
290 else:290 else:
291 request.user.message_set.create(message='%s %s' % (_('You can not update this team event.'), _('You are not member of the team or on the LoCo Council.')))291 request.user.message_set.create(message='%s %s' % (_('You can not update this team event.'), _('You are not a member of the team or on the LoCo Council.')))
292 return redirect( team_event_object )292 return redirect( team_event_object )
293293
294@login_required294@login_required
295295
=== modified file 'loco_directory/meetings/views.py'
--- loco_directory/meetings/views.py 2011-02-22 02:53:01 +0000
+++ loco_directory/meetings/views.py 2011-02-23 01:09:57 +0000
@@ -127,14 +127,14 @@
127 return render_to_response('meetings/team_meeting_delete_confirm.html', context, RequestContext(request))127 return render_to_response('meetings/team_meeting_delete_confirm.html', context, RequestContext(request))
128128
129 else:129 else:
130 request.user.message_set.create(message='%s %s' % (_('You can not remove this team meeting.'), _('You are not admin/owner of the Launchpad team or on the LoCo Council.')))130 request.user.message_set.create(message='%s %s' % (_('You can not remove this team meeting.'), _('You are not an admin/owner of the Launchpad team or on the LoCo Council.')))
131 return redirect( team_meeting_object )131 return redirect( team_meeting_object )
132132
133@login_required133@login_required
134def team_meeting_select(request):134def team_meeting_select(request):
135 teams = Team.objects.filter(lp_name__in=[g.name for g in request.user.groups.all()])135 teams = Team.objects.filter(lp_name__in=[g.name for g in request.user.groups.all()])
136 if len(teams) == 0:136 if len(teams) == 0:
137 request.user.message_set.create(message='%s %s' % (_('You can not remove this team meeting.'), _('You are not member of any of the LoCo Teams.')))137 request.user.message_set.create(message='%s %s' % (_('You can not remove this team meeting.'), _('You are not a member of any LoCo Teams.')))
138 return redirect( 'meeting-list' )138 return redirect( 'meeting-list' )
139 elif len(teams) == 1:139 elif len(teams) == 1:
140 from django.core import urlresolvers140 from django.core import urlresolvers
@@ -197,7 +197,7 @@
197 context, RequestContext(request))197 context, RequestContext(request))
198 else:198 else:
199 # XXX: Once we move to a new ACL system, this needs fixing.199 # XXX: Once we move to a new ACL system, this needs fixing.
200 request.user.message_set.create(message='%s %s' % (_('You can not add a new meeting for this team.'), _('You are not member of the team or on the LoCo Council.')))200 request.user.message_set.create(message='%s %s' % (_('You can not add a new meeting for this team.'), _('You are not a member of the team or on the LoCo Council.')))
201 return redirect( team_object )201 return redirect( team_object )
202202
203@login_required203@login_required
@@ -232,7 +232,7 @@
232 context, RequestContext(request))232 context, RequestContext(request))
233 else:233 else:
234 # XXX: Once we move to a new ACL system, this needs fixing.234 # XXX: Once we move to a new ACL system, this needs fixing.
235 request.user.message_set.create(message='%s %s' % (_('You can not add a new meeting for this team.'), _('You are not member of the team or on the LoCo Council.')))235 request.user.message_set.create(message='%s %s' % (_('You can not add a new meeting for this team.'), _('You are not a member of the team or on the LoCo Council.')))
236 return redirect( team_object )236 return redirect( team_object )
237237
238@login_required238@login_required
@@ -266,7 +266,7 @@
266 return render_to_response('meetings/team_meeting_update.html', 266 return render_to_response('meetings/team_meeting_update.html',
267 context, RequestContext(request))267 context, RequestContext(request))
268 else:268 else:
269 request.user.message_set.create(message='%s %s' % (_('You can not update this team meeting.'), _('You are not member of the team or on the LoCo Council.')))269 request.user.message_set.create(message='%s %s' % (_('You can not update this team meeting.'), _('You are not a member of the team or on the LoCo Council.')))
270 return redirect( team_meeting_object )270 return redirect( team_meeting_object )
271271
272@login_required272@login_required
@@ -308,7 +308,7 @@
308 context, RequestContext(request))308 context, RequestContext(request))
309 else:309 else:
310 # XXX: Once we move to a new ACL system, this needs fixing.310 # XXX: Once we move to a new ACL system, this needs fixing.
311 request.user.message_set.create(message='%s %s' % (_('You can not add a new agenda item for this team meeting.'), _('You are not member of the team or on the LoCo Council.')))311 request.user.message_set.create(message='%s %s' % (_('You can not add a new agenda item for this team meeting.'), _('You are not a member of the team or on the LoCo Council.')))
312 return redirect( team_meeting_object )312 return redirect( team_meeting_object )
313313
314@login_required314@login_required
@@ -345,7 +345,7 @@
345 return render_to_response('meetings/agenda_item_update.html', 345 return render_to_response('meetings/agenda_item_update.html',
346 context, RequestContext(request))346 context, RequestContext(request))
347 else:347 else:
348 request.user.message_set.create(message='%s %s' % (_('You can not update this team meeting agenda.'), _('You are not member of the team or on the LoCo Council.')))348 request.user.message_set.create(message='%s %s' % (_('You can not update this team meeting agenda.'), _('You are not a member of the team or on the LoCo Council.')))
349 return redirect( team_meeting_object )349 return redirect( team_meeting_object )
350350
351@login_required351@login_required
@@ -376,5 +376,5 @@
376 return render_to_response('meetings/agenda_item_delete_confirm.html', context, RequestContext(request))376 return render_to_response('meetings/agenda_item_delete_confirm.html', context, RequestContext(request))
377377
378 else:378 else:
379 request.user.message_set.create(message='%s %s' % (_('You can not remove this agenda item.'), _('You are not admin/owner of the Launchpad team or on the LoCo Council.')))379 request.user.message_set.create(message='%s %s' % (_('You can not remove this agenda item.'), _('You are not an admin/owner of the Launchpad team or on the LoCo Council.')))
380 return redirect( team_meeting_object )380 return redirect( team_meeting_object )

Subscribers

People subscribed via source and target branches