summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhusudan.C.S2011-01-21 02:11:59 +0530
committerMadhusudan.C.S2011-01-21 02:11:59 +0530
commita8cd6eab1a234fa2e797fae309eb04893ec0c603 (patch)
tree682c961be8375b11f394d5d0c621dfc13088001f
parent493dcfeaaacf7e51a025e645c1f966dd9dadf2bf (diff)
downloadpytask-a8cd6eab1a234fa2e797fae309eb04893ec0c603.tar.gz
pytask-a8cd6eab1a234fa2e797fae309eb04893ec0c603.tar.bz2
pytask-a8cd6eab1a234fa2e797fae309eb04893ec0c603.zip
Add uberbar messages not to claim the task. This must be disabled once claiming is possible.
-rwxr-xr-xpytask/taskapp/views.py23
1 files changed, 20 insertions, 3 deletions
diff --git a/pytask/taskapp/views.py b/pytask/taskapp/views.py
index c742f55..122d690 100755
--- a/pytask/taskapp/views.py
+++ b/pytask/taskapp/views.py
@@ -8,6 +8,7 @@ from django.core.context_processors import csrf
from django.core.urlresolvers import reverse
from django.template import RequestContext
from django.utils import simplejson as json
+from django.utils.translation import ugettext
from tagging.managers import TaggedItem
from tagging.models import Tag
@@ -20,6 +21,14 @@ from pytask.taskapp import forms as taskapp_forms
from pytask.taskapp import models as taskapp_models
+DONT_CLAIM_TASK_MSG = ugettext(
+ "Please don't submit any claims for the tasks until the workshop is "
+ "over. During the workshop we will introduce you to the work-flow of "
+ "this entire project. Also please be warned that the task claim work-"
+ "flow may change. So all the claims submitted before the workshop may "
+ "not be valid.")
+
+
@login_required
def create_task(request):
@@ -62,9 +71,7 @@ def create_task(request):
def browse_tasks(request):
- open_tasks = taskapp_models.Task.objects.filter(status=taskapp_models.TASK_STATUS_CHOICES[1][0])
- working_tasks = taskapp_models.Task.objects.filter(status=taskapp_models.TASK_STATUS_CHOICES[3][0])
- comp_tasks = taskapp_models.Task.objects.filter(status=taskapp_models.TASK_STATUS_CHOICES[6][0])
+ context = {}
# TODO(disable): Disable once the tasks can be claimed
context['uberbar_message'] = DONT_CLAIM_TASK_MSG
@@ -116,6 +123,11 @@ def view_task(request, task_id):
check for authentication and add a comment if it is a post request.
"""
+ context = {}
+
+ # TODO(disable): Disable once the tasks can be claimed
+ context['uberbar_message'] = DONT_CLAIM_TASK_MSG
+
task_url = reverse('view_task', kwargs={'task_id': task_id})
task = shortcuts.get_object_or_404(taskapp_models.Task, pk=task_id)
@@ -647,6 +659,11 @@ def edit_textbook(request, task_id):
@login_required
def claim_task(request, task_id):
+ context = {}
+
+ # TODO(disable): Disable once the tasks can be claimed
+ context['uberbar_message'] = DONT_CLAIM_TASK_MSG
+
claim_url = reverse('claim_task', kwargs={'task_id': task_id})
task = shortcuts.get_object_or_404(taskapp_models.Task, pk=task_id)