]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 354661: Provide a Bugzilla Quicksearch plugin for Firefox 2 and IE 7 users to...
authorlpsolit%gmail.com <>
Fri, 29 Sep 2006 05:15:07 +0000 (05:15 +0000)
committerlpsolit%gmail.com <>
Fri, 29 Sep 2006 05:15:07 +0000 (05:15 +0000)
search_plugin.cgi [new file with mode: 0644]
skins/standard/index.css
template/en/default/global/header.html.tmpl
template/en/default/index.html.tmpl
template/en/default/search/search-plugin.xml.tmpl [new file with mode: 0644]

diff --git a/search_plugin.cgi b/search_plugin.cgi
new file mode 100644 (file)
index 0000000..d49106e
--- /dev/null
@@ -0,0 +1,32 @@
+#!/usr/bin/perl -wT
+# -*- Mode: perl; indent-tabs-mode: nil -*-
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Bugzilla Bug Tracking System.
+#
+# Contributor(s): Frédéric Buclin <LpSolit@gmail.com>
+
+use strict;
+use lib ".";
+
+use Bugzilla;
+
+Bugzilla->login();
+
+my $cgi = Bugzilla->cgi;
+my $template = Bugzilla->template;
+
+# Return the appropriate HTTP response headers.
+print $cgi->header('application/xml');
+
+$template->process("search/search-plugin.xml.tmpl")
+  || ThrowTemplateError($template->error());
index 90e33e4ddde7d7d8ff937ee0293c3f9bbd04c614..918f775e473473894f6a27d2c3a20026dae273dc 100644 (file)
         padding: 0;
     }
 
+    #page-index ul
+    {
+        padding-bottom: 1em;
+    }
+
     #page-index li
     {
         list-style: none;
@@ -34,7 +39,7 @@
 
     #page-index p
     {
-        padding-bottom: 1em;
+        padding-bottom: 0.5em;
     }
 
     /* Hide from NN4 */
         padding-top: 1em;
     }
 
