# HG changeset patch # User Lennard de Rijk # Date 1236985467 0 # Node ID bf2c705ead193464036a3bceb2145ca70d162bfd # Parent 92b28d1bf2f545a08ef0a0cc33933973e574454e Changed the workflow for students regarding their proposals. The list_self for students now points to the public page where they can see their public reviews. A link on this page has been added to point to the view where they can edit their proposal. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r 92b28d1bf2f5 -r bf2c705ead19 app/soc/templates/soc/student_proposal/public.html --- a/app/soc/templates/soc/student_proposal/public.html Fri Mar 13 23:01:11 2009 +0000 +++ b/app/soc/templates/soc/student_proposal/public.html Fri Mar 13 23:04:27 2009 +0000 @@ -17,6 +17,9 @@ {% block header_title %} {{ page_name }} "{{ entity.title }}" from {{ student_name }} +{% if edit_link %} +(Edit my Proposal) +{% endif %} {% endblock %} {% block body %} diff -r 92b28d1bf2f5 -r bf2c705ead19 app/soc/views/models/student_proposal.py --- a/app/soc/views/models/student_proposal.py Fri Mar 13 23:01:11 2009 +0000 +++ b/app/soc/views/models/student_proposal.py Fri Mar 13 23:04:27 2009 +0000 @@ -390,7 +390,16 @@ from soc.logic.models.review import logic as review_logic - context['student_name'] = entity.scope.name() + student_entity = entity.scope + + context['student_name'] = student_entity.name() + + user_entity = user_logic.logic.getForCurrentAccount() + + # check if the current user is the student + if user_entity.key() == student_entity.user.key(): + # show the proposal edit link + context['edit_link'] = redirects.getEditRedirect(entity, params) context['public_reviews'] = review_logic.getReviewsForEntity(entity, is_public=True, order=['created'])