now view request shows a better message if role is MT .
authornishanth
Fri, 26 Feb 2010 00:29:04 +0530
changeset 106 3c3ea2a3f92a
parent 105 091b044a3bf4
child 107 4903b4973fc8
now view request shows a better message if role is MT .
templates/user/browse_notifications.html
templates/user/browse_requests.html
templates/user/view_request.html
--- a/templates/user/browse_notifications.html	Fri Feb 26 00:17:54 2010 +0530
+++ b/templates/user/browse_notifications.html	Fri Feb 26 00:29:04 2010 +0530
@@ -1,9 +1,13 @@
 {% extends 'base.html' %}
 {% block content %}
-    {% for notification in notifications %}
-        <a href="/user/notifications/nid={{notification.pos}}">
-        {% if not notification.is_read %} <b> {% endif %}
-        {{notification.sub}}
-        {% if not notification.is_read %} </b> {% endif %}</a><br />
-    {% endfor %}
+    {% if not notifications %}
+        You have no notifications.
+    {% else %}
+        {% for notification in notifications %}
+            <a href="/user/notifications/nid={{notification.pos}}">
+            {% if not notification.is_read %} <b> {% endif %}
+            {{notification.sub}}
+            {% if not notification.is_read %} </b> {% endif %}</a><br />
+        {% endfor %}
+    {% endif %}
 {% endblock %}
--- a/templates/user/browse_requests.html	Fri Feb 26 00:17:54 2010 +0530
+++ b/templates/user/browse_requests.html	Fri Feb 26 00:29:04 2010 +0530
@@ -1,11 +1,15 @@
 {% extends 'base.html' %}
 {% block content %}
-    {% for req in reqs %}
-        <form><a href="/user/requests/rid={{req.pos}}">
-        {% 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>
-    {% endfor %}
+    {% if not reqs %}
+        You have no unreplied requests.
+    {% else %}
+        {% for req in reqs %}
+            <form><a href="/user/requests/rid={{req.pos}}">
+            {% 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>
+        {% endfor %}
+    {% endif %}
 {% endblock %}
--- a/templates/user/view_request.html	Fri Feb 26 00:17:54 2010 +0530
+++ b/templates/user/view_request.html	Fri Feb 26 00:29:04 2010 +0530
@@ -11,16 +11,20 @@
         <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 />
-        Please click yes/no<br />
-    {% else %}
+    {% endifequal %}    
+    
+    {% 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 />
     {% endifequal %}
     
+    Please accept or reject the request.<br />
     <form action="yes/" method="post">
-        <input value="Yes" type="submit">
+        <input value="Accept" type="submit">
     </form>
     <form action="no/" method="post">
         Remarks: <input type="text" name="remarks">
-        <input value="No" type="submit">
+        <input value="Reject" type="submit">
     </form>
     <a href="/user/requests/">Click here</a> to return to the requests page.