~launchpad-pqm/launchpad/devel

4939.2.3 by Curtis Hovey
Added namespaces to bug* templates and fixed markup.
1
<tal:root
2
  xmlns:tal="http://xml.zope.org/namespaces/tal"
3
  xmlns:metal="http://xml.zope.org/namespaces/metal"
4
  omit-tag="">
5251.3.15 by Gavin Panella
Noted that .guidelines (css) is for user content, and prettified some templates.
5
<metal:basic_filebug_widgets define-macro="basic_filebug_widgets">
3691.251.8 by Bjorn Tillenius
convert the advanced filebug page to use standard form macros. extract the basic filebug widgets into a macro.
6
3778.2.3 by Bjorn Tillenius
make the general +filebug page work.
7
  <tal:bugtarget
8
      tal:define="widget nocall:view/widgets/bugtarget|nothing"
9
      tal:condition="widget">
5251.3.15 by Gavin Panella
Noted that .guidelines (css) is for user content, and prettified some templates.
10
    <metal:widget use-macro="context/@@launchpad_form/widget_row" />
3778.2.3 by Bjorn Tillenius
make the general +filebug page work.
11
  </tal:bugtarget>
12
3691.251.8 by Bjorn Tillenius
convert the advanced filebug page to use standard form macros. extract the basic filebug widgets into a macro.
13
  <tr tal:condition="view/widgets/packagename|nothing">
14
    <th colspan="2" style="text-align: left"><label
15
        tal:attributes="for view/widgets/packagename/name"
16
        >In what package did you find this bug?</label>
17
    </th>
18
  </tr>
19
20
  <tr tal:condition="view/widgets/packagename|nothing">
21
    <td style="padding-bottom: 1.5em" colspan="2"
22
        tal:attributes="class view/getPackageNameFieldCSSClass">
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
23
      <ul tal:define="select_packagename view/shouldSelectPackageName">
3691.251.8 by Bjorn Tillenius
convert the advanced filebug page to use standard form macros. extract the basic filebug widgets into a macro.
24
        <li>
25
          <input type="radio" name="packagename_option" value="none"
26
                 id="no-package"
27
                 tal:attributes="checked not:select_packagename"/>
28
          <label style="font-weight: normal" for="no-package">
29
            I don't know
30
          </label>
31
        </li>
32
        <li style="margin-top: 4px">
33
          <input type="radio" name="packagename_option" value="choose"
34
                 id="choose"
35
                 tal:attributes="checked select_packagename"/>
36
          <span tal:content="structure view/widgets/packagename" />
37
        </li>
38
      </ul>
39
      <div
40
        tal:condition="view/widget_errors/packagename|nothing"
41
        class="message"
42
        tal:content="view/widget_errors/packagename"
43
      >An error on package name.</div>
44
    </td>
45
  </tr>
46
12811.2.5 by Ian Booth
Fix tests
47
  <noscript>
48
    <tal:product tal:define="widget nocall:view/widgets/product|nothing"
49
                 tal:condition="widget">
50
      <metal:widget use-macro="context/@@launchpad_form/widget_row" />
51
    </tal:product>
52
  </noscript>
53
3691.251.8 by Bjorn Tillenius
convert the advanced filebug page to use standard form macros. extract the basic filebug widgets into a macro.
54
  <metal:summary tal:define="widget nocall:view/widgets/title">
55
    <metal:row use-macro="context/@@launchpad_form/widget_row" />
56
  </metal:summary>
57
58
  <metal:description tal:define="widget nocall:view/widgets/comment">
59
    <metal:row use-macro="context/@@launchpad_form/widget_row" />
60
  </metal:description>
61
12811.2.2 by Ian Booth
Refactor bug submission form
62
  <tr id="extra-filebug-details"
12811.2.11 by Ian Booth
Code review fixes and ensure changing products hides/shows the relevant bug detail fields
63
    tal:replace="structure context/@@+filebug-reporting-guidelines" />
3995.4.3 by Bjorn Tillenius
add a security checkbox on +filebug.
64
8137.17.24 by Barry Warsaw
thread merge
65
  <tr>
66
    <td colspan="2">
13302.5.14 by Danilo Segan
More improvements to links.
67
      <fieldset id="filebug-extra-options" class="collapsible">
13302.5.30 by Danilo Segan
Linkify from createByCSS.
68
        <legend>Extra options</legend>
69
        <div class="unseen">
