/
poi_issue_view.pt
222 lines (206 loc) · 8.86 KB
/
poi_issue_view.pt
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
219
220
221
222
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
lang="en-US"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
metal:use-macro="here/main_template/macros/master"
i18n:domain="Poi">
<head>
<metal:block fill-slot="top_slot"
tal:define="dummy python:request.set('disable_border',1)" />
<metal:css fill-slot="style_slot">
<style type="text/css" media="all"
tal:content="string:@import url($portal_url/poi.css);"></style>
</metal:css>
</head>
<body>
<metal:title fill-slot="content-title"
tal:define="trackerUrl context/aq_parent/absolute_url;">
<tal:c condition="python:not ajax_load">
<metal:header
use-macro="here/poi_tracker_view/macros/trackerheader"></metal:header>
</tal:c>
<h1 class="documentFirstHeading">
#<span tal:replace="context/getId" /> —
<metal:field use-macro="python:context.widget('title', mode='view')">
Body text
</metal:field>
</h1>
</metal:title>
<metal:description fill-slot="content-description">
<metal:comment tal:content="nothing">
The description field is normally not set. We use the details field instead.
</metal:comment>
</metal:description>
<metal:content-core fill-slot="content-core">
<metal:content-core
define-macro="content-core"
tal:define="member context/@@plone_portal_state/member;
template_id template/getId;
isAnon context/@@plone_portal_state/anonymous;
wftool here/portal_workflow;
isManager python:member.getId() in here.getManagers();
isSubmitter python:member.getId() == here.Creator();
pas_member context/@@pas_member;
basicOpenStates python:['open', 'in-progress'];
openStates python:['unconfirmed'] + basicOpenStates;
trackerUrl context/aq_parent/absolute_url;
ajax_load request/ajax_load | nothing;
activeStates context/aq_parent/@@issuefolder/getActiveStates;
issueQueryString python:'%s/poi_issue_search?state=%s' %
(here.aq_parent.absolute_url(), '&state='.join(activeStates),);">
<table class="vertical listing issue-info-box"
tal:define="releases here/getReleasesVocab">
<tr tal:define="state python:wftool.getInfoFor(here, 'review_state');
state_title python:wftool.getTitleForStateOnType(state, here.getPortalTypeName());">
<th i18n:translate="poi_label_state">State</th>
<td><a tal:content="state_title"
i18n:translate="" i18n:domain="plone"
tal:attributes="class string:issue-${state};
href string:${trackerUrl}/poi_issue_search?state=${state};"
></a>
</td>
</tr>
<tr tal:condition="here/isUsingReleases">
<th i18n:translate="poi_label_version">Version:</th>
<td tal:define="release here/getRelease">
<a tal:condition="python:release != '(UNASSIGNED)'"
tal:content="python:releases.getValue(release)"
tal:attributes="href string:${issueQueryString}&release=${release};" />
<div tal:condition="python:release == '(UNASSIGNED)'" class="unassigned-field">
—
</div>
</td>
</tr>
<tr>
<th i18n:translate="poi_label_area">Area</th>
<td>
<a tal:define="issueArea python:here.aq_parent.queryDataGrid('availableAreas', 'lookup', [here.getArea(), 'title'])"
tal:content="issueArea"
tal:attributes="href string:${issueQueryString}&area=${here/getArea}"
/>
</td>
</tr>
<tr>
<th i18n:translate="poi_label_type">Issue type</th>
<td>
<a tal:define="issueType python:here.aq_parent.queryDataGrid('availableIssueTypes', 'lookup', [here.getIssueType(), 'title'])"
tal:content="issueType"
tal:attributes="href string:${issueQueryString}&issueType=${here/getIssueType}"
/>
</td>
</tr>
<tr>
<th i18n:translate="poi_label_severity">Severity</th>
<td>
<a tal:condition="here/getSeverity"
tal:content="here/getSeverity"
tal:attributes="href string:${issueQueryString}&severity=${here/getSeverity};" />
</td>
</tr>
<tr>
<th i18n:translate="poi_label_submitted_by">Submitted by</th>
<td
tal:define="creator python:pas_member.info(here.Creator())"
tal:content="creator/name_or_id" />
</tr>
<tr>
<th i18n:translate="poi_label_submitted_on">Submitted on</th>
<td tal:content="python:here.toLocalizedTime(here.created())" />
</tr>
<tr>
<th i18n:translate="poi_label_responsible">Responsible</th>
<td tal:define="responsibleManager here/getResponsibleManager">
<a tal:condition="python:responsibleManager != '(UNASSIGNED)'"
tal:define="manager python:pas_member.info(responsibleManager)"
tal:attributes="href string:${issueQueryString}&responsible=${responsibleManager};"
tal:content="manager/name_or_id" />
<div class="unassigned" tal:condition="python:responsibleManager == '(UNASSIGNED)'"
>—</div>
</td>
</tr>
<tr tal:condition="here/isUsingReleases">
<th i18n:translate="poi_label_target_release">Target release:</th>
<td tal:define="release here/getTargetRelease">
<a tal:condition="python:release != '(UNASSIGNED)'"
tal:content="python:releases.getValue(release)"
tal:attributes="href string:${issueQueryString}&targetRelease=${release}"
/>
<div tal:condition="python:release == '(UNASSIGNED)'" class="unassigned-field">
—
</div>
</td>
</tr>
</table>
<div class="return-to-search"
tal:define="backURL request/HTTP_REFERER | nothing;
cameFromSearch python:backURL and backURL.startswith(here.aq_inner.aq_parent.absolute_url() + '/poi_issue_search');">
<a href=""
class="link-parent"
tal:condition="cameFromSearch"
tal:attributes="href backURL"
i18n:translate="poi_return_to_search_results">
Return to search results
</a>
<a href=""
class="link-parent"
tal:condition="not:cameFromSearch"
tal:define="parentURL python:here.navigationParent(here, template_id)"
i18n:translate="poi_return_to_tracker"
tal:attributes="href parentURL">
Return to tracker
</a>
</div>
<div class="issue-tags" tal:condition="here/Subject">
<span class="issue-tags-label" i18n:translate="poi_label_tags">Tags:</span>
<ul class="issue-tags-tags">
<li tal:repeat="tag here/Subject">
<a tal:content="tag" tal:attributes="href string:${here/aq_parent/absolute_url}/poi_issue_search?tags=${tag}"/>
</li>
</ul>
</div>
<form action="@@toggle_watching"
id="poi-watch-issue-form"
tal:condition="python:not isAnon and not isManager and not isSubmitter">
<div class="formControls">
<input tal:condition="here/isWatching"
class="standalone"
type="submit"
i18n:attributes="value"
value="Stop watching this issue"
/>
<input tal:condition="not:here/isWatching"
class="context"
type="submit"
i18n:attributes="value"
value="Watch this issue"
/>
</div>
</form>
<div class="issue-details" tal:content="structure here/getTaggedDetails" />
<dl class="steps-to-reproduce" tal:define="steps here/getTaggedSteps" tal:condition="nocall:steps">
<dt i18n:translate="poi_label_steps">Steps to reproduce:</dt>
<dd tal:content="structure steps" />
</dl>
<div class="issue-attachment" tal:condition="python:here.getAttachment().get_size() > 0">
<div class="issue-attachment-label" i18n:translate="poi_label_attachment">Attached:</div>
<metal:attachment use-macro="python:here.widget('attachment')"/>
</div>
<div class="formControls">
<form action="edit"
class="editIssue"
tal:condition="python: user.has_permission('Modify portal content', here)">
<input class="context"
type="submit"
i18n:attributes="value"
value="Edit issue"
/>
</form>
</div>
<div class="visualClear"><!----></div>
<div tal:replace="structure provider:poi.response.add" />
<div class="visualClear"><!----></div>
</metal:content-core>
</metal:content-core>
</body>
</html>