summaryrefslogtreecommitdiffstats
path: root/template/en/default/index.html.tmpl
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-02-12 01:46:34 +0100
committermkanat%bugzilla.org <>2009-02-12 01:46:34 +0100
commitd8f23ea46b2244fb5c2ae610637deed14db13704 (patch)
tree4ff057b6f5a5e8d3f1e045351edb7de23bfe7e36 /template/en/default/index.html.tmpl
parent138c15b19a7f49667c012829cc0311abdbdfb0c0 (diff)
downloadbugzilla-d8f23ea46b2244fb5c2ae610637deed14db13704.tar.gz
bugzilla-d8f23ea46b2244fb5c2ae610637deed14db13704.tar.xz
Bug 475063: Make the logged-out index.cgi simpler
Patch By Guy Pyrzak <guy.pyrzak@gmail.com> r=mkanat, a=mkanat
Diffstat (limited to 'template/en/default/index.html.tmpl')
-rw-r--r--template/en/default/index.html.tmpl168
1 files changed, 105 insertions, 63 deletions
diff --git a/template/en/default/index.html.tmpl b/template/en/default/index.html.tmpl
index 9e0ec8aed..80b346195 100644
--- a/template/en/default/index.html.tmpl
+++ b/template/en/default/index.html.tmpl
@@ -19,6 +19,7 @@
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Jacob Steenhagen <jake@bugzilla.org>
# Vitaly Harisov <vitaly@rathedg.com>
+ # Guy Pyrzak <guy.pyrzak@gmail.com>
#%]
[%# INTERFACE:
@@ -33,27 +34,49 @@
header = "Main Page"
header_addl_info = "version $constants.BUGZILLA_VERSION"
style_urls = [ 'skins/standard/index.css' ]
- onload = 'document.forms[\'f\'].quicksearch.focus();'
%]
<script type="text/javascript">
<!--
+function onLoadActions() {
+ quicksearchHelpText('quicksearch', 'show');
+ if( window.external.AddSearchProvider ){
+ YAHOO.util.Dom.removeClass('quicksearch_plugin', 'bz_default_hidden');
+ }
+ document.getElementById('quicksearch_top').focus();
+}
function addSidebar() {
- if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
- {
- var sidebarname=window.location.host;
- if (!/bug/i.test(sidebarname))
- sidebarname="[% terms.Bugzilla %] "+sidebarname;
- window.sidebar.addPanel (sidebarname, "[% urlbase FILTER html %]sidebar.cgi", "");
+ var sidebarname=window.location.host;
+ if (!/bug/i.test(sidebarname))
+ sidebarname="[% terms.Bugzilla %] "+sidebarname;
+ window.sidebar.addPanel (sidebarname, "[% urlbase FILTER html %]sidebar.cgi", "");
+}
+var quicksearch_message = "Enter [% terms.abug %] # or some search terms";
+
+function checkQuicksearch( form ) {
+ if (form.quicksearch.value == '' || form.quicksearch.value == quicksearch_message ) {
+ alert('Please enter one or more search terms first.');
+ return false;
}
- else
- {
- var rv = window.confirm ("Your browser does not support the sidebar extension. " + "Would you like to upgrade now?");
- if (rv)
- document.location.href = "http://www.mozilla.org/";
+ return true;
+}
+
+function quicksearchHelpText(el_id, action){
+ var el = document.getElementById(el_id);
+ if ( action == "show") {
+ if( el.value == "" ) {
+ el.value = quicksearch_message
+ YAHOO.util.Dom.addClass(el, "quicksearch_help_text");
+ }
+ } else {
+ if( el.value == quicksearch_message ) {
+ el.value = "";
+ YAHOO.util.Dom.removeClass(el, "quicksearch_help_text");
+ }
}
}
+YAHOO.util.Event.onDOMReady(onLoadActions);
//-->
</script>
@@ -101,57 +124,76 @@ function addSidebar() {
<div id="page-index">
<div class="intro"></div>
-
- <p>Welcome to [% terms.Bugzilla %]. To see what's new in this version
- of [% terms.Bugzilla %], see the
- <a href="page.cgi?id=release-notes.html">release notes</a>!
- You may also want to read the
- <a href="[% docs_urlbase FILTER html %]using.html">
- [%- terms.Bugzilla %] User's Guide</a> to find out more about
- [%+ terms.Bugzilla %] and how to use it.</p>
-
- <p>Most common actions:</p>
- <ul>
- <li id="query"><a href="query.cgi">Search existing [% terms.bug %] reports</a></li>
- <li id="enter-bug"><a href="enter_bug.cgi">Enter a new [% terms.bug %] report</a></li>
- <li id="report"><a href="report.cgi">Summary reports and charts</a></li>
-[% IF user.id %]
- <li id="userprefs"><a href="userprefs.cgi">Change password or user preferences</a></li>
- [% IF user.authorizer.can_logout %]
- <li id="logout"><a href="relogin.cgi">Log out [% user.login FILTER html %]</a></li>
- [% END %]
-[% ELSIF user.authorizer.can_login %]
- </ul>
- [% PROCESS "account/auth/login-small.html.tmpl" %]
- <ul>
- [% IF Param('createemailregexp') && user.authorizer.user_can_create_account %]
- <li id="account"><a href="createaccount.cgi">Open a new [% terms.Bugzilla %] account</a></li>
- [% 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('[% urlbase FILTER html %]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") %]
-
- </ul>
-
- <form id="f" name="f" action="buglist.cgi" method="get"
- onsubmit="if (this.quicksearch.value == '')
- { alert('Please enter one or more search terms first.');
- return false; } return true;">
- <div>
- <p>Enter [% terms.abug %] # or some search terms:</p>
- <input id="quicksearch" type="text" name="quicksearch">
- <input id="find" type="submit" value="Find">
- <a href="page.cgi?id=quicksearch.html">[Help]</a>
- </div>
- </form>
-
+ <table>
+ <tr>
+ <td>
+ <h1 id="welcome"> Welcome to [% terms.Bugzilla %]</h1>
+ <a href="enter_bug.cgi" class="bz_common_actions">
+ <div class="bz_common_actions" id="enter_bug">
+ <span>File a Bug</span>
+ </div>
+ </a>
+
+ <a href="query.cgi" class="bz_common_actions">
+ <div class="bz_common_actions" id="query">
+ <span>Search</span>
+ </div>
+ </a>
+
+ <a class="bz_common_actions quicksearch_help_text" href="
+ [% IF user.id %]
+ userprefs.cgi
+ [% ELSIF Param('createemailregexp') && user.authorizer.user_can_create_account %]
+ createaccount.cgi
+ [% ELSE %]
+ ?GoAheadAndLogIn=1
+ [% END %]">
+ <div class="bz_common_actions" id="account">
+ <span>
+ [% IF user.id %]
+ User Preferences
+ [% ELSIF Param('createemailregexp') && user.authorizer.user_can_create_account %]
+ Open a new Account
+ [% ELSE %]
+ Log In
+ [% END%]</span>
+ </div>
+ </a>
+ <form id="quicksearchForm" name="quicksearchForm" action="buglist.cgi"
+ onsubmit="return checkQuicksearch(this);">
+ <div>
+ <input id="quicksearch" type="text" name="quicksearch"
+ onfocus="quicksearchHelpText(this.id, 'hide');"
+ onblur="quicksearchHelpText(this.id, 'show');"
+ >
+ <input id="find" type="submit" value="Quick Search">
+ <ul class="additional_links" id="quicksearch_links">
+ <li>
+ <a href="page.cgi?id=quicksearch.html">Quick Search help</a>
+ </li>
+ <li class="bz_default_hidden" id="quicksearch_plugin">
+ |
+ <a href="javascript:window.external.AddSearchProvider('[% urlbase FILTER html %]search_plugin.cgi')">
+ Install the Quick Search plugin
+ </a>
+ </li>
+ </ul>
+ <ul class="additional_links">
+ <li>
+ <a href="[% docs_urlbase FILTER html %]using.html">
+ [%- terms.Bugzilla %] User's Guide
+ </a>
+ &nbsp;|
+ </li>
+ <li>
+ <a href="page.cgi?id=release-notes.html" > Release Notes</a>
+ </li>
+ </div>
+ </div>
+ </form>
+ </td>
+ </tr>
+ </table>
<div class="outro"></div>
</div>