8137.17.24 by Barry Warsaw
thread merge
70
        <table>
71
          <tal:status
72
              define="widget nocall:view/widgets/status|nothing"
73
              condition="widget">
74
            <metal:row use-macro="context/@@launchpad_form/widget_row" />
75
          </tal:status>
76
          <tal:importance
77
              define="widget nocall:view/widgets/importance|nothing"
78
              condition="widget">
79
            <metal:row use-macro="context/@@launchpad_form/widget_row" />
80
          </tal:importance>
81
          <tal:milestone
82
              define="widget nocall:view/widgets/milestone|nothing"
83
              condition="widget">
84
            <metal:row use-macro="context/@@launchpad_form/widget_row" />
85
          </tal:milestone>
86
          <tal:tags tal:define="widget nocall:view/widgets/tags">
87
            <metal:row use-macro="context/@@launchpad_form/widget_row" />
88
          </tal:tags>
89
          <tal:assignee
90
              define="widget nocall:view/widgets/assignee|nothing"
91
              condition="widget">
92
            <metal:row use-macro="context/@@launchpad_form/widget_row" />
93
          </tal:assignee>
94
        </table>
95
        <metal:attachment-form
96
            use-macro="context/@@bug-attachment-macros/attachment-form" />
13302.5.14 by Danilo Segan
More improvements to links.
97
        </div>
8137.17.24 by Barry Warsaw
thread merge
98
      </fieldset>
99
    </td>
100
  </tr>
101
3691.251.8 by Bjorn Tillenius
convert the advanced filebug page to use standard form macros. extract the basic filebug widgets into a macro.
102
</metal:basic_filebug_widgets>
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
103
104
5251.3.15 by Gavin Panella
Noted that .guidelines (css) is for user content, and prettified some templates.
105
<metal:not_uses_malone define-macro="not_uses_malone">
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
106
  <tal:not_uses_malone tal:condition="not: view/contextUsesMalone">
3938.1.8 by kiko
Improve wording and help wanted text, link to actual distribution source package (doh).
107
    <tal:has-context define="product_or_distro view/getProductOrDistroFromContext"
108
                     condition="product_or_distro">
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
109
      <div class="highlight-message">
110
        <a tal:replace="structure product_or_distro/fmt:link">Alsa Utils</a>
111
        <strong>does not use</strong> Launchpad as its bug tracker.
10469.1.10 by Edwin Grubbs
Fixed tests.
112
        <a tal:attributes="href context/menu:overview/configure_bugtracker/fmt:url"
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
113
           tal:condition="context/required:launchpad.Edit">
114
          Change this&nbsp;<span class="sprite edit"></span>
115
        </a>
8788.1.5 by Martin Albisetti
Fix sprite issue in file bug, and change the UI so it looks less scary, and lets project owners specify that the project does use Launchpad
116
      </div>
117
      <span tal:condition="view/frontpage_form">
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
118
        You can <a href="+filebug">refine and resubmit</a> your bug
119
        report.
8788.1.5 by Martin Albisetti
Fix sprite issue in file bug, and change the UI so it looks less scary, and lets project owners specify that the project does use Launchpad
120
      </span>
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
121
      <tal:upstream condition="view/contextIsProduct">
122
        <tal:defines define="bugtracker product_or_distro/getExternalBugTracker">
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
123
          <h3>
124
            Are you sure this bug is in <acronym class="explain"
10399.1.1 by David Wood
Get the spacing right in a title attribute on a filebug template.
125
            style="color: inherit"
126
            title="the original developer of the software">upstream</acronym>
127
            <span tal:replace="product_or_distro/displayname" />?
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
128
          </h3>
129
          <tal:distro-source-pacakges
130
              condition="product_or_distro/distrosourcepackages">
131
            <p>
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
132
              If you are using a package installed by your Linux
133
              distribution, <b>the bug should be reported in that
134
              distribution</b>, instead. Launchpad knows that <span
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
135
              tal:replace="product_or_distro/displayname" /> is
136
              present in the following distribution packages:
137
            </p>
138
            <ul class="source package" tal:repeat="dsp product_or_distro/distrosourcepackages">
139
              <li>
140
                <a tal:attributes="href dsp/fmt:url"
10700.3.1 by William Grant
Switch the two TALES expressions that relied on sourcepackagename.__unicode__ to use sourcepackagename/name.
141
                   tal:content="string:${dsp/distribution/displayname} ${dsp/sourcepackagename/name}" />
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
142
              </li>
