modified the look of browse_requests page task_view page and view_request page.
authornishanth
Tue, 02 Mar 2010 01:05:24 +0530
changeset 164 bfe621e64a16
parent 163 c4cb937b8e7f
child 165 8ea5bcf3bd01
modified the look of browse_requests page task_view page and view_request page.
taskapp/views/task.py
taskapp/views/user.py
templates/task/view.html
templates/user/browse_requests.html
templates/user/view_request.html
--- a/taskapp/views/task.py	Mon Mar 01 15:15:54 2010 +0530
+++ b/taskapp/views/task.py	Tue Mar 02 01:05:24 2010 +0530
@@ -6,7 +6,7 @@
 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
 
--- a/taskapp/views/user.py	Mon Mar 01 15:15:54 2010 +0530
+++ b/taskapp/views/user.py	Tue Mar 02 01:05:24 2010 +0530
@@ -19,6 +19,14 @@
 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):
--- a/templates/task/view.html	Mon Mar 01 15:15:54 2010 +0530
+++ b/templates/task/view.html	Tue Mar 02 01:05:24 2010 +0530
@@ -43,7 +43,7 @@
         
         <hr />
         <b>Description:</b><br />
-        {{ task.desc }}
+        {{ task.desc|linebreaksbr }}
         <hr />
 
         {% if deps %}
--- a/templates/user/browse_requests.html	Mon Mar 01 15:15:54 2010 +0530
+++ b/templates/user/browse_requests.html	Tue Mar 02 01:05:24 2010 +0530
@@ -1,15 +1,36 @@
 {% extends 'base.html' %}
 {% block content %}
     {% if not reqs %}
-        You have no unreplied requests.
+        You have no unreplied requests <sup><a href="/about/request/" target="_blank">learn more</a></sup><br />
     {% else %}
+        You have not yet replied to these requests.<sup><a href="/about/request/" target="_blank">learn more</a></sup><br /><br />
         {% for req in reqs %}
-            <form><a href="/user/requests/rid={{req.id}}">
-            {% if not req.is_read %}<b>{% endif %}{{req.sent_by.username}}|{{req.role}}|
-            {% ifequal req.role "PY" %}            
-                {{req.task.title}}
-            {% endifequal %}</a>
-            {% if not req.is_read %}</b>{% endif %}<br /></form>
+            <a href="/user/requests/rid={{req.id}}">
+            {% if not req.is_read %}<b>{% 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 %}</b>{% endif %}<br />
+            </a>
         {% endfor %}
     {% endif %}
 {% endblock %}
--- a/templates/user/view_request.html	Mon Mar 01 15:15:54 2010 +0530
+++ b/templates/user/view_request.html	Tue Mar 02 01:05:24 2010 +0530
@@ -25,24 +25,26 @@
         <a href="/user/view/uid={{req.sent_by.id}}">{{req.sent_by.username}}</a> assigned {{req.pynts}} pynts to 
         <a href="/user/view/uid={{req.receiving_user.id}}">{{req.receiving_user.username}}</a> for the task
         <a href="/task/view/tid={{req.task.id}}">{{req.task.title}}</a><br />
-    {% endifequal %}    
+    {% else %}    
     
-    {% ifequal "MT" req.role %}
-        <a href="/user/view/uid={{req.sent_by.id}}">{{req.sent_by.username}}</a> requested you to act as a mentor for the task
-        <a href="/task/view/tid={{req.task.id}}">{{req.task.title}}</a><br />
-    {% else %}
-        You have been requested to act as 
-        {% ifequal "AD" req.role %}
-            an Admin
+        {% ifequal "MT" req.role %}
+            <a href="/user/view/uid={{req.sent_by.id}}">{{req.sent_by.username}}</a> requested you to act as a mentor for the task
+            <a href="/task/view/tid={{req.task.id}}">{{req.task.title}}</a><br />
         {% 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 <a href="/user/view/uid={{req.sent_by.id}}">{{req.sent_by.username}}</a>.<br />
         {% endifequal %}
-        for the website by <a href="/user/view/uid={{req.sent_by.id}}">{{req.sent_by.username}}</a>.<br />
     {% endifequal %}
+    <br />
     
     Please accept or reject the request.<br />
     <form action="yes/" method="post">