-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbug_report.html
44 lines (42 loc) · 1.54 KB
/
bug_report.html
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
{% block content %}
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<h1 style="margin: 10px 0 10px 0;">{{ bug.title|e }} <a class="btn btn-primary" href="javascript:toggleView()" id="toggleView">View condensed</a></h1>
</div>
</div>
</div>
<div class="container">
{% for comment in bug.comments %}
<div class="comment {% if comment.number in non_empty_comments %}{{'included-comment'}}{% else %}{{'excluded-comment'}}{% endif %}">
<div class="comment-header">
<span>{{ comment.number }}</span>
<span>{{ comment.author|e }}</span>
<span>{{ comment.date }}</span>
</div>
<div class="comment-text"><pre>{% for sent in comment.text %}<span class="{% if sent.included %}{{'included-sent'}}{% else %}{{'excluded-sent'}}{% endif %}">{{ sent.text|e }}</span>{% endfor %}</pre></div>
</div>
{% endfor %}
</div>
{% endblock %}
<script>
function condensed() {
$(".excluded-sent,.excluded-comment").slideUp('slow');
}
function interlaced() {
$(".excluded-sent,.excluded-comment").slideDown('slow').css({display: 'block'});
}
var currentView = "interlaced";
function toggleView() {
if (currentView == "interlaced") {
condensed();
$("#toggleView").text("View " + currentView);
currentView = "condensed";
}
else {
interlaced();
$("#toggleView").text("View " + currentView);
currentView = "interlaced";
}
}
</script>