Parent: [71a206] (diff)

Download this file

ticket.html    219 lines (202 with data), 11.0 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<!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.allura_templates}/master.html"/>
<?python from allura import model as M
from allura.lib.security import has_artifact_access
g.register_app_css('css/hilite.css')
g.register_app_css('css/tracker.css')
?>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title>$c.project.name / $c.app.config.options.mount_label / #$ticket.ticket_num $ticket.summary</title>
<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" enctype="multipart/form-data">
<div 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">
<h1 class="title">
<span class="viewer" style="width:600px">#$ticket.ticket_num $ticket.summary</span>
<span class="editor" style="font-size: 11px; text-shadow: 0 0; width:600px">
${c.auto_resize_textarea.display(value=ticket.summary,name='summary',attrs={'style':'height:1em; width: 425px'})}
</span>
</h1>
</py:if>
</div>
<div class="actions" style="width:120px;">
<py:if test="c.user and c.user != c.user.anonymous()">
<a href="edit" class="btn ico-l"><b class="ui-icon ui-icon-pencil"></b> <span>Edit</span></a>
${c.subscribe_form.display(value=subscribed, action='subscribe', style='icon')}
</py:if>
<a href="${ticket.url()}feed.rss" class="btn ico"><b class="ui-icon ui-icon-signal-diag"></b> <span>Follow this Ticket</span></a>
</div>
<div class="content">
<div class="row dual" style="font-size: 1.1em;">
<div class="column grid_8">
<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>
<div id="sidebar-right" class="column grid_4 fright">
<div class="listed" style="overflow: hidden">
<b>Created by:</b>
${gravatar(ticket.reported_by, size=16)}
<a href="${ticket.reported_by.url()}">${ticket.reported_by.display_name}</a>
<hr/>
<b>Created Time:</b> ${h.ago(ticket.created_date)}
<hr/>
<div class="${allow_edit and 'editable viewing' or ''}">
<span class="viewer">
<b>Assigned to:</b>
<span class="ticket-assigned-to" py:if="ticket.assigned_to_id">
${gravatar(ticket.assigned_to, size=16)} <a href="${ticket.assigned_to.url()}">${ticket.assigned_to_name()}</a>
</span>
<span py:if="not ticket.assigned_to_id" class="ticket-assigned-to">
${ticket.assigned_to_name()}
</span>
<hr/>
<b>Status:</b> <span class="${ticket.open_or_closed}">${ticket.status}</span>
<hr/>
<b>Milestone:</b> ${ticket.milestone or 'None'}
<hr/>
<py:for each="field in globals.custom_fields or []">
<b>${field.label}:</b> ${ticket.custom_fields.get(field.name, '') or '&nbsp; &nbsp; &nbsp;'}
<hr/>
</py:for>
<b>Labels:</b>
<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 editor" py:if="allow_edit">
<div class="row dual">
<div class="column" style="margin-right:0">
<b>Assigned to:</b>
</div>
<div class="column" style="margin-left:0;width:48%; overflow:auto;">
<py:if test="ticket.assigned_to_id">
${c.user_select.display(name='assigned_to',value=ticket.assigned_to,className='wide')}
</py:if>
<py:if test="not ticket.assigned_to_id">
${c.user_select.display(name='assigned_to',value=ticket.assigned_to_id,className='wide')}
</py:if>
</div>
</div>
<hr/>
<div class="row dual">
<div class="column" style="margin-right:0">
<b>Status:</b>
</div>
<div class="column" style="margin-left:0;width:48%; overflow:auto;">
<select name="status">
<option py:for="option in globals.all_status_names.split()" value="$option"
selected="${'selected' if ticket.status==option else None}">$option</option>
</select>
</div>
</div>
<hr/>
<div class="row dual">
<div class="column" style="margin-right:0">
<b>Milestone:</b>
</div>
<div class="column" style="margin-left:0;width:48%; overflow:auto;">
<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>
</div>
</div>
<hr/>
<py:for each="field in globals.custom_fields or []">
<div class="row dual">
<div class="column" style="margin-right:0">
<b>${field.label}:</b>
</div>
<div class="column" style="margin-left:0;width:48%; overflow:auto;">
<input py:if="field.type != 'select' and field.type != 'boolean'" name="custom_fields.${field.name}" type="text"
value="${ticket.custom_fields.get(field.name, '')}"/>
<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>
</div>
</div>
<hr/>
</py:for>
<div class="row dual">
<div class="column" style="margin-right:0">
<b>Labels:</b>
</div>
<div class="column" style="margin-left:0;width:48%; overflow:auto;">
${c.label_edit.display(name='labels', value=ticket.labels)}
</div>
</div>
<hr/>
<div style="overflow: auto">
<label><b>Add Attachment:</b></label>
${c.file_chooser.display(name='attachment')}
</div>
<div class="row dual">
<div class="column" style="margin-right:0">
<b>&nbsp;</b>
</div>
<div class="column save_holder" style="margin-left:0;width:48%; overflow:auto;"></div>
</div>
</span>
</div>
<div py:if="ticket.attachments">
<hr/>
<strong>Attachments</strong>
</div>
<py:for each="att in ticket.attachments">
<hr/>
<div py:if="att.is_image() and not att.is_embedded()" class="attachment_thumb">
<a href="${att.url()}">
<img src="${att.url()}/thumb"/>
</a><br/>
<a href="${att.url()}">${att.metadata.filename}</a>
($att.length bytes)
</div>
<div py:if="not att.is_image() or att.is_embedded()">
<a href="${att.url()}">${att.metadata.filename}</a>
($att.length bytes)
</div>
</py:for>
</div>
</div>
</div>
<div style="clear:both">&nbsp;</div>
<div py:with="thread=ticket.discussion_thread">
${c.thread.display(value=thread,new_post_text="New Comment",page=page,limit=limit,count=count)}
</div>
</div>
</form>
</body>
<script type="text/javascript">
$(function(){
setTimeout(function(){
$('h1.title .cancel_btn').attr('id', 'title_cancel_btn');
}, 1000);
});
</script>
</html>