From e669b2cd9b71c1f83b844f8919bfdaae16e3166c Mon Sep 17 00:00:00 2001 From: nishanth Date: Sun, 28 Feb 2010 04:17:15 +0530 Subject: provided links to make a raise the privileges of a user. --- taskapp/management/commands/seed_db.py | 2 +- templates/index.html | 59 ++++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/taskapp/management/commands/seed_db.py b/taskapp/management/commands/seed_db.py index c4ed25e..ff808a9 100644 --- a/taskapp/management/commands/seed_db.py +++ b/taskapp/management/commands/seed_db.py @@ -32,7 +32,7 @@ def seed_db(): create_request(defaultMentor, "DV", user) elif i%2==0: create_request(defaultMentor, "AD", user) - elif i in ["7", "13"]: + elif i in [7, 13]: user.is_active = False user.save() diff --git a/templates/index.html b/templates/index.html index 435517c..755ceef 100644 --- a/templates/index.html +++ b/templates/index.html @@ -12,60 +12,69 @@ Logged in as {{ user.username }}
{% endif %} - {% if can_create_task %} - Create a task
- {% endif %} - {% if notifications.count %} -
{{ notifications.count }} unread + You have {{ notifications.count }} unread {% ifnotequal notifications.count 1 %} - notifications!! + notifications {% else %} - notification!! - {% endifnotequal %} + notification + {% endifnotequal %}
{% endif %} {% if requests.count %} -
{{ requests.count }} unreplied + You have {{ requests.count }} unreplied {% ifnotequal requests.count 1 %} - requests! + requests {% else %} - request! - {% endifnotequal %} + request + {% endifnotequal %}
{% endif %} {% if user.task_claimed_users.count %} -
{{ user.task_claimed_users.count }} claimed + {{ user.task_claimed_users.count }} claimed {% ifnotequal user.task_claimed_users.count 1 %} - tasks! + tasks {% else %} - task! - {% endifnotequal %} + task + {% endifnotequal %}
{% endif %} {% if user.task_assigned_users.count %} -
You are currently working on {{ user.task_assigned_users.count }} + You are currently working on {{ user.task_assigned_users.count }} {% ifnotequal user.task_assigned_users.count 1 %} - tasks! + tasks {% else %} - task! - {% endifnotequal %} + task + {% endifnotequal %}
{% endif %} {% if user.task_mentors.count %} -
Mentoring {{ user.task_mentors.count }} + Mentoring {{ user.task_mentors.count }} {% ifnotequal user.task_mentors.count 1 %} - tasks! + tasks {% else %} - task! - {% endifnotequal %} + task + {% endifnotequal %}
{% endif %} {% if unpublished_tasks %} -
Unpublished tasks:
+
Unpublished tasks viewable by you:
{% for a_task in unpublished_tasks %} {{a_task.title}}    {% endfor %} {% endif %} +

+ {% ifnotequal user.get_profile.rights "CT" %} + Create a task
+ {% endifnotequal %} + {% ifequal user.get_profile.rights "MG" %} + Request another to be a Developer + Request another user to act as manager
+ {% endifequal %} + {% ifequal user.get_profile.rights "AD" %} + Request another to be a Developer
+ Request another user to act as a Manager
+ Request another user to act as an Admin
+ {% endifequal %} {% endblock %} -- cgit