# HG changeset patch
# User nishanth
# Date 1267370399 -19800
# Node ID a65e1ef725dd5f90fe28986df93b0809c1980728
# Parent d0cb85ba462aeac569eac74bb65ea3984cce4046
after replying to a request, you are redirected to browse redirects page.
diff -r d0cb85ba462a -r a65e1ef725dd taskapp/views/user.py
--- a/taskapp/views/user.py Sun Feb 28 19:31:41 2010 +0530
+++ b/taskapp/views/user.py Sun Feb 28 20:49:59 2010 +0530
@@ -164,15 +164,6 @@
'oldest':oldest,
}
- ## see if user has already accepted such request and is a high previleged user
- ## made_invalid = if ( user_request.role == "DV" and user_rights in ["DV", "MG", "AD"] ) or \
- ## ( user_request.role == "MG" and user_rights in ["MG", "AD"] ) or \
- ## ( user_request.role == "AD" and user_rights == "AD" ) or \
- ## ( user_request.role == "MT" and user.task_mentors.filter(task=request.task) else False
-
- ## create_notification(user_request.role, user_request.sent_by, user, False, remarks = "User has accepted a similar request and is same or higher privileged than the request", requested_by = user_request.sent_by )
-##def create_notification(role, sent_to, sent_from=None, reply=None, task=None, remarks=None, requested_by=None, receiving_user=None, pynts=None):
-
return render_to_response('user/view_request.html', context)
@login_required
@@ -195,6 +186,7 @@
reply_to_request(req_obj, reply, user)
+ return redirect('/user/requests/')
return show_msg(user, "Your reply has been processed", browse_request_url, "view other requests")
else:
return show_msg(user, "You are not authorised to do this", browse_request_url, "view other requests")
diff -r d0cb85ba462a -r a65e1ef725dd templates/index.html
--- a/templates/index.html Sun Feb 28 19:31:41 2010 +0530
+++ b/templates/index.html Sun Feb 28 20:49:59 2010 +0530
@@ -68,12 +68,13 @@
{% if can_create_task %}
Create a task
{% endif %}
+
{% ifequal user.get_profile.rights "MG" %}
Request another user to be a Developer
Request another user to act as manager
{% endifequal %}
{% ifequal user.get_profile.rights "AD" %}
- Request another user to be a Developer
+ Request another user to be a Developer
Request another user to act as a Manager
Request another user to act as an Admin
{% endifequal %}