forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocument_statement.html
More file actions
139 lines (138 loc) · 6 KB
/
document_statement.html
File metadata and controls
139 lines (138 loc) · 6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{% extends "base.html" %}
{# Copyright The IETF Trust 2023-2025, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load ietf_filters %}
{% load person_filters textfilters %}
{% block title %}{{ doc.title }}{% endblock %}
{% block content %}
{% origin %}
{{ top|safe }}
{% include "doc/revisions_list.html" %}
<div id="doc-timeline"></div>
{% if doc.rev != latest_rev %}
<div class="alert alert-warning my-3">The information below is for an older version of this statement.</div>
{% endif %}
<table class="table table-sm table-borderless">
<tbody class="meta border-top">
<tr>
<th scope="row">Document</th>
<th scope="row">Type</th>
<td class="edit"></td>
<td>
<span id="statement-type">{% if doc.get_state.slug != "active" %}{{doc.get_state.name}} {% endif %}{% if doc.group %}{{doc.group.acronym|upper}} {%endif%}Statement</span>
{% if snapshot %}<span class="badge rounded-pill text-bg-warning">Snapshot</span>{% endif %}
{% if replaced_by %}<div>Replaced by {{ replaced_by|urlize_related_source_list:False|join:", " }}</div>{% endif %}
{% if replaces %}<div>Replaces {{ replaces|urlize_related_target_list:False|join:", " }}</div>{% endif %}
</td>
</tr>
<tr>
<td></td>
<th scope="row">Title</th>
<td class="edit"></td>
<th scope="row" >{{ doc.title }}</th>
</tr>
<tr>
<td></td>
<th scope="row">Published</th>
<td class="edit"></td>
<td id="published">{{ published|date:"Y-m-d" }}</td>
</tr>
<tr>
<td></td>
<th scope="row">Metadata last updated</th>
<td class="edit"></td>
<td>{{ doc.time|date:"Y-m-d" }}</td>
</tr>
<tr>
<td></td>
<th scope="row">
<a href="{% url 'ietf.doc.views_help.state_help' type='statement' %}">State</a>
</th>
<td class="edit">{% if can_manage %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_statement.change_statement_state' name=doc.name %}">
Edit
</a>
{% endif %}</td>
<td id="statement-state">
{% if doc.get_state %}
<span title="{{ doc.get_state.desc }}" class="badge rounded-pill {% if doc.get_state.name|slugify == 'active' %}text-bg-success{% else %}text-bg-warning{% endif %}">{{ doc.get_state.name }}</span>
{% else %}
No document state
{% endif %}
</td>
</tr>
{% with doc.docextresource_set.all as resources %}
{% if resources or can_manage %}
<tr>
<td></td>
<th scope="row">Additional resources</th>
<td class="edit">
{% if can_manage %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.edit_doc_extresources' name=doc.name %}">Edit</a>
{% endif %}
</td>
<td>
{% if resources %}
{% for resource in resources|dictsort:"display_name" %}
{% if resource.name.type.slug == 'url' or resource.name.type.slug == 'email' %}
<a href="{{ resource.value }}" title="{{ resource.name.name }}">
{% firstof resource.display_name resource.name.name %}
</a>
<br>
{# Maybe make how a resource displays itself a method on the class so templates aren't doing this switching #}
{% else %}
<span title="{{ resource.name.name }}">{% firstof resource.display_name resource.name.name %}: {{ resource.value|escape }}</span>
<br>
{% endif %}
{% endfor %}
{% endif %}
</td>
</tr>
{% endif %}
{% endwith %}
<tr>
<td></td>
<th scope="row">
Send notices to
</th>
<td class="edit">
{% if not snapshot %}
{% if can_manage %}
{% doc_edit_button 'ietf.doc.views_doc.edit_notify' name=doc.name %}
{% endif %}
{% endif %}
</td>
<td>
{{ doc.notify|default:'<span class="text-muted">(None)</span>' }}
</td>
</tr>
</tbody>
</table>
{% if not snapshot %}
{% if request.user|has_role:"Secretariat" %}
<p id="change-statement">
<a class="btn btn-primary"
href="{% url 'ietf.doc.views_statement.submit' name=doc.name %}">
Edit or upload revised statement text
</a>
</p>
{% endif %}
{% endif %}
<div class="card mt-5">
<div class="card-header">
{{ doc.name }}-{{ doc.rev }}
</div>
<div class="card-body text-break">
{{ content }}
</div>
</div>
{% endblock %}
{% block js %}
<script src="{% static 'ietf/js/d3.js' %}">
</script>
<script src="{% static 'ietf/js/document_timeline.js' %}">
</script>
{% endblock %}