143
            </ul>
144
            <p>
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
145
              You can report bugs by visiting the package's page.
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
146
            </p>
147
          </tal:distro-source-pacakges>
148
          <tal:not-distro-source-packages
149
              condition="not: product_or_distro/distrosourcepackages">
150
            <p>
151
              If the bug you are reporting is in a package installed
152
              by a <a href="/distros">distribution registered in
153
              Launchpad</a>, you should file the bug against that
154
              specific distribution.
155
            </p>
9405.1.7 by Gavin Panella
Remove one XXX - because it's fixed - and amend another.
156
            <p class="warning message">
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
157
              Launchpad doesn't know of any distribution packages that
158
              include upstream <span
3938.1.8 by kiko
Improve wording and help wanted text, link to actual distribution source package (doh).
159
              tal:replace="product_or_distro/displayname" />. You can
160
              help by <a tal:attributes="href
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
161
              product_or_distro/development_focus/fmt:url/+ubuntupkg">linking
162
              them for us.</a>
163
            </p>
164
          </tal:not-distro-source-packages>
165
          <tal:has-bugtracker condition="bugtracker">
166
            <p id="bugtarget-upstream-bugtracker-info">
10399.1.1 by David Wood
Get the spacing right in a title attribute on a filebug template.
167
              Bugs in <abbr title="the original developer of the software"
168
              class="explain">upstream</abbr>
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
169
              <span tal:replace="product_or_distro/displayname">
170
                Alsa Utils
171
              </span>
172
              <tal:action
173
                  define="via_email
174
                          bugtracker/bugtrackertype/enumvalue:EMAILADDRESS">
175
                <tal:via-email condition="via_email">
176
                  should be sent to
177
                  <a tal:replace="structure bugtracker/fmt:external-link" />
178
                </tal:via-email>
179
                <tal:not-via-email condition="not:via_email">
180
                  should be reported in its official bug tracker,
181
                  <a tal:replace="structure bugtracker/fmt:external-title-link" />
182
                </tal:not-via-email>
183
              </tal:action>
184
            </p>
185
          </tal:has-bugtracker>
7355.1.1 by Diogo Matsubara
fix bug 256212 (XXX in templates should be updated so they're correctly captured by the xxxreporty.py tool), remove an XXX that's not relevant anymore and fix a trivial XXX.
186
          <tal:XXX condition="nothing">
9405.1.7 by Gavin Panella
Remove one XXX - because it's fixed - and amend another.
187
            XXX: Gavin Panella 2009-09-14 bug=429354:
11626.4.1 by Curtis Hovey
Save spike for switch from feedback@ to /support. There are open questions about the criteria for showing suppot--anonymous or cannot login. Should /support not be reused.
188
            Asking people to use answers is not
9405.1.7 by Gavin Panella
Remove one XXX - because it's fixed - and amend another.
189
            ideal. We could instead link project owners to the +edit
190
            page and provide the +contactuser form for everyone else
191
            to contact the owner.
7355.1.1 by Diogo Matsubara
fix bug 256212 (XXX in templates should be updated so they're correctly captured by the xxxreporty.py tool), remove an XXX that's not relevant anymore and fix a trivial XXX.
192
          </tal:XXX>
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
193
          <tal:not-has-bugtracker condition="not: bugtracker">
9405.1.7 by Gavin Panella
Remove one XXX - because it's fixed - and amend another.
194
            <p class="warning message">
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
195
              Launchpad doesn't know what bug tracker <span
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
196
              tal:replace="product_or_distro/displayname">Alsa
11626.4.1 by Curtis Hovey
Save spike for switch from feedback@ to /support. There are open questions about the criteria for showing suppot--anonymous or cannot login. Should /support not be reused.
197
              Utils</span> uses. Do you know?
198
              <a href="/support">Tell us about it.</a>
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
199
            </p>
200
          </tal:not-has-bugtracker>
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
201
        </tal:defines>
202
      </tal:upstream>
3938.1.8 by kiko
Improve wording and help wanted text, link to actual distribution source package (doh).
203
      <tal:distro condition="not: view/contextIsProduct">
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
204
        To file a bug for this distribution, visit its official bug
205
        tracker.
206
      </tal:distro>
3938.1.8 by kiko
Improve wording and help wanted text, link to actual distribution source package (doh).
207
    </tal:has-context>
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
208
    <tal:project condition="view/contextIsProject">
209
      <p class="informational message"
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
210
         condition="not: context/required:launchpad.Edit">
211
        There are no projects registered for <span
212
        tal:replace="context/displayname">project displayname</span>
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
213
        that use Launchpad to track bugs.
214
      </p>
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
215
      <tal:not-has-products tal:condition="not: context/products">
216
        <tal:admin-warning condition="context/required:launchpad.Edit">
217
          <p class="warning message">
9405.1.8 by Gavin Panella
Put tags back on the same line for Tom :)
218
            There are no projects registered for
219
            <span tal:replace="context/displayname">project displayname</span>.
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
220
            <br />
9405.1.8 by Gavin Panella
Put tags back on the same line for Tom :)
221
            You need to
