aboutsummaryrefslogtreecommitdiffstats
path: root/Bugs-Everywhere-Web/beweb/templates/edit_bug.kid
blob: c31d6601397ea14a2d6f495ca32fbd503138e42d (plain) (blame)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?python
from libbe.bugdir import severity_levels, active_status, inactive_status, thread_comments
from libbe.utility import time_to_str 
from beweb.controllers import bug_list_url, comment_url
from beweb.config import people
from beweb.formatting import comment_body_xhtml, select_among
?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'master.kid'">

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
    <title>Edit bug</title>
</head>

<body>
<h1>Edit bug</h1>
<form method="post" action=".">
<table>
<tr><td>Status</td><td>Severity</td><td>Assigned To</td><td>Summary</td></tr>
<tr><td>${select_among("status", active_status+inactive_status, bug.status)}</td><td>${select_among("severity", severity_levels, bug.severity)}</td>
<td>${select_among("assigned", people.keys()+[None], bug.assigned, people)}</td><td><input name="summary" value="${bug.summary}" size="80" /></td></tr>
</table>
<div py:def="show_comment(comment, children)" class="comment">
    <insetbox>
    <table>
        <tr><td>From</td><td>${comment.From}</td></tr>
        <tr><td>Date</td><td>${time_to_str(comment.date)}</td></tr>
    </table>
    <div py:content="comment_body_xhtml(comment)" py:strip="True"></div>
    <a href="${comment_url(project_id, bug.uuid, comment.uuid)}">Edit</a>
    <a href="${comment_url(project_id, bug.uuid, comment.uuid, 
                           action='Reply')}">Reply</a>
    </insetbox>
    <div style="margin-left:20px;">
    <div py:for="child, grandchildren in children" py:strip="True">
    ${show_comment(child, grandchildren)}
    </div>
    </div>
</div>
<div py:for="comment, children in thread_comments(bug.list_comments())" 
     py:strip="True">
    ${show_comment(comment, children)}
</div>
<p><input type="submit" name="action" value="Update"/></p>
<p><input type="submit" name="action" value="New comment"/></p>
</form>
<a href="${bug_list_url(project_id)}">Bug List</a>
</body>
</html>