forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow_template.html
More file actions
55 lines (55 loc) · 2.42 KB
/
show_template.html
File metadata and controls
55 lines (55 loc) · 2.42 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
{% extends "nomcom/nomcom_private_base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% block subtitle %}- Template: {{ template }}{% endblock %}
{% load django_bootstrap5 textfilters ietf_filters %}
{% block nomcom_content %}
{% origin %}
<h2 class="mb-3">Template: {{ template }}</h2>
<dl class="row">
<dt class="col-sm-2">
Title
</dt>
<dd class="col-sm-10">
{{ template.title }}
</dd>
<dt class="col-sm-2">
Group
</dt>
<dd class="col-sm-10">
{{ template.group }}
</dd>
<dt class="col-sm-2">
Template type
</dt>
<dd class="col-sm-10">
{{ template.type.name }}:
{% if template.type.slug == "rst" %}
This template uses the syntax of reStructuredText. Get a quick reference at
<a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">
http://docutils.sourceforge.net/docs/user/rst/quickref.html
</a>.
You can do variable interpolation with <code>$variable</code> if the template allows any variable.
{% elif template.type.slug == "django" %}
This template uses the syntax of the default django template framework. Get more info at
<a href="https://docs.djangoproject.com/en/dev/topics/templates/">
https://docs.djangoproject.com/en/dev/topics/templates/
</a>.
You can do variable interpolation with the current django markup {{variable}} if the template allows any variable.
{% elif template.type.slug == "plain" %}
This template uses plain text, so no markup is used. You can do variable interpolation with <code>$variable</code> if the template allows any variable.
{% endif %}
</dd>
{% if template.variables %}
<dt class="col-sm-2">
Variables allowed in this template
</dt>
<dd class="col-sm-10">
{{ template.variables|linebreaks }}
</dd>
{% endif %}
</dl>
<pre class="border p-3 pasted">{{ template.content|urlize_ietf_docs|linkify|linebreaksbr }}</pre>
<a class="btn btn-secondary my-3"
href="{% if return_url %}{{ return_url }}{% else %}../{% endif %}">Back</a>
{% endblock %}