222
            <a tal:attributes="href context/fmt:url/+newproduct">register
223
            another project that is part of
224
            <tal:project replace="context/displayname" /></a>
225
            or associate an existing project with it.
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
226
          </p>
227
        </tal:admin-warning>
228
      </tal:not-has-products>
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
229
      <tal:has-products condition="context/products">
230
        <tal:plural condition="python:context.products.count() > 1">
231
          <p id="product-list-summary">
232
            There are <tal:count replace="context/products/count" /> projects
233
            registered as part of <tal:project replace="context/displayname" />
234
            but none of them use Launchpad as their bug tracker.
235
          </p>
236
          <p>
237
            However, it may be possible for you to file a bug against a
238
            specific project in a source package with which it is registered
239
            or in an external bug tracker.
240
          </p>
241
          <p>
242
            The projects that are part of
243
            <tal:project replace="context/displayname" />
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
244
            are listed below, along with the source packages with
245
            which they are registered and their external bug trackers.
246
            If you can't find an appropriate place to file your bug,
247
            please try contacting the administrator of <tal:project
248
            replace="context/displayname" />.
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
249
          </p>
250
        </tal:plural>
251
        <tal:singular condition="python:context.products.count() == 1">
252
          <p id="product-list-summary">
9405.1.8 by Gavin Panella
Put tags back on the same line for Tom :)
253
            There is 1 project registered as part of
254
            <tal:project replace="context/displayname" /> but it
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
255
            does not use Launchpad as its bug tracker.
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
256
          </p>
257
          <p>
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
258
            The details of the project are shown below, along with any
259
            source packages with which it is registered and its
260
            external bug tracker, if it uses one. If you can't find an
261
            appropriate place to file your bug, please contact the
262
            administrator of <tal:project
263
            replace="context/displayname">Project</tal:project>.
4939.2.3 by Curtis Hovey
Added namespaces to bug* templates and fixed markup.
264
          </p>
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
265
        </tal:singular>
4508.3.49 by Graham Binns
Added a test for multiple non-lp using products.
266
        <ul class="product-bug-options" tal:repeat="product context/products">
11411.7.10 by j.c.sackett
Updated templates to use bug_tracking_usage. I hope it works.
267
          <li condition="product/bug_tracking_usage/enumvalue:LAUNCHPAD">
6475.2.22 by Barry Warsaw
mergeRF
268
            <tal:link replace="structure product/fmt:link" />
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
269
            <ul class="bulleted">
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
270
              <tal:external-tracker
271
                  define="bugtracker product/getExternalBugTracker">
272
                <li tal:condition="bugtracker">
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
273
                  External bug tracker: <a tal:replace="structure
274
                  bugtracker/fmt:external-title-link" />.
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
275
                </li>
276
                <li tal:condition="not: bugtracker">
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
277
                  <tal:product replace="product/displayname">
278
                    Project
279
                  </tal:product>
280
                  does not use an external bug tracker or has not registered
281
                  it with launchpad.
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
282
                </li>
283
              </tal:external-tracker>
284
              <tal:packages define="packages product/distrosourcepackages">
285
                <li tal:condition="packages">
286
                  <ul tal:repeat="package packages">
287
                    <li class="source package">
288
                      Source package:
289
                      <a tal:attributes="href package/fmt:url">
7849.13.1 by Brad Crittenden
Update templates to use person formatters
290
                        <tal:displayname
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
291
                            replace="package/distribution/displayname" />
