Parent: [2e2b12] (diff)

Child: [841618] (diff)

Download this file

edit_ticket.html    125 lines (120 with data), 6.7 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
<!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
from pyforge import model as M
?>
<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" action="../update_ticket">
<div class="span-14">
<div class="span-2">
${gravatar(ticket.reported_by.preferences.email_address, size=50)}<br/>
<py:if test="ticket.assigned_to">${gravatar(ticket.assigned_to.preferences.email_address, size=50)}</py:if>
</div>
<div class="span-12 last">
<div class="editable viewing title">
<h2 class="viewer ticket_title">#$ticket.ticket_num $ticket.summary</h2>
<span class="editor">
<input name="summary" value="$ticket.summary"/>
</span>
</div>
Created by <a href="${ticket.reported_by.url()}">${ticket.reported_by.display_name}</a> ${h.ago(ticket.created_date, round=True)}
<div class="editable viewing">
Currently assigned to
<span class="viewer ticket-assigned-to">
<py:if test="not ticket.assigned_to_id">${ticket.assigned_to_name()}</py:if>
<a py:if="ticket.assigned_to_id" href="${ticket.assigned_to.url()}">${ticket.assigned_to_name()}</a>
</span>
<span class="editor ticket-assigned-to">${c.user_select.display(name='assigned_to',value=ticket.assigned_to_id)}</span>
</div>
${c.markdown_editor.display(name='description',value=ticket.description)}
<input type="submit" value="submit"/>
</div>
</div>
<div id="sidebar-right" class="span-5 last">
<a class="ticket_feed" href="${ticket.url()}feed.rss"><img src="/images/rss.png" alt="subscribe" title="subscribe" width="25" height="25"/></a>
<div class="editable viewing">
Status:
<span class="viewer">$ticket.status</span>
<span class="editor">
<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>
</div>
<div class="editable viewing">
Tags:
<span class="viewer" py:if="len(ticket.tags)"><span py:for="tag in ticket.tags">$tag.tag ($tag.count) </span></span>
<span class="viewer" py:if="not len(ticket.tags)">None</span>
<span class="editor">${c.user_tag_edit.display(name='tags', user_tags=user_tags)}</span>
</div>
<div class="editable viewing">
Milestone:
<span class="viewer">${ticket.milestone or 'None'}</span>
<span class="editor">
<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>
</div>
<div py:for="field in globals.custom_fields or []" class="editable viewing">
<span class="viewer">${field.label}: ${ticket.custom_fields.get(field.name, '')}</span>
<span class="editor">
<input py:if="field.type != 'select' and field.type != 'boolean'" name="${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="${field.name}" type="checkbox" value="True" checked="checked"/>
<input py:if="field.type == 'boolean' and ticket.custom_fields.get(field.name, '') != 'True'"
name="${field.name}" type="checkbox" value="True"/>
<select py:if="field.type == 'select'" name="${field.name}">
<option py:for="option in field.options.split()" value="${option}"
selected="${'selected' if ticket.custom_fields.get(field.name, '')==option else None}">${option}</option>
</select>
</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="#comment"><span class="ui-icon ui-icon-comment"></span> Leave a Comment</a><br/>
<a href="${ticket.url()}feed.rss"><span class="ui-icon ui-icon-signal-diag"></span> Follow this Ticket</a><br/>
<a href="${ticket.url()}"><span class="ui-icon ui-icon-arrowthick-1-w"></span> Back to Ticket</a><br/>
</span>
</div>
</form>
<div class="span-12 push-2">
${c.attachment_list.display(attachments=list(ticket.attachments), edit_mode=has_artifact_access('write', ticket)())}
<div py:if="has_artifact_access('write', ticket)()" class="reply title-pane closed">
<button class="title">Add Attachment</button>
<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>
</div>
</div>
<hr/>
<div py:with="thread=ticket.discussion_thread()">
<h2><a href="${thread.url()}">Discussion</a></h2>
${c.thread.display(value=thread)}
</div>
<script type="text/javascript" src="${g.app_static('js/comments.js')}"/>
</body>
</html>