-    /* Hide from MSIE6- */
-    #page-index [id]#sidebar
-    {
-        padding: 1em 0;
-    }
-
     #new_release
     {
         border: 2px solid red;
index 0266984261e36624fa1876049b9148099d5df6a4..c84f503d0b8b411b91dd8605a8f4c994ac51efd2 100644 (file)
              href="[% atomlink FILTER html %]" />
     [% END %]
 
+    [%# Required for the 'Autodiscovery' feature in Firefox 2 and IE 7. %]
+    <link rel="search" type="application/opensearchdescription+xml"
+                       title="[% terms.Bugzilla %]" href="./search_plugin.cgi">
   </head>
 
 [%# Migration note: contents of the old Param 'bodyhtml' go in the body tag,
index 8d520dfab39d73ecb1ecb291cc820b1b6f9e2a6b..61f724b416e9b85963ea7845d939d92a4f049d2e 100644 (file)
@@ -116,6 +116,11 @@ function addSidebar() {
   [% END %]
 [% END %]
     <li id="sidebar"><a href="javascript:addSidebar()">Add to Sidebar</a> (requires a Mozilla browser like Mozilla Firefox)</li>
+    <li id="quick_search_plugin">
+      <a href="javascript:window.external.AddSearchProvider('[% Param('urlbase') %]search_plugin.cgi')">Install
+      the Quick Search plugin</a> (requires Firefox 2 or Internet Explorer 7)
+    </li>
+
 
     [%# List items of links to more things users can do on this installation. %]
     [% Hook.process("links") %]
diff --git a/template/en/default/search/search-plugin.xml.tmpl b/template/en/default/search/search-plugin.xml.tmpl
new file mode 100644 (file)
index 0000000..649c6e9
--- /dev/null
@@ -0,0 +1,28 @@
+[%# 1.0@bugzilla.org #%]
+[%# The contents of this file are subject to the Mozilla Public
+  # License Version 1.1 (the "License"); you may not use this file
+  # except in compliance with the License. You may obtain a copy of
+  # the License at http://www.mozilla.org/MPL/
+  #
+  # Software distributed under the License is distributed on an "AS
+  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+  # implied. See the License for the specific language governing
+  # rights and limitations under the License.
+  #
+  # The Original Code is the Bugzilla Bug Tracking System.
+  #
+  # Contributor(s): Frédéric Buclin <LpSolit@gmail.com>
+  #
+  #%]
+[% PROCESS global/variables.none.tmpl %]
+<?xml version="1.0" encoding="UTF-8"?>
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
+<ShortName>[% terms.Bugzilla %]</ShortName>
+<Description>[% terms.Bugzilla %] Quick Search</Description>
+<InputEncoding>UTF-8</InputEncoding>
+<Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAABGdBTUEAAK%2FINwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAALBSURBVHjaYnxckcEAA3%2F%2B%2FT%2F17LUcH%2Fevf%2F8U%2BHmYGBkZMABAALEgc%2B68%2F3T227cf2tJKKhJLt59n%2FfmbnYnZV1KEhYkJrgYggBghNrz78fPIi3d8uvKBIdb%2FOaWPnzitLc97%2Bc5rFXnhnVO3%2BslLwjUABBDIhnsfPl%2Fj53VO91FX4Gfgkjxw%2Fd%2F6Q49%2FWStqyAj%2B%2B88gZqn%2B9u5rYU52iAaAAGL69%2F%2F%2F2d9%2FYiMclGT4fv76%2BZ9DbO%2FeA39%2BfJHVcvj5l%2Bnh03e%2FWThOvnwLtwEgAAAxAM7%2FBPj8%2FRYkHQYHAf3%2F%2Fv%2F%2B%2Fv8BAVNTUPX18yorLNHE2S8mB%2FT2%2Bq7a4dvu8iUSDgAAAAKICRgUv3%2F8ZGKGeIvpz6eXBvq61lZWLMwMv%2F5zMP7%2FqSAjVFyZ%2FNvZftuT10DnAAQAMQDO%2FwQIBAPz5Or6%2Ff0CBQEAAgT99ubq38z2%2BwT18%2FAM%2F%2BkNDAv6%2FQMCAA1GVVrhMze5h4kCCORpkd9%2F3n74KiHO%2B%2BffX8b%2Ff7m%2BXWP985%2Bf5R%2BPLNdfoK%2F%2F%2Ffv39%2BePj2%2FkZYR0fe0BAgikQZGX%2B9b9FzLS%2FH%2F%2B%2FGVgYGRlZWNlA7nv7z9QuDP8%2B8nw%2FRXjn68Mv4Gu%2FAwQQCCni3FxPLn7nIGZGegfNhYmNjYWZnBMASOakZER6Eumf9%2FYGT4y%2FHx%2F%2BfBFgAAC2cDGzPT99WeGvwzvv%2Fx89vrr%2F39%2FJER4pcT5Gf4z%2FP37D2jtj9%2B%2FL918fmzrKSsWNoAAgiaN%2Fz9%2Fff%2F6S4CP8%2BWbz9vWHfv54aukpAAz0Og%2Ff%2F7%2F%2Bs36668cO3ugED9QJUAAQTUArf7%2F8x87D9vRjcejhPiZhAUYcACAAGI5%2FOHH9ddvXzAxmjz%2B8P8lw4fXn5l4eRlwA4AAYmaTkBFg%2FKvJwfbkwZuXN57y%2Fv%2F34stXGR4uRmxpGwgAAgwA4%2FkfrfCWvLQAAAAASUVORK5CYII%3D</Image>
+<Url type="text/html" method="GET" template="[% Param('urlbase') %]buglist.cgi">
+  <Param name="quicksearch" value="{searchTerms}"/>
+</Url>
+<SearchForm>[% Param('urlbase') %]</SearchForm>
+</OpenSearchDescription>