10700.3.1 by William Grant
Switch the two TALES expressions that relied on sourcepackagename.__unicode__ to use sourcepackagename/name.
292
                        <tal:packagename replace="package/sourcepackagename/name" />
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
293
                      </a>
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
294
                      (<a tal:attributes="href
295
                      package/fmt:url/+filebug">File a bug here</a>)
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
296
                    </li>
297
                  </ul>
298
                </li>
299
                <li tal:condition="not: packages">
300
                  <tal:product replace="product/displayname">
301
                    Project
302
                  </tal:product>
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
303
                  is not registered with any source packages. You can
304
                  help by <a tal:attributes="href
305
                  product/development_focus/fmt:url/+ubuntupkg">linking
306
                  them for us.</a>
4508.3.48 by Graham Binns
Moved stuff into the macro, where it's better off.
307
                </li>
308
              </tal:packages>
309
            </ul>
310
          </li>
311
        </ul>
312
      </tal:has-products>
313
    </tal:project>
3938.1.1 by kiko
Implement first cut at a better +filebug page for non-Malone-using contexts. Factor out doesn't-use-Malone code to a macro. Infrastructure: provide a fmt:link for HasGotchiAndEmblemFormatterAPI, add a helpwanted CSS message class, add a distrosourcepackages to Product, and prejoin the packaging query.
314
  </tal:not_uses_malone>
315
</metal:not_uses_malone>
5251.3.7 by Gavin Panella
The guidelines appear on the +filebug submit form (not just the search page).
316
317
<metal:bug_reporting_guidelines define-macro="bug_reporting_guidelines">
7251.2.11 by Gavin Panella
Move the 'append the distro guidelines to the distro source package guidelines' logic into the view.
318
  <tr tal:define="guidelines view/bug_reporting_guidelines"
319
      tal:condition="guidelines">
5251.3.7 by Gavin Panella
The guidelines appear on the +filebug submit form (not just the search page).
320
    <td colspan="2" id="bug-reporting-guidelines">
7251.2.17 by Gavin Panella
Provide the bug reporting guidelines preamble from the view, rather than in the template, so we can have different preambles when the arrangement of guidelines is more complex.
321
      <tal:guidelines repeat="guideline guidelines">
10981.4.11 by Brad Crittenden
Fix bug reporting guidelines descriptions
322
        <h3><span tal:replace="guideline/source" /> bug reporting guidelines:</h3>
12074.1.1 by Graham Binns
Added a formatter to stop Dustin's head from blowing up.
323
        <div
324
          tal:content="structure guideline/content/fmt:text-to-html-with-target" />
7251.2.17 by Gavin Panella
Provide the bug reporting guidelines preamble from the view, rather than in the template, so we can have different preambles when the arrangement of guidelines is more complex.
325
      </tal:guidelines>
5251.3.7 by Gavin Panella
The guidelines appear on the +filebug submit form (not just the search page).
326
    </td>
327
  </tr>
328
</metal:bug_reporting_guidelines>
8137.17.24 by Barry Warsaw
thread merge
329
14399.3.2 by j.c.sackett
Moved filebug privacy stuff into a macro.
330
<metal:privacy define-macro="bug-reporting-privacy">
331
    <tal:private condition="view/isPrivate">
332
        <script type="text/javascript">
333
            LPS.use('lp.app.privacy',  function(Y) {
334
                Y.on('domready', function() {
335
                   var cfg = {
14399.3.5 by j.c.sackett
Set up privacy display on security toggle.
336
                        notification_text: "This report will be private. "
337
                            + "You can disclose it later."
14399.3.2 by j.c.sackett
Moved filebug privacy stuff into a macro.
338
                    };
339
                    Y.lp.app.privacy.setup_privacy_notification(cfg);
340
                    Y.lp.app.privacy.display_privacy_notification();
341
                });
342
            });
343
        </script>
344
    </tal:private>
14399.3.7 by j.c.sackett
Fixed a tal section.
345
    <tal:not-private condition="not:view/isPrivate">
14399.3.5 by j.c.sackett
Set up privacy display on security toggle.
346
        <script type="text/javascript">
347
            LPS.use('lp.app.privacy', 'lp.bugs.filebug_dupefinder', function(Y) {
348
                Y.on('domready', function() {
349
                   var cfg = {
350
                        notification_text: "This report will be private "
14399.3.6 by j.c.sackett
Lint fixes.
351
                            + "because it is a security vulnerability. You "
14399.3.5 by j.c.sackett
Set up privacy display on security toggle.
352
                            + "can disclose it later."
353
                    };
354
                    Y.lp.app.privacy.setup_privacy_notification(cfg);
355
                    var sec = Y.one('[id="field.security_related"]');
356
                    sec.on('change', function() {
357
                        var checked = sec.get('checked');
358
                        if (checked) {
359
                            Y.lp.app.privacy.display_privacy_notification();
360
                        } else {
14399.3.6 by j.c.sackett
Lint fixes.
361
                            Y.lp.app.privacy.hide_privacy_notification();
14399.3.5 by j.c.sackett
Set up privacy display on security toggle.
362
                        }
363
                    });
364
                });
365
            });
366
        </script>
367
    </tal:not-private>
14399.3.2 by j.c.sackett
Moved filebug privacy stuff into a macro.
368
</metal:privacy>
369
8137.17.24 by Barry Warsaw
thread merge
370
<metal:similar-bugs define-macro="display-similar-bugs">
9947.2.9 by Graham Binns
The title for the async results set is now more meaningful.
371
  <tal:results-intro-with-summary condition="view/show_summary_in_results">
372
    <p id="filebug-query-heading">
373
      Is "<strong><span tal:replace="view/search_text">my submitted bug summary</span></strong>"
374
      one of these bugs?
375
    </p>
376
  </tal:results-intro-with-summary>
377
  <tal:results-intro-without-summary
378
      condition="not: view/show_summary_in_results">
379
    <p id="filebug-query-heading">
380
      Do any of the following bugs describe the bug you're trying to
381
      report?
382
    </p>
383
  </tal:results-intro-without-summary>
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
384
  <ul id="similar-bugs">
8279.3.5 by Graham Binns
Updated JS to make bugs.dupe_finder a proper module.
385
    <li tal:repeat="bug view/similar_bugs" class="similar-bug">
8137.17.24 by Barry Warsaw
thread merge
386
      <table tal:define="bugtask python:view.getRelevantBugTask(bug)">
387
        <tbody>
388
          <tr>
13453.2.1 by Danilo Segan
Restore expander replacements.
389
            <td class="bug-already-reported-expander">
13457.2.1 by Danilo Segan
Use a separate element as the expander icon to work around the sprite issue.
390
              <tal:comment condition="nothing">
391
                We use zero-width space (&#8203;) to force the otherwise
13475.1.1 by Henning Eggers
Remove white space from dupefinder template.
392
                empty span using sprite image to show up. Also no whitespace
393
                between tags is allowed.
13457.2.1 by Danilo Segan
Use a separate element as the expander icon to work around the sprite issue.
394
              </tal:comment>
13475.1.1 by Henning Eggers
Remove white space from dupefinder template.
395
              <span class="expander">&#8203;</span><label
396
                 tal:attributes="for string:bug-already-reported-as-${bug/id};
8490.3.40 by Martin Albisetti
Fix xx-displaying-similar-bugs.txt (and partially spriteify filebug
397
                                     class bugtask/image:sprite_css"
13475.1.1 by Henning Eggers
Remove white space from dupefinder template.
398
                     tal:condition="bugtask">&#8203;</label><label
399
                 class="sprite bug" tal:condition="not:bugtask">&#8203;</label>
8137.17.24 by Barry Warsaw
thread merge
400
            </td>
401
            <td>
402
              <div>
403
                <label tal:attributes="for string:bug-already-reported-as-${bug/id}"
404
                       style="font-weight: normal">
405
                  #<tal:bug-id replace="bug/id">4</tal:bug-id>
8426.8.9 by Graham Binns
UI changes for beuno.
406
                  <a tal:attributes="href bug/fmt:url; id string:bug-${bug/id}-title"
8818.2.2 by Graham Binns
The whole row is now a click-target for the collapsible rather than just the image. The rows will expand when the links are focussed.
407
                     tal:content="bug/title" class="duplicate-bug-link"
8279.3.5 by Graham Binns
Updated JS to make bugs.dupe_finder a proper module.
408
                     >Bug title here</a>
8137.17.24 by Barry Warsaw
thread merge
409
                </label>
410
              </div>
8279.3.5 by Graham Binns
Updated JS to make bugs.dupe_finder a proper module.
411
              <div class="lesser" style="margin-bottom: 0.2em">
412
                <span class="lesser">
413
                  <tal:bugtask-status tal:condition="bugtask">
414
                    <span tal:attributes="class string:status${bugtask/status/name}"
415
                      ><tal:status content="bugtask/status/title" /></span>
416
                  </tal:bugtask-status>
417
                  <tal:no-bugtask condition="not: bugtask">
418
                    <tal:closed condition="bug/is_complete">Closed</tal:closed>
419
                    <tal:open condition="not:bug/is_complete">Open</tal:open>
420
                  </tal:no-bugtask>
8279.3.12 by Graham Binns
Fixed comment counts so that initial comments aren't included.
421
                  (<tal:comments replace="bug/comment_count" />
422
                  <tal:one_comment condition="python: bug.comment_count == 1"
8279.3.5 by Graham Binns
Updated JS to make bugs.dupe_finder a proper module.
423
                    replace="string: comment"
424
                    /><tal:plural_comments
8279.3.12 by Graham Binns
Fixed comment counts so that initial comments aren't included.
425
                      condition="python: bug.comment_count != 1"
8279.3.5 by Graham Binns
Updated JS to make bugs.dupe_finder a proper module.
426
                      replace="string: comments" />)
8137.17.24 by Barry Warsaw
thread merge
427
                  last updated
8279.3.5 by Graham Binns
Updated JS to make bugs.dupe_finder a proper module.
428
                  <tal:last-updated
429
                      content="bug/date_last_updated/fmt:approximatedate">
8137.17.24 by Barry Warsaw
thread merge
430
                    2007-07-03
431
                  </tal:last-updated>
13608.1.1 by Curtis Hovey
remerged person-picker-expans-0.
432
                  &nbsp;&nbsp;
433
                  <a class="sprite new-window view-bug-link" target="_blank"
11085.5.1 by Jeff Craig
Add 'target=_blank' attribute to 'view this bug' link to open those clicks in a new window so as not to lose user context.
434
		      tal:attributes="href bug/fmt:url"
8818.2.3 by Graham Binns
Added a 'view this bug' link to the possible-dupes items.
435
                  >view this bug</a>
8279.3.5 by Graham Binns
Updated JS to make bugs.dupe_finder a proper module.
436
                </span>
8137.17.24 by Barry Warsaw
thread merge
437
              </div>
8279.3.13 by Graham Binns
Bug details are now hidden with JS rather than CSS.
438
              <div class="duplicate-details"
8752.5.6 by Graham Binns
Began working on making the filebug form slide out instead of just appearing.
439
                  tal:attributes="id string:details-for-bug-${bug/id}">
8279.3.1 by Graham Binns
Restyled the dupe list in line with the mockup.
440
                <div class="lesser" style="margin-bottom: 0.5em;"
8279.3.5 by Graham Binns
Updated JS to make bugs.dupe_finder a proper module.
441
                    tal:define="description bug/description/fmt:shorten/500/fmt:obfuscate-email/fmt:text-to-html"
8279.3.2 by Graham Binns
CSS changes.
442
                    tal:content="structure description" />
8426.2.1 by Graham Binns
Fixed bug 376026.
443
                <div class="lesser">
8279.3.19 by Graham Binns
Removed launchpad-form macros; added individual forms for the duplicates, made the radio buttons into hidden form fields.
444
                  <form action="."
445
                      tal:attributes="action view/action_url"
446
                      method="post"
8426.8.1 by Graham Binns
Added the duplicate finder overlay. Woot, etc.
447
                      accept-charset="UTF-8"
448
                      class="this-is-my-bug-form">
8279.3.19 by Graham Binns
Removed launchpad-form macros; added individual forms for the duplicates, made the radio buttons into hidden form fields.
449
                    <span style="padding-left: 1.5em">
8426.8.1 by Graham Binns
Added the duplicate finder overlay. Woot, etc.
450
                      <input type="hidden"
451
                          name="field.bug_already_reported_as"
452
                          class="bug-already-reported-as"
453
                          tal:attributes="
454
                              id string:bug-already-reported-as-${bug/id};
455
                              value string:${bug/id};" />
456
                      <input type="hidden"
457
                          name="field.subscribe_to_existing_bug"
458
                          class="subscribe-to-existing-bug"
459
                          value="no"
460
                          tal:attributes="
461
                              id string:bug-already-reported-as-${bug/id};"
462
                          />
8426.8.2 by Graham Binns
Added windmill tests for the dupe finder overlay.
463
                      <input type="submit"
464
                          name="field.actions.this_is_my_bug"
465
                          tal:attributes="id string:this-is-my-bug-${bug/id}"
466
                          value="Yes, this is the bug I'm trying to report"
467
                          />
468
                      <div tal:attributes="id string:duplicate-overlay-bug-${bug/id}"
469
                      ></div>
8279.3.19 by Graham Binns
Removed launchpad-form macros; added individual forms for the duplicates, made the radio buttons into hidden form fields.
470
                    </span>
471
                  </form>
8279.3.1 by Graham Binns
Restyled the dupe list in line with the mockup.
472
                </div>
8137.17.24 by Barry Warsaw
thread merge
473
              </div>
474
            </td>
475
          </tr>
476
        </tbody>
477
      </table>
478
    </li>
479
  </ul>
480
  <p tal:define="error_message view/widget_errors/bug_already_reported_as|nothing"
481
     tal:condition="error_message" tal:content="error_message" class="error message" />
482
</metal:similar-bugs>
483
9947.2.8 by Graham Binns
Merged old dupefinder work.
484
<metal:similar-bugs-and-filebug-button
485
    define-macro="show-similar-bugs-and-filebug-button">
486
8279.3.27 by Graham Binns
Template changes for Henning.
487
  <tal:similar-bugs condition="view/show_duplicate_list">
8137.17.24 by Barry Warsaw
thread merge
488
    <metal:similar-bugs
489
        use-macro="context/@@+filebug-macros/display-similar-bugs" />
9405.1.1 by Gavin Panella
Convert bugtarget-macros-filebug.pt to observe 3.0 rules.
490
    <tal:comment replace="nothing">
491
      We hide this next paragraph if the context doesn't use malone
492
      because in that situation we're showing the form after an error
493
      message and in that context the message makes no sense.
494
    </tal:comment>
495
    <p style="margin-top: 1em" tal:condition="view/contextUsesMalone">
496
      <input id="bug-not-already-reported" type="button"
497
             name="field.bug_already_reported_as"
498
             value="No, I need to report a new bug" />
499
    </p>
8137.17.24 by Barry Warsaw
thread merge
500
  </tal:similar-bugs>
9947.2.8 by Graham Binns
Merged old dupefinder work.
501
</metal:similar-bugs-and-filebug-button>
502
503
<metal:similar-bugs-and-filebug-form
504
    define-macro="show-similar-bugs-and-filebug-form">
505
506
  <metal:similar-bugs
507
      use-macro="context/@@+filebug-macros/show-similar-bugs-and-filebug-button" />
508
8137.17.24 by Barry Warsaw
thread merge
509
  <tal:submit-new-bug>
9947.2.8 by Graham Binns
Merged old dupefinder work.
510
    <metal:basic_filebug_widgets
511
        metal:use-macro="context/@@+filebug-macros/inline-filebug-form" />
8137.17.24 by Barry Warsaw
thread merge
512
  </tal:submit-new-bug>
513
</metal:similar-bugs-and-filebug-form>
514
9947.2.8 by Graham Binns
Merged old dupefinder work.
515
<metal:inline-filebug-form define-macro="inline-filebug-form">
12811.2.11 by Ian Booth
Code review fixes and ensure changing products hides/shows the relevant bug detail fields
516
  <div id="bug-reporting-form">
9947.2.8 by Graham Binns
Merged old dupefinder work.
517
    <metal:form use-macro="context/@@launchpad_form/form">
518
      <a name="form-start" />
519
      <metal:widgets metal:fill-slot="widgets">
520
        <table class="form">
521
          <metal:basic_filebug_widgets
522
              metal:use-macro="context/@@+filebug-macros/basic_filebug_widgets" />
523
        </table>
524
      </metal:widgets>
525
      <div class="actions" metal:fill-slot="buttons">
526
        <input tal:replace="structure view/submit_bug_action/render" />
527
      </div>
528
    </metal:form>
529
  </div>
530
</metal:inline-filebug-form>
531
532
<metal:filebug-form define-macro="simple-filebug-form">
533
  <form action="."
534
        tal:attributes="action view/action_url"
535
        name="launchpadform"
536
        method="post"
537
        enctype="multipart/form-data"
538
        accept-charset="UTF-8"
539
        id="filebug-form">
540
541
    <table class="form">
542
      <metal:basic_filebug_widgets
543
          metal:use-macro="context/@@+filebug-macros/basic_filebug_widgets" />
544
    </table>
545
    <div class="actions">
546
      <input tal:replace="structure view/submit_bug_action/render" />
547
    </div>
548
549
  </form>
550
</metal:filebug-form>
551
4939.2.3 by Curtis Hovey
Added namespaces to bug* templates and fixed markup.
552
</tal:root>