Parent: [f65706] (diff)

Child: [771fef] (diff)

Download this file

ticket.html    170 lines (158 with data), 9.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!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 pyforge import model as M
from pyforge.lib.security import has_artifact_access?>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title>#$ticket.ticket_num $ticket.summary</title>
<link rel="stylesheet" type="text/css" href="${g.app_static('css/hilite.css')}"/>
<link rel="stylesheet" type="text/css" href="${g.app_static('css/tracker.css')}"/>
<link rel="alternate" type="application/rss+xml" title="RSS" href="feed.rss"/>
<link rel="alternate" type="application/atom+xml" title="Atom" href="feed.atom"/>
</head>
<body>
<form method="POST" class="can-retry" action="${ticket.url()}update_ticket">
<div class="span-11 append-1">
<span class="editable viewing" style="padding: 0">
<py:if test="not allow_edit"><h1 class="title">#$ticket.ticket_num $ticket.summary</h1></py:if>
<py:if test="allow_edit">
<span class="viewer"><h1 class="title">#$ticket.ticket_num $ticket.summary</h1></span>
<span class="editor">
<input name="summary" value="$ticket.summary" class="title wide"/>
</span>
</py:if>
</span>
<hr class="clear clearfix"/>
<div class="${allow_edit and ' editable viewing' or ''}">
<span class="${allow_edit and 'viewer' or ''}">
${Markup(g.markdown.convert(ticket.description))}
</span>
<span class="multiline editor" py:if="allow_edit">
${c.markdown_editor.display(name='description',value=ticket.description)}
</span>
</div>
<!-- <div py:if="not allow_edit" py:content="Markup(g.markdown.convert(ticket.description))"/>
<py:if test="allow_edit">
${c.markdown_editor.display(name='description',value=ticket.description)}
<input type="submit" value="Save Changes" class="ui-button ui-widget ui-state-default ui-button-text-only"/>
</py:if> -->
${c.attachment_list.display(attachments=list(ticket.attachments), edit_mode=False)}
</div>
<div id="sidebar-right" class="span-7 last">
<div class="span-3 tright"><b>Created by:</b></div>
<div class="span-4 last gravatar sm">
${gravatar(ticket.reported_by.preferences.email_address, size=16)}
<a href="${ticket.reported_by.url()}">${ticket.reported_by.display_name}</a>
</div>
<hr class="clear clearfix"/>
<div class="span-3 tright clear"><b>Created Time:</b></div>
<div class="span-4 last">
${h.ago(ticket.created_date)}
</div>
<hr class="clear clearfix"/>
<div class="span-3 tright clear"><b>Assigned to:</b></div>
<div class="span-4 last">
<div class="gravatar sm${allow_edit and ' editable viewing' or ''}">
<py:if test="ticket.assigned_to_id">
<a py:if="not allow_edit" href="${ticket.assigned_to.url()}">${ticket.assigned_to_name()}</a>
<py:if test="allow_edit">
<span class="ticket-assigned-to viewer">
${gravatar(ticket.assigned_to.preferences.email_address, size=16)} <a href="${ticket.assigned_to.url()}">${ticket.assigned_to_name()}</a>
</span>
<span class="multiline overlap editor">${c.user_select.display(name='assigned_to',value=ticket.assigned_to.username,className='wide')}</span>
</py:if>
</py:if>
<py:if test="not ticket.assigned_to_id">
<span class="ticket-assigned-to ${allow_edit and 'viewer' or ''}">${ticket.assigned_to_name()}</span>
<span class="multiline overlap editor" py:if="allow_edit">${c.user_select.display(name='assigned_to',value=ticket.assigned_to_id,className='wide')}</span>
</py:if>
</div>
</div>
<hr class="clear clearfix"/>
<div class="span-3 tright"><b>Status:</b></div>
<div class="span-4 last">
<span class="${allow_edit and ' editable viewing' or ''}">
<span class="${ticket.status}${allow_edit and ' viewer' or ''}">${ticket.status}</span>
<span class="multiline overlap editor" py:if="allow_edit">
<select name="status">
<option py:for="option in globals.status_names.split()" value="$option"
selected="${'selected' if ticket.status==option else None}">$option</option>
</select>
</span>
</span>
</div>
<hr class="clear clearfix"/>
<div class="span-3 tright"><b>Milestone:</b></div>
<div class="span-4 last">
<span class="${allow_edit and ' editable viewing' or ''}">
<span class="${allow_edit and ' viewer' or ''}">${ticket.milestone or 'None'}</span>
<span class="multiline overlap editor" py:if="allow_edit">
<select name="milestone">
<option value="">None</option>
<option py:for="option in globals.milestone_names.split()" value="$option"
selected="${'selected' if ticket.milestone==option else None}">$option</option>
</select>
</span>
</span>
</div>
<hr class="clear clearfix"/>
<py:for each="field in globals.custom_fields or []">
<div class="span-3 tright"><b>${field.label}:</b></div>
<div class="span-4 last">
<span class="${allow_edit and ' editable viewing' or ''}">
<span class="${allow_edit and ' viewer' or ''}">${ticket.custom_fields.get(field.name, '') or '&nbsp; &nbsp; &nbsp;'}</span>
<span class="multiline overlap editor" py:if="allow_edit">
<input py:if="field.type != 'select' and field.type != 'boolean'" name="custom_fields.${field.name}" type="text"
value="${ticket.custom_fields.get(field.name, '')}" class="title wide"/>
<input py:if="field.type == 'boolean' and ticket.custom_fields.get(field.name, '') == 'True'"
name="custom_fields.${field.name}" type="checkbox" value="True" checked="checked"/>
<input py:if="field.type == 'boolean' and ticket.custom_fields.get(field.name, '') != 'True'"
name="custom_fields.${field.name}" type="checkbox" value="True"/>
<select py:if="field.type == 'select'" name="custom_fields.${field.name}">
<py:for each="option in field.options.split()">
<option py:if="not option.startswith('*')" value="${option}"
selected="${'selected' if ticket.custom_fields.get(field.name, '')==option else None}">${option}</option>
<option py:if="option.startswith('*')" value="${option[1:]}"
selected="${'selected' if ticket.custom_fields.get(field.name, '')==option[1:] or ticket.custom_fields.get(field.name, '')==None else None}">${option[1:]}</option>
</py:for>
</select>
</span>
</span>
</div>
<hr class="clear clearfix"/>
</py:for>
<div class="span-3 tright"><b>Tags:</b></div>
<div class="span-4 last">
<span class="${allow_edit and ' editable viewing' or ''}">
<span class="${allow_edit and ' viewer' or ''}">
<span py:for="label in ticket.labels" class="ui-corner-all tag">
<a href="../search?q=labels:${h.urllib.quote_plus(label)}">$label (${ticket.artifacts_labeled_with(label).count()})</a>
</span>
<py:if test="not len(ticket.labels)">None</py:if>
</span>
<span class="multiline overlap editor" py:if="allow_edit">${c.label_edit.display(name='labels', value=ticket.labels)}</span>
</span>
</div>
<span class="actions clear">
<br/><br/>
<a href="${ticket.email_link('#%s' % ticket.ticket_num)}"><span class="ui-icon ui-icon-mail-closed"></span> Email Ticket</a><br/>
<a href="edit"><span class="ui-icon ui-icon-pencil"></span> Edit this Ticket</a><br/>
<a href="${ticket.url()}feed.rss"><span class="ui-icon ui-icon-signal-diag"></span> Follow this Ticket</a>
</span>
</div>
</form>
<div class="clear">&nbsp;</div>
<div py:with="thread=ticket.discussion_thread()" id="#comment">
<h2>Discussion</h2>
<hr class="clear clearfix"/>
${c.thread.display(value=thread,new_post_text="New Comment")}
</div>
${c.subscribe_form.display(value=subscribed, action='subscribe')}
</body>
<script type="text/javascript" src="${g.app_static('js/comments.js')}"/>
</html>