Closed Bug 175864 Opened 22 years ago Closed 22 years ago

'Preset Queries' label in footer missing if last query set to 'only on query page'

Categories

(Bugzilla :: User Interface, defect)

2.16.1
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 179203

People

(Reporter: mozilla, Assigned: myk)

Details

Attachments

(1 file)

If you save a query, but don't check the "and put it in my page footer" box, you
will sometimes lose the "Preset Queries" label in the footer.  In fact, the
whole cell goes away, which makes the footer look rather funky.

I believe that this will happen iff the query in question is the last one in the
list that's passed in to the useful-links.html.tmpl template.  Here is relevant
section of that template:

    [% preset_queries = user.showmybugslink %]
    [% FOREACH q = user.queries %]
      [% preset_queries = 1 IF q.linkinfooter %]
    [% END %]

    <tr>
      [% IF preset_queries %]
        <td>
          Preset&nbsp;Queries:
        </td>
      [% END %]

So if there are intermediate queries with linkinfooter == false, that won't
cause a problem.  But if the last element of user.queries has linkinfooter ==
false, then "<td>Preset Queries:</td>" won't be included, but the individual
queries will be listed.  This results in a footer whose content is correct, but
whose formatting is somewhat screwed up.
This seems to fix the problem on our installation.  There should be a more
efficient way to do this, but I don't know what the syntax is to break out of
the for loop once the preset_queries gets set to 1.  Probably not a big deal
anyway, as I doubt that many people have really long lists of preset queries to
begin with.
*** Bug 179203 has been marked as a duplicate of this bug. ***
I prefer attachment 105676 [details] [diff] [review]. Thoughts?
Keywords: patch, review
Target Milestone: --- → Bugzilla 2.18
OK, we'll do it the other way around, the other one has a better patch.

*** This bug has been marked as a duplicate of 179203 ***

*** This bug has been marked as a duplicate of 179203 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Keywords: patch, review
Resolution: --- → DUPLICATE
Target Milestone: Bugzilla 2.18 → ---
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: