Parent: [40bf73] (diff)

Child: [312806] (diff)

Download this file

edit_ticket.html    123 lines (111 with data), 5.2 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
 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="${g.pyforge_templates}/master.html"/>
<xi:include href="${c.app.templates}/lib.html" />
<?python
from pprint import pformat
from pyforge.lib.security import has_artifact_access
?>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title>${ticket.shorthand_id()}</title>
<link rel="stylesheet" type="text/css" href="${g.app_static('css/hilite.css')}"/>
<style>
.hidden { display: None }
.ticket-num { font-size:20pt }
.top-liner { border-top: 1px solid #ccc }
.bottom-liner { border-bottom: 1px solid #ccc }
</style>
</head>
<body>
<div class="container">
<article class="ticket">
<h1>${ticket.shorthand_id()}</h1>
<div>
<a href="../..">PluginRoot</a>
Editing
<form style="display:inline; float:right"
method="GET"
action="../search">
Search: <input name="q"/>
</form>
</div>
<hr/>
<form method="POST" action="../update_ticket">
<div id="header" class="editable viewing span-24 last">
<h1 class="viewer span-24 last">$ticket.summary</h1>
<div class="editor">
<input name="summary" value="$ticket.summary" style="width:98%"/>
</div>
</div>
<div class="span-24">
<div class="editable viewing span-8">
<span class="quiet">owner:</span>
<span class="viewer ticket-assigned-to">${ticket.assigned_to_name()}</span>
<input disabled="disabled" name="assigned_to" value="${ticket.assigned_to_name()}" class="editor"/>
</div>
<div class="editable viewing span-8">
<span class="quiet">status:</span>
<span class="viewer ticket-status">$ticket.status</span>
<select name="status" class="editor">
<option py:for="name in globals.status_names.split(',')" value="$name">$name</option>
</select>
</div>
<div class="span-8 last">
<span class="quiet">opened:</span>
<span class="ticket-create-date">$ticket.created_date</span>
</div>
</div>
<div class="span-24 last ticket-description">
<div class="span-24 last quiet prepend-top bottom-liner">Description</div>
<div class="editable viewing span-24 last">
<div class="viewer span-24 last" py:content="Markup(g.markdown.convert(ticket.description))"/>
<div class="editor">
<textarea name="description">$ticket.description</textarea>
</div>
</div>
</div>
<div class="span-24 last custom-fields" py:if="globals.custom_fields">
<div class="span-24 last quiet prepend-top bottom-liner">Custom Fields</div>
<div py:for="field in globals.custom_fields.split(',')" class="editable viewing span-24 last">
<label class="span-4">$field:</label>
<span class="viewer span-20 last">${ticket.custom_fields.get(field, '')}</span>
<span class="editor span-20 last">
<input name="$field" type="text" style="width:50%" value="${ticket.custom_fields.get(field, '')}"/>
</span>
</div>
</div>
<input type="submit" value="submit"/>
</form>
<hr/>
<div py:if="has_artifact_access('write', ticket)()" class="reply title-pane closed">
<div class="title">New Attachment</div>
<div class="content">
<form method="post" action="${ticket.url() + 'attach'}" enctype="multipart/form-data">
${file_field('file_info', 'File to upload')}
${submit_button('Attach file')}
</form>
</div>
<hr/>
</div>
<h2>Comments</h2>
<div class="reply title-pane closed">
<h3 class="title">Make a comment</h3>
<div class="content">
<form method="post" action="comments/reply">
<textarea rows="4" cols="60" name="text"></textarea><br/>
<input type="submit"/>
</form>
</div>
</div>
<py:for each="cmt in ticket.root_comments()">
${display_comment(cmt)}
</py:for>
</article>
</div>
</body>
<script type="text/javascript" src="${g.app_static('js/comments.js')}"/>
</html>