Closed Bug 836436 Opened 11 years ago Closed 11 years ago

Add a "search_tabs" hook to allow additional search tabs

Categories

(Bugzilla :: Query/Bug List, enhancement)

4.0.3
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: altlist, Assigned: altlist)

Details

Attachments

(1 file, 3 obsolete files)

Attached patch v1 (obsolete) — Splinter Review
Request that you add a hook in search/tabs.html.tmpl, which allows one to add additional tabs to the search page without having to modify the original file.
Attachment #708251 - Attachment is patch: true
Comment on attachment 708251 [details] [diff] [review]
v1

before_tabs is not a good name. search_tabs would be better.
Attachment #708251 - Flags: review-
Attached patch v2 (obsolete) — Splinter Review
Updated version
Attachment #708251 - Attachment is obsolete: true
Attachment #708272 - Flags: review?(LpSolit)
Blocks: 832095
Comment on attachment 708272 [details] [diff] [review]
v2

>+[% tabs = [ { name => 'specific', label => "Simple Search",
>                 link => "query.cgi?format=specific" },
>               { name => 'advanced', label => "Advanced Search",
>-                link => "query.cgi?format=advanced" } ]
>+                link => "query.cgi?format=advanced" } ] %]

Please fix the indentation for all lines, now that you made the first line shorter.


>+[% WRAPPER global/tabs.html.tmpl
>      current_tab_name = query_format || format || "advanced"
> %]

Please pass tabs = tabs to the wrapper, so that we understand where the tabs array is used.


Also, your patch needs a new extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl template to show how this hook works.


Otherwise looks good and works fine.
Attachment #708272 - Flags: review?(LpSolit) → review-
Assignee: query-and-buglist → altlist
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 5.0
No longer blocks: 832095
Attached patch v3 (obsolete) — Splinter Review
Updated patch with example hook
Attachment #708272 - Attachment is obsolete: true
Attachment #710992 - Flags: review?(LpSolit)
Comment on attachment 710992 [details] [diff] [review]
v3

>+++ extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl	2013-02-06 14:42:09.593282000 -0800

Missing MPL2 license.
Attachment #710992 - Flags: review?(LpSolit) → review-
Hi Frederic,

   I can add the license, but had merely used the same style as the other hooks in the Example (no MPL2).  Shouldn't the other hooks be updated as well?

Albert
All existing files already have the MPL license in them.
Attached patch v4Splinter Review
Understood.  Still using 4.0, gotta find the time to upgrade to 4.4!

Attached is the updated version.
Attachment #710992 - Attachment is obsolete: true
Attachment #711918 - Flags: review?(LpSolit)
Comment on attachment 711918 [details] [diff] [review]
v4

r=LpSolit
Attachment #711918 - Flags: review?(LpSolit) → review+
Flags: approval+
Summary: Add a "before_tabs" hook to allow additional search tabs → Add a "search_tabs" hook to allow additional search tabs
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
added extensions/Example/template/en/default/hook/search
added extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl
modified template/en/default/search/tabs.html.tmpl
Committed revision 8579.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: