Closed Bug 695294 Opened 13 years ago Closed 13 years ago

The See Also field is not visible in "Format for Printing"

Categories

(Bugzilla :: User Interface, defect)

4.1.3
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 4.2

People

(Reporter: LpSolit, Assigned: selsky)

Details

Attachments

(1 file, 2 obsolete files)

The URL and other custom fields are visible in the "format for printing" page of a bug, but not the See Also field. It should be included, probably right below the URL field.
Assignee: ui → selsky
Status: NEW → ASSIGNED
Attachment #575100 - Flags: review?(mkanat)
Comment on attachment 575100 [details] [diff] [review]
Add See Also field to print view, v1

>=== modified file 'template/en/default/bug/show-multiple.html.tmpl'
>--- template/en/default/bug/show-multiple.html.tmpl	2011-01-24 18:29:39 +0000
>+++ template/en/default/bug/show-multiple.html.tmpl	2011-11-17 06:47:27 +0000
>@@ -173,6 +173,24 @@
>       </tr>
>     [% END %]
> 
>+    [% IF bug.see_also %]

Should use bug.see_also.size
Attachment #575100 - Attachment is obsolete: true
Attachment #575100 - Flags: review?(mkanat)
Attachment #575216 - Flags: review?(mkanat)
Comment on attachment 575216 [details] [diff] [review]
Add See Also field to print view, v2

Review of attachment 575216 [details] [diff] [review]:
-----------------------------------------------------------------

If we're going to copy over the display logic for these, we should instead centralize that logic somewhere--either in a filter, or in a shared template.
Attachment #575216 - Flags: review?(mkanat) → review-
(In reply to Max Kanat-Alexander from comment #4)
> If we're going to copy over the display logic for these, we should instead
> centralize that logic somewhere--either in a filter, or in a shared template.

Either that or simply paste the whole URL, even for local bugs.
Whiteboard: [Good Intro Bug]
Target Milestone: --- → Bugzilla 4.2
I simplified things:
1) Paste the whole URL, even for local bugs.
2) Don't check for is_safe_url since URLs from Bugzilla::BugURL will be safe.
Attachment #575216 - Attachment is obsolete: true
Attachment #575815 - Flags: review?(mkanat)
Comment on attachment 575815 [details] [diff] [review]
Add See Also field to print view, v3

Review of attachment 575815 [details] [diff] [review]:
-----------------------------------------------------------------

In general I like the simplicity, here. Is there any way to make this just a two-column field somewhere, though? It's not going to take up much width.

::: template/en/default/bug/show-multiple.html.tmpl
@@ +177,5 @@
> +      <tr>
> +        <th>[% field_descs.see_also FILTER html %]:</th>
> +        <td colspan="3">
> +        [% FOREACH see_also = bug.see_also %]
> +          <a href="[% see_also.name FILTER html %]">

That may need to be FILTER url, I believe. LpSolit can confirm one way or another.
The URL field values are permitted 3 columns.  I don't see why this should be fewer columns; even local bugs are rendered as full URLs.

The filter should be correct.  We're worried about improper embedded HTML-tags, not incorrectly encoded URIs.
(In reply to Max Kanat-Alexander from comment #7)
> In general I like the simplicity, here. Is there any way to make this just a
> two-column field somewhere, though? It's not going to take up much width.

URLs can be pretty long, and will easily take more than half of the paper width when printed. We should have one URL per line, as we do for the URL field already.


> That may need to be FILTER url, I believe.

No, FILTER html is correct. You use FILTER uri (not url) when you have to filter a parameter in the URL, not the whole URL itself.
Comment on attachment 575815 [details] [diff] [review]
Add See Also field to print view, v3

>+        <td colspan="3">
>+        [% FOREACH see_also = bug.see_also %]
>+          <a href="[% see_also.name FILTER html %]">
>+                   [% see_also.name FILTER html %]</a><br>
>+        [% END %]
>+        </td>

The indentation is incorrect for the FOREACH block. It should have two additional whitespaces.
Also, <br> should be [% "<br>" IF not loop.last() %] to avoid the last useless <br>.

Both can be fixed on checkin. r=LpSolit
Attachment #575815 - Flags: review?(mkanat) → review+
Flags: approval4.2+
Flags: approval+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/bug/show-multiple.html.tmpl
Committed revision 8064.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified template/en/default/bug/show-multiple.html.tmpl
Committed revision 7999.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: