From 95bd47579adfdb950f4724e3d3aeee4b78b9f1fc Mon Sep 17 00:00:00 2001
From: nishanth
Date: Tue, 2 Mar 2010 01:05:24 +0530
Subject: modified the look of browse_requests page task_view page and
view_request page.
---
taskapp/views/task.py | 2 +-
taskapp/views/user.py | 8 ++++++++
templates/task/view.html | 2 +-
templates/user/browse_requests.html | 35 ++++++++++++++++++++++++++++-------
templates/user/view_request.html | 26 ++++++++++++++------------
5 files changed, 52 insertions(+), 21 deletions(-)
diff --git a/taskapp/views/task.py b/taskapp/views/task.py
index 16ec11e..4f96cb2 100644
--- a/taskapp/views/task.py
+++ b/taskapp/views/task.py
@@ -6,7 +6,7 @@ from django.shortcuts import render_to_response, redirect
from pytask.taskapp.models import User, Task, Comment, Claim, Request, Notification
from pytask.taskapp.utilities.task import getTask
from pytask.taskapp.forms.task import TaskCreateForm, AddMentorForm, AddTaskForm, ChoiceForm, AssignCreditForm, RemoveUserForm
-from pytask.taskapp.events.task import createTask, reqMentor, publishTask, addSubTask, addDep, addClaim, assignTask, updateTask, removeTask, removeUser, assignCredits, completeTask, closeTask
+from pytask.taskapp.events.task import createTask, reqMentor, publishTask, addSubTask, addDep, addClaim, assignTask, updateTask, removeTask, removeUser, assignCredits, completeTask, closeTask, addMentor
from pytask.taskapp.views.user import show_msg
from pytask.taskapp.utilities.user import get_user
diff --git a/taskapp/views/user.py b/taskapp/views/user.py
index c55728d..381efe1 100644
--- a/taskapp/views/user.py
+++ b/taskapp/views/user.py
@@ -19,6 +19,14 @@ from pytask.taskapp.utilities.user import get_user
about = {
"addmentors":"about/addmentors.html",
"mentor":"about/mentor.html",
+ ## "claimtask":
+ ## "edittask": - contains both about up and pub states
+ ## "mentorrights":
+ ## "assigntask":
+ ## "developer":
+ ## "manager":
+ ## "admin":
+ ## "request": - also contains about automatic rejection of requests
}
def show_msg(user, message, redirect_url=None, url_desc=None):
diff --git a/templates/task/view.html b/templates/task/view.html
index 324ad06..bae80c5 100644
--- a/templates/task/view.html
+++ b/templates/task/view.html
@@ -43,7 +43,7 @@
Description:
- {{ task.desc }}
+ {{ task.desc|linebreaksbr }}
{% if deps %}
diff --git a/templates/user/browse_requests.html b/templates/user/browse_requests.html
index fca0763..cee1665 100644
--- a/templates/user/browse_requests.html
+++ b/templates/user/browse_requests.html
@@ -1,15 +1,36 @@
{% extends 'base.html' %}
{% block content %}
{% if not reqs %}
- You have no unreplied requests.
+ You have no unreplied requests learn more
{% else %}
+ You have not yet replied to these requests.learn more
{% for req in reqs %}
-
+
+ {% if not req.is_read %}{% endif %}
+
+ {% ifequal req.role "PY" %}
+ Assign of pynts to {{req.receiving_user}} for the task "{{req.task.title|slice:":20"}}"
+ {% endifequal %}
+
+ {% ifequal req.role "MT" %}
+ Request to mentor the task "{{req.task.title|slice:":20"}}"
+ {% endifequal %}
+
+ {% ifequal req.role "DV" %}
+ Request to act as a developer in the website
+ {% endifequal %}
+
+ {% ifequal req.role "MG" %}
+ Request to act as a manager in the website
+ {% endifequal %}
+
+ {% ifequal req.role "AD" %}
+ Request to act as an admin in the website
+ {% endifequal %}
+
+
+ {% if not req.is_read %}{% endif %}
+
{% endfor %}
{% endif %}
{% endblock %}
diff --git a/templates/user/view_request.html b/templates/user/view_request.html
index 2d3fc41..cb803fb 100644
--- a/templates/user/view_request.html
+++ b/templates/user/view_request.html
@@ -25,24 +25,26 @@
{{req.sent_by.username}} assigned {{req.pynts}} pynts to
{{req.receiving_user.username}} for the task
{{req.task.title}}
- {% endifequal %}
+ {% else %}
- {% ifequal "MT" req.role %}
- {{req.sent_by.username}} requested you to act as a mentor for the task
- {{req.task.title}}
- {% else %}
- You have been requested to act as
- {% ifequal "AD" req.role %}
- an Admin
+ {% ifequal "MT" req.role %}
+ {{req.sent_by.username}} requested you to act as a mentor for the task
+ {{req.task.title}}
{% else %}
- {% ifequal "MG" req.role %}
- a Manager
+ You have been requested to act as
+ {% ifequal "AD" req.role %}
+ an Admin
{% else %}
- a Developer
+ {% ifequal "MG" req.role %}
+ a Manager
+ {% else %}
+ a Developer
+ {% endifequal %}
{% endifequal %}
+ for the website by {{req.sent_by.username}}.
{% endifequal %}
- for the website by {{req.sent_by.username}}.
{% endifequal %}
+
Please accept or reject the request.