Merged [4213] from suresh.krishnan@ericsson.com:
Making doc writeup available as read-only text to regular users who are not shepherd/AD/Secretariat etc.
Adding a link for viewing a writeup to the main datatracker page.
- Legacy-Id: 4218
Note: SVN reference [4213] has been migrated to Git commit 19dbc6c9bb
This commit is contained in:
commit
0e3de35834
|
@ -83,6 +83,8 @@ def edit_actions(context, wrapper):
|
|||
|
||||
if can_manage_writeup_of_a_document(user, draft):
|
||||
actions.append(("Change stream writeup", urlreverse('doc_managing_writeup', kwargs=dict(acronym=draft.group.acronym, name=draft.filename))))
|
||||
else:
|
||||
actions.append(("View writeup", urlreverse('doc_managing_writeup', kwargs=dict(acronym=draft.group.acronym, name=draft.filename))))
|
||||
|
||||
return dict(actions=actions)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "wginfo/wg_base.html" %}
|
||||
{% load ietf_filters wgchairs_tags %}
|
||||
|
||||
{% block title %}Change protocol write-up for {{ doc }}{% endblock %}
|
||||
{% block title %} {% if can_edit %} Change {% else %} View {% endif %} protocol write-up for {{ doc }}{% endblock %}
|
||||
|
||||
{% block wg_content %}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
<a href="{% url manage_shepherds wg.group_acronym.acronym %}">Return to shepherd list</a>
|
||||
</p>
|
||||
|
||||
<h1>Change protocol write-up for {{ doc }}</h1>
|
||||
<h1> {% if can_edit %} Change {% else %} View {% endif %} protocol write-up for {{ doc }}</h1>
|
||||
|
||||
<table class="ietf-table" style="width: 100%;">
|
||||
<tr><th>Draft state</th><th>Actual protocol write-up</th><th>Last updated</th></tr>
|
||||
|
@ -50,6 +50,7 @@ Please, <strong>note</strong> that the <strong>'Doc Shepherd Follow-up Underway'
|
|||
</form>
|
||||
</td></tr></table>
|
||||
{% else %}
|
||||
{% if authorized_user %}
|
||||
<table class="ietf-table" style="width: 100%;">
|
||||
<tr><th>Edit protocol write-up</th></tr>
|
||||
<tr><td>
|
||||
|
@ -62,4 +63,5 @@ Please, <strong>note</strong> that the <strong>'Doc Shepherd Follow-up Underway'
|
|||
</td></tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -251,8 +251,7 @@ def managing_writeup(request, acronym, name):
|
|||
wg = get_object_or_404(IETFWG, group_acronym__acronym=acronym, group_type=1)
|
||||
user = request.user
|
||||
doc = get_object_or_404(InternetDraft, filename=name)
|
||||
if not can_manage_writeup_of_a_document(user, doc):
|
||||
return HttpResponseForbidden('You do not have permission to access this page')
|
||||
authorized_user = can_manage_writeup_of_a_document_no_state(user, doc)
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
from ietf.doc.models import State
|
||||
state = doc.get_state("draft-stream-%s" % doc.stream_id)
|
||||
|
@ -293,6 +292,7 @@ def managing_writeup(request, acronym, name):
|
|||
form=form,
|
||||
writeup=writeup,
|
||||
can_edit=can_edit,
|
||||
authorized_user=authorized_user,
|
||||
),
|
||||
context_instance=RequestContext(request))
|
||||
elif valid and not error:
|
||||
|
@ -312,5 +312,6 @@ def managing_writeup(request, acronym, name):
|
|||
writeup=writeup,
|
||||
followup=followup,
|
||||
can_edit=can_edit,
|
||||
authorized_user=authorized_user,
|
||||
),
|
||||
context_instance=RequestContext(request))
|
||||
|
|
Loading…
Reference in a new issue