Skip to content

Commit 2e2e210

Browse files
committed
Some template refactoring; minor changes to IESG edit buttons
- Legacy-Id: 1942
1 parent 31f2fd3 commit 2e2e210

4 files changed

Lines changed: 32 additions & 44 deletions

File tree

ietf/templates/idrfc/base.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
{% endblock %}
8181

8282
<script type="text/javascript" src="/js/yui/yui.js"></script>
83-
8483
<script type="text/javascript">
8584
//<![CDATA[
8685
YAHOO.util.Event.onContentReady("wgs", function () {
@@ -90,12 +89,11 @@
9089
YAHOO.util.Event.onContentReady("search_submit_button", function () {
9190
var oButton = new YAHOO.widget.Button("search_submit_button", {});
9291
});
92+
{% block scripts %}
93+
{% endblock %}
9394
//]]>
9495
</script>
95-
9696
<script type="text/javascript" src="/js/base.js"></script>
97-
{% block scripts %}
98-
{% endblock %}
9997

10098
{% block content_end %}
10199
{% endblock %}

ietf/templates/idrfc/doc_ballot.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@
3434
{% load ietf_filters %}
3535
<table class="ballotTable"><tr valign="top"><td class="left">
3636

37+
{% if doc_ballot_edit_button %}
38+
{% if user|in_group:"Area_Director,Secretariat" %}
39+
<div style="margin-top:8px; margin-bottom:8px;" nostyle="position:absolute;right:0px;">
40+
<span id="doc_ballot_button" class="yui-button yui-link-button"><span class="first-child">
41+
<a href="https://datatracker.ietf.org/cgi-bin/idtracker.cgi?command=open_ballot&amp;id_document_tag={% if info.is_rfc %}{{doc.rfc_number}}{% else %}{{doc.tracker_id}}{% endif %}">Edit position</a>
42+
</span></span></div>
43+
{% endif %}{# user in_group #}
44+
{% endif %}
45+
3746
<p><span class="square" style="background:#c00000;"></span><b>Discuss</b><br/>
3847
{% with ballot.get_discuss as positions %}{% include "idrfc/doc_ballot_list.html" %}{% endwith %}</p>
3948

ietf/templates/idrfc/doc_main.html

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#metabox { width: 99%; border:1px solid #cccccc; background:#edf5ff;margin-top:8px; padding:4px; margin-bottom:1em; }
4040
#metatable { border: 0; border-spacing: 0; }
4141
#metatable tr { vertical-align:top ;}
42-
#metatools { padding:4px; border: 1px solid #cccccc; }
4342

4443
#commentLog { margin-bottom: 1.5ex; }
4544
.commentToggle { text-decoration: underline; color: blue; }
@@ -62,26 +61,8 @@
6261
{% endblock %}
6362

6463
{% block pagehead %}
65-
<script type="text/javascript">
66-
//<![CDATA[
67-
function toggleComment(n) {
68-
var el = document.getElementById("commentF"+n);
69-
var el2 = document.getElementById("commentS"+n);
70-
var el3 = document.getElementById("commentT"+n);
71-
if (el.style.display == 'none') {
72-
el.style.display = 'block';
73-
el2.style.display = 'none';
74-
el3.innerHTML = ""; //[hide]";
75-
} else {
76-
el.style.display = 'none';
77-
el2.style.display= 'block';
78-
el3.innerHTML = "[show all]";
79-
}
80-
}
81-
//]]>
82-
</script>
8364
<link rel="alternate" type="application/atom+xml" href="/feed/comments/{% if info.is_rfc %}rfc{{doc.rfc_number}}{% else %}{{doc.draft_name}}{% endif %}/" />
84-
{%endblock %}
65+
{% endblock %}
8566

8667
{% block content %}
8768
<h1 style="margin-top:0;">{% block doc_h1 %}{% endblock %}</h1>
@@ -104,13 +85,9 @@ <h1 style="margin-top:0;">{% block doc_h1 %}{% endblock %}</h1>
10485
<div id="ballot">
10586
<div id="ballot_content">
10687
{% if ballot %}
107-
{% if user|in_group:"Area_Director,Secretariat" %}
108-
<div style="position:absolute;right:0px;">
109-
<span id="doc_ballot_button" class="yui-button yui-link-button"><span class="first-child">
110-
<a href="https://datatracker.ietf.org/cgi-bin/idtracker.cgi?command=open_ballot&amp;id_document_tag={% if info.is_rfc %}{{doc.rfc_number}}{% else %}{{doc.tracker_id}}{% endif %}">Edit position</a>
111-
</span></span></div>
112-
{% endif %}{# user in_group #}
88+
{% with 1 as doc_ballot_edit_button %}
11389
{% include "idrfc/doc_ballot.html" %}
90+
{% endwith %}
11491
{% endif %}
11592
</div>
11693
</div>
@@ -119,7 +96,7 @@ <h1 style="margin-top:0;">{% block doc_h1 %}{% endblock %}</h1>
11996
<div id="writeup_content">
12097
{% if doc.in_ietf_process and doc.ietf_process.has_iesg_ballot %}
12198
{% if user|in_group:"Area_Director,Secretariat" %}
122-
<div style="position:absolute;right:0px;">
99+
<div style="margin-bottom:8px;">
123100
<span id="doc_writeup_edit_button" class="yui-button yui-link-button"><span class="first-child">
124101
<a href="https://datatracker.ietf.org/cgi-bin/idtracker.cgi?command=ballot_writeup&amp;ballot_id={{doc.ietf_process.iesg_ballot.ballot_id}}">Edit writeups</a>
125102
</span></span></div>
@@ -162,8 +139,6 @@ <h2 style="margin-top:1em;">Document history</h2>
162139
{% endblock %}{# content #}
163140

164141
{% block scripts %}
165-
<script type="text/javascript">
166-
//<![CDATA[
167142
var tabView = new YAHOO.widget.TabView('mytabs');
168143
tabView.subscribe('activeIndexChange', function(e) {
169144
if (e.newValue == 0) {
@@ -173,18 +148,28 @@ <h2 style="margin-top:1em;">Document history</h2>
173148
document.getElementById('rfcText1').style.display = 'none';
174149
document.getElementById('rfcText2').style.display = 'none';
175150
} });
176-
177-
178151
document.getElementById('writeup_content').style.display = 'block';
179152
document.getElementById('ballot_content').style.display = 'block';
180153
document.getElementById('history_content').style.display = 'block';
181-
//]]>
182-
</script>
183154

184-
{% endblock %}
155+
function toggleComment(n) {
156+
var el = document.getElementById("commentF"+n);
157+
var el2 = document.getElementById("commentS"+n);
158+
var el3 = document.getElementById("commentT"+n);
159+
if (el.style.display == 'none') {
160+
el.style.display = 'block';
161+
el2.style.display = 'none';
162+
el3.innerHTML = ""; //[hide]";
163+
} else {
164+
el.style.display = 'none';
165+
el2.style.display= 'block';
166+
el3.innerHTML = "[show all]";
167+
}
168+
}
169+
{% endblock scripts %}
185170

186171
{% block content_end %}
187172
<div id="rfcText2">
188173
{% block doc_text2 %}{% endblock %}
189174
</div>
190-
{% endblock %}{# content_end #}
175+
{% endblock content_end %}

ietf/templates/iesg/discusses.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ <h1 style="margin-top:0;">IESG Discuss Positions</h1>
8686
{% endblock %}
8787

8888
{% block scripts %}
89-
<script type="text/javascript">
90-
//<![CDATA[
9189
function show_only_mine() {
9290
document.getElementById("discuss_show2").style.display = 'block';
9391
document.getElementById("discuss_show1").style.display = 'none';
@@ -107,6 +105,4 @@ <h1 style="margin-top:0;">IESG Discuss Positions</h1>
107105
YAHOO.util.Dom.removeClass(els[i], "discuss_hidden");
108106
}
109107
}
110-
//]]>
111-
</script>
112-
{% endblock %}
108+
{% endblock scripts %}

0 commit comments

Comments
 (0)