blob: 5762430eba8bf33e8f27ce5ef578214c6510577a (
plain)
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
|
{% extends "base.html" %}
{% load i18n %}
{% comment %}
buildhistory-web - warning detail page template
Copyright (C) 2013 Intel Corporation
Licensed under the MIT license, see COPYING.MIT for details
{% endcomment %}
{% block content %}
{% autoescape on %}
<h1>Warning item</h1>
<table class="table table-striped table-bordered table-condensed">
<tr>
<th>Summary</th>
<td colspan="3">{{ warningitem.summary }}</td>
</tr>
<tr>
<th>Status</th>
<td width="25%">
{% if warningitem.status == "N" %}
<span class="label label-warning">
{% endif %}
{% if warningitem.status == "A" %}
<span class="label label-important">
{% endif %}
{% if warningitem.status == "I" %}
<span class="label">
{% endif %}
{% if warningitem.status == "R" %}
<span class="label label-info">
{% endif %}
{{ warningitem.get_status_display }}
</span>
</td>
<th width="12%">Reviewed by</th>
<td>
{% if warningitem.status_user %}
{{ warningitem.status_user }} on {{ warningitem.status_date }} ({{ warningitem.status_date|timesince }} ago)
{% else %}
Not yet reviewed
{% endif %}
</td>
</td>
</tr>
<tr>
<th>Description</th>
<td colspan="3"><pre class="description">{{ warningitem.description }}</pre></td>
</tr>
</table>
<div class="well">
{% if user.is_authenticated %}
{% if warningitem.status != "N" %}
<a href="{% url unreview warningitem.id %}" class="btn">Un-review</a>
{% endif %}
{% if warningitem.status == "N" %}
<a href="{% url actionreq warningitem.id %}" class="btn">Action Required</a>
<a href="{% url resolve warningitem.id %}" class="btn">Resolve</a>
<a href="{% url ignore warningitem.id %}" class="btn">Ignore</a>
{% endif %}
{% if warningitem.status == "A" %}
<a href="{% url resolve warningitem.id %}" class="btn">Resolve</a>
<a href="{% url ignore warningitem.id %}" class="btn">Ignore</a>
{% endif %}
{% endif %}
</div>
<h2>Comments</h2>
{% for comment in warningitem.comment_set.all %}
<div class="comment">
<div class="comment_meta">{{ comment.author_full_name }} - {{ comment.date }} ({{ comment.date|timesince }} ago)</div>
<pre class="comment_text">
{{ comment.comment }}
</pre>
</div>
{% endfor %}
<h3>Post a comment</h3>
{% if user.is_authenticated and perms.warningmgr.change_warningitem %}
{% if error_message %}<div class="alert alert-error">{{ error_message }}</div>{% endif %}
<form action="{% url postcomment warningitem.id %}" method="post" class="well">
{% csrf_token %}
<textarea rows="10" name="comment_text"></textarea>
<br>
<input type="submit" value="Post" class="btn" />
</form>
{% else %}
<p>You must be logged in to post a comment</p>
{% endif %}
{% endautoescape %}
{% endblock %}
|