diff options
-rw-r--r-- | src/meetingtools/apps/room/views.py | 6 | ||||
-rw-r--r-- | src/meetingtools/urls.py | 1 | ||||
-rw-r--r-- | src/templates/apps/room/list.html | 3 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py index f4da0df..866199d 100644 --- a/src/meetingtools/apps/room/views.py +++ b/src/meetingtools/apps/room/views.py @@ -314,6 +314,12 @@ def user_rooms(request): {'title':'Your Rooms','edit':True,'active':len(rooms) == 1,'rooms':rooms}) @login_required +def unlock(request,id): + room = get_object_or_404(Room,pk=id) + room.unlock() + return redirect_to("/rooms#%d" % room.id) + +@login_required def delete(request,id): room = get_object_or_404(Room,pk=id) if request.method == 'POST': diff --git a/src/meetingtools/urls.py b/src/meetingtools/urls.py index bfac344..4dd8bcb 100644 --- a/src/meetingtools/urls.py +++ b/src/meetingtools/urls.py @@ -28,6 +28,7 @@ urlpatterns = patterns('', (r'^room/(\d+)$','meetingtools.apps.room.views.view'), (r'^room/(\d+)/modify$','meetingtools.apps.room.views.update'), (r'^room/(\d+)/delete$','meetingtools.apps.room.views.delete'), + (r'^room/(\d+)/unlock$','meetingtools.apps.room.views.unlock'), (r'^room/(\d+)/tag$','meetingtools.apps.room.views.tag'), (r'^room/(\d+)/untag/(.+)$','meetingtools.apps.room.views.untag'), (r'^room/(\d+)/recordings$','meetingtools.apps.room.views.recordings'), diff --git a/src/templates/apps/room/list.html b/src/templates/apps/room/list.html index 0f1710c..f0906fc 100644 --- a/src/templates/apps/room/list.html +++ b/src/templates/apps/room/list.html @@ -48,8 +48,11 @@ <li class="button"><a href="{% prefix %}/room/{{r.id}}/tag">Room Tags</a></li> <li class="button"><a href="{% prefix %}/room/{{r.id}}/recordings">Room Recordings</a></li> <li class="button"><a href="{% prefix %}/room/{{r.id}}/modify">Modify Room</a></li> + <li class="button"><a href="{% prefix %}/room/{{r.id}}/unlock">Unlock Room</a></li> + {% if room.is_locked %} <li class="button"><a href="{% prefix %}/room/{{r.id}}/delete">Delete Room</a></li> {% endif %} + {% endif %} </ul> </div> </div> |