forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquestionnaires.html
More file actions
46 lines (46 loc) · 1.83 KB
/
questionnaires.html
File metadata and controls
46 lines (46 loc) · 1.83 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
{% extends "nomcom/nomcom_public_base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin textfilters ietf_filters %}
{% block subtitle %}- Questionnaires{% endblock %}
{% block nomcom_content %}
{% origin %}
<h2>Questionnaires</h2>
<ul class="nomcom-questnr-positions-tabs nav nav-tabs my-3" role="tablist">
{% for position in positions %}
<li class="nav-item" role="presentation">
<button class="nav-link {% if forloop.first %}active{% endif %}"
data-bs-toggle="tab"
role="tab" type="button"
data-bs-target="#{{ position.name|slugify }}">
{{ position.name }}
</button>
</li>
{% endfor %}
</ul>
<div class="nomcom-questnr-positions-content tab-content">
{% for position in positions %}
<div role="tabpanel" class="tab-pane {% if forloop.first %} active{% endif %}"
id="{{ position.name|slugify }}">
{{ position.get_questionnaire|urlize_ietf_docs|linkify|linebreaks }}
</div>
{% endfor %}
</div>
{% endblock %}
{% block js %}
<script>
$(document)
.ready(function () {
// Javascript to enable link to tab
var url = document.location.toString();
if (url.match('#')) {
$('.nav-tabs button[data-bs-target="#' + url.split('#')[1] + '"]')
.tab('show');
}
// Change hash for page-reload
$('.nav-tabs button')
.on('shown.bs.tab', function (e) {
history.replaceState(null, null, e.currentTarget.dataset.bsTarget);
});
});
</script>
{% endblock %}