Make generic add comment return to history tab rather than the main

doc page
 - Legacy-Id: 4259
This commit is contained in:
Ole Laursen 2012-04-05 14:20:36 +00:00
parent b60f875da2
commit 75ac144432
2 changed files with 3 additions and 4 deletions

View file

@ -790,14 +790,13 @@ def add_commentREDESIGN(request, name):
if doc.type_id == "draft":
email_owner(request, doc, doc.ad, login,
"A new comment added by %s" % login.name)
return HttpResponseRedirect(doc.get_absolute_url())
return HttpResponseRedirect(urlreverse("doc_history", kwargs=dict(name=doc.name)))
else:
form = AddCommentForm()
return render_to_response('idrfc/add_comment.html',
dict(doc=doc,
form=form,
back_url=doc.get_absolute_url()),
form=form),
context_instance=RequestContext(request))
if settings.USE_DB_REDESIGN_PROXY_CLASSES:

View file

@ -24,7 +24,7 @@ form.add-comment .actions {
<tr>
<td></td>
<td class="actions">
<a href="{{ back_url }}">Back</a>
<a href="{% url doc_history name=doc.name %}">Back</a>
<input type="submit" value="Add comment"/>
</td>
</tr>