aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-02-12 00:46:34 +0000
committermkanat%bugzilla.org <>2009-02-12 00:46:34 +0000
commitd8f23ea46b2244fb5c2ae610637deed14db13704 (patch)
tree4ff057b6f5a5e8d3f1e045351edb7de23bfe7e36
parentBug 375382: When viewing a bug, make obsolete attachments hidden by default (diff)
downloadgentoo-bugzilla-d8f23ea46b2244fb5c2ae610637deed14db13704.tar.gz
gentoo-bugzilla-d8f23ea46b2244fb5c2ae610637deed14db13704.tar.bz2
gentoo-bugzilla-d8f23ea46b2244fb5c2ae610637deed14db13704.zip
Bug 475063: Make the logged-out index.cgi simpler
Patch By Guy Pyrzak <guy.pyrzak@gmail.com> r=mkanat, a=mkanat
-rw-r--r--skins/standard/index.css138
-rw-r--r--skins/standard/index/bug.gifbin0 -> 4638 bytes
-rw-r--r--skins/standard/index/login.gifbin0 -> 3214 bytes
-rw-r--r--skins/standard/index/seach.gifbin0 -> 3265 bytes
-rw-r--r--template/en/default/attachment/create.html.tmpl2
-rw-r--r--template/en/default/attachment/created.html.tmpl3
-rw-r--r--template/en/default/attachment/edit.html.tmpl1
-rw-r--r--template/en/default/attachment/updated.html.tmpl3
-rw-r--r--template/en/default/bug/create/create.html.tmpl3
-rw-r--r--template/en/default/bug/create/created.html.tmpl3
-rw-r--r--template/en/default/bug/process/header.html.tmpl3
-rw-r--r--template/en/default/bug/show.html.tmpl3
-rw-r--r--template/en/default/global/header.html.tmpl14
-rw-r--r--template/en/default/index.html.tmpl168
-rw-r--r--template/en/default/list/list.html.tmpl3
-rwxr-xr-xtestserver.pl8
16 files changed, 222 insertions, 130 deletions
diff --git a/skins/standard/index.css b/skins/standard/index.css
index 2b021f349..61837f491 100644
--- a/skins/standard/index.css
+++ b/skins/standard/index.css
@@ -11,6 +11,7 @@
* The Original Code is the Bugzilla Bug Tracking System.
*
* Contributor(s): Vitaly Harisov <vitaly@rathedg.com>
+ * Guy Pyrzak <guy.pyrzak@gmail.com>
*/
/* index page (begin) */
@@ -20,66 +21,125 @@
padding: 0.2em 0.2em 0.15em 0.2em;
}
- #page-index ul, #page-index li,
- #page-index p, #page-index form p
+ /* Hide from NN4 */
+
+ #new_release
{
- margin: 0;
- padding: 0;
+ border: 2px solid red;
+ padding: 0.5em 1em;
+ margin: 1em;
+ font-weight: bold;
}
- #page-index ul
+ #new_release .notice
{
- padding-bottom: 1em;
+ font-size: 80%;
+ font-weight: normal;
}
- #page-index li
+ #welcome-admin a
{
- list-style: none;
+ font-weight: bold;
}
-
- #page-index p
+
+ div.bz_common_actions
{
- padding-bottom: 0.5em;
+ height: 190px;
+ width: 195px;
+ background-color: blue;
+ float: left;
+ margin: 0 3ex;
+ text-align: center;
+ margin-bottom: 3em;
}
-
- /* Hide from NN4 */
- div#page-index .intro
+ div.bz_common_actions span
{
- width: 250px;
- height: 200px;
-
- margin-top: 2.3em;
- margin-right: 2.3em;
- float: right;
- background: transparent no-repeat url(index/front.png);
+ position: relative;
+ top: 95%;
+ font-weight: bold;
}
-
- #page-index #report
+
+ div.bz_common_actions,
+ div.bz_common_actions a,
+ div.bz_common_actions a div,
+ div.bz_common_actions a:visited,
+ div.bz_common_actions a:hover {
+ text-decoration: none;
+ }
+
+ a.bz_common_actions {
+ text-decoration: none;
+ }
+
+ #quicksearchForm
{
- padding-bottom: 1em;
+ clear: both;
+ text-align: center;
+ margin-bottom: 2em;
}
-
- #page-index #sidebar
+
+ #quicksearchForm #quicksearch
{
- padding-top: 1em;
+ width: 25em;
}
-
- #new_release
+
+ #quicksearchForm
{
- border: 2px solid red;
- padding: 0.5em 1em;
- margin: 1em;
+ margin: 0;
+ padding: 0;
+ }
+
+ #page-index table{
+ border-collapse: collapse;
+ }
+
+ #welcome
+ {
+ font-size: x-large;
font-weight: bold;
+ text-align: center;
+ margin: 0 0 0.8em 0;
+ padding: 0;
}
-
- #new_release .notice
+
+ #enter_bug
{
- font-size: 80%;
- font-weight: normal;
+ background: url(index/bug.gif) no-repeat;
}
-
- #welcome-admin a
+
+ #query
{
- font-weight: bold;
+ background: url(index/search.gif) no-repeat;
+ }
+
+ #account
+ {
+ background: url(index/account.gif) no-repeat;
+ }
+
+ ul.additional_links
+ {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+
+ ul#quicksearch_links{
+ margin-bottom: 1em;
+ }
+
+ ul.additional_links li
+ {
+ display: inline;
+ }
+
+ ul.additional_links li.bz_default_hidden
+ {
+ display: none;
+ }
+
+ input.quicksearch_help_text
+ {
+ color: #ccc;
}
/* index page (end) */
diff --git a/skins/standard/index/bug.gif b/skins/standard/index/bug.gif
new file mode 100644
index 000000000..55ac1888c
--- /dev/null
+++ b/skins/standard/index/bug.gif
Binary files differ
diff --git a/skins/standard/index/login.gif b/skins/standard/index/login.gif
new file mode 100644
index 000000000..cdc75c8d4
--- /dev/null
+++ b/skins/standard/index/login.gif
Binary files differ
diff --git a/skins/standard/index/seach.gif b/skins/standard/index/seach.gif
new file mode 100644
index 000000000..5276c1540
--- /dev/null
+++ b/skins/standard/index/seach.gif
Binary files differ
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl
index 3c099bee7..10648159b 100644
--- a/template/en/default/attachment/create.html.tmpl
+++ b/template/en/default/attachment/create.html.tmpl
@@ -35,7 +35,7 @@
subheader = subheader
onload="setContentTypeDisabledState(document.entryform);"
style_urls = [ 'skins/standard/create_attachment.css' ]
- javascript_urls = [ "js/yui/yahoo-dom-event.js", "js/attachment.js" ]
+ javascript_urls = [ "js/attachment.js" ]
doc_section = "attachments.html"
%]
diff --git a/template/en/default/attachment/created.html.tmpl b/template/en/default/attachment/created.html.tmpl
index faf1b87c0..22d5c1220 100644
--- a/template/en/default/attachment/created.html.tmpl
+++ b/template/en/default/attachment/created.html.tmpl
@@ -39,8 +39,7 @@
[% PROCESS global/header.html.tmpl
title = "Attachment $attachment.id added to $terms.Bug $attachment.bug_id"
bodyclasses = bodyclasses
- javascript_urls = [ "js/util.js", "js/field.js",
- "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
+ javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ]
style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
doc_section = "bug_page.html"
%]
diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl
index 10c615323..f461e9e91 100644
--- a/template/en/default/attachment/edit.html.tmpl
+++ b/template/en/default/attachment/edit.html.tmpl
@@ -35,7 +35,6 @@
title = title
header = header
subheader = subheader
- javascript_urls = [ "js/yui/yahoo-dom-event.js" ]
doc_section = "attachments.html"
%]
diff --git a/template/en/default/attachment/updated.html.tmpl b/template/en/default/attachment/updated.html.tmpl
index bc22b4666..e0a92bc8a 100644
--- a/template/en/default/attachment/updated.html.tmpl
+++ b/template/en/default/attachment/updated.html.tmpl
@@ -43,8 +43,7 @@
subheader = filtered_desc
header_addl_info = "Last modified: $filtered_timestamp"
bodyclasses = bodyclasses
- javascript_urls = [ "js/util.js", "js/field.js",
- "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
+ javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ]
style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
doc_section = "bug_page.html"
%]
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 7b6180781..2cee5c91d 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -32,8 +32,7 @@
title = title
style_urls = [ 'skins/standard/create_attachment.css',
'skins/standard/yui/calendar.css' ]
- javascript_urls = [ "js/attachment.js", "js/util.js",
- "js/yui/yahoo-dom-event.js", "js/yui/calendar.js",
+ javascript_urls = [ "js/attachment.js", "js/util.js", "js/yui/calendar.js",
"js/field.js", "js/yui/cookie.js", "js/TUI.js" ]
%]
diff --git a/template/en/default/bug/create/created.html.tmpl b/template/en/default/bug/create/created.html.tmpl
index 7ec59b126..0a03a4d71 100644
--- a/template/en/default/bug/create/created.html.tmpl
+++ b/template/en/default/bug/create/created.html.tmpl
@@ -39,8 +39,7 @@
title = "$terms.Bug $id Submitted &ndash; $filtered_desc"
header = "$terms.Bug&nbsp;$id Submitted"
subheader = filtered_desc
- javascript_urls = [ "js/util.js", "js/field.js",
- "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
+ javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ]
style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
diff --git a/template/en/default/bug/process/header.html.tmpl b/template/en/default/bug/process/header.html.tmpl
index 4aecfc1b8..3ca8e10e8 100644
--- a/template/en/default/bug/process/header.html.tmpl
+++ b/template/en/default/bug/process/header.html.tmpl
@@ -42,8 +42,7 @@
[% END %]
[% PROCESS global/header.html.tmpl
- javascript_urls = [ "js/util.js", "js/field.js",
- "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
+ javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ]
style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
doc_section = "bug_page.html"
%]
diff --git a/template/en/default/bug/show.html.tmpl b/template/en/default/bug/show.html.tmpl
index cf6127413..b92acb134 100644
--- a/template/en/default/bug/show.html.tmpl
+++ b/template/en/default/bug/show.html.tmpl
@@ -44,8 +44,7 @@
subheader = filtered_desc
header_addl_info = "Last modified: $filtered_timestamp"
bodyclasses = bodyclasses
- javascript_urls = [ "js/util.js", "js/field.js",
- "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
+ javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ]
style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
doc_section = "bug_page.html"
%]
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 82a75e6a3..b687da6af 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -188,8 +188,14 @@
type="text/css">
<![endif]-->
+ <script src="js/yui/yahoo-dom-event.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
+ YAHOO.namespace('bugzilla');
+ if (YAHOO.env.ua.gecko) {
+ YAHOO.util.Event._simpleRemove(window, "unload",
+ YAHOO.util.Event._unload);
+ }
[%# Make some Bugzilla information available to all scripts.
# We don't import every parameter and constant because we
# don't want to add a lot of uncached JS to every page.
@@ -210,13 +216,6 @@
[% FOREACH javascript_url = javascript_urls %]
<script src="[% javascript_url FILTER html %]" type="text/javascript"></script>
[% END %]
- [% IF javascript_urls.grep('yui/').size %]
- <script type="text/javascript">
- YAHOO.namespace('bugzilla');
- if( YAHOO.env.ua.gecko )
- YAHOO.util.Event._simpleRemove(window, "unload", YAHOO.util.Event._unload);
- </script>
- [% END %]
[% END %]
[%# this puts the live bookmark up on firefox for the Atom feed %]
@@ -247,7 +246,6 @@
# 'bannerhtml'
#%]
-
<div id="header">
[% INCLUDE global/banner.html.tmpl %]
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>
diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl
index a75f1340c..e0676b2b7 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -46,8 +46,7 @@
title = title
style = style
atomlink = "buglist.cgi?$urlquerypart&title=$title&ctype=atom"
- javascript_urls = [ "js/util.js", "js/field.js",
- "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
+ javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ]
style_urls = [ "skins/standard/buglist.css", "skins/standard/yui/calendar.css" ]
doc_section = "query.html#list"
%]
diff --git a/testserver.pl b/testserver.pl
index d3cab1dc5..f7949948f 100755
--- a/testserver.pl
+++ b/testserver.pl
@@ -86,14 +86,14 @@ to validate webservergroup.\n";
}
-# Try to fetch a static file (front.png)
+# Try to fetch a static file (padlock.png)
$ARGV[0] =~ s/\/$//;
-my $url = $ARGV[0] . "/skins/standard/index/front.png";
+my $url = $ARGV[0] . "/images/padlock.png";
if (fetch($url)) {
- print "TEST-OK Got front picture.\n";
+ print "TEST-OK Got padlock picture.\n";
} else {
print
-"TEST-FAILED Fetch of skins/standard/index/front.png failed
+"TEST-FAILED Fetch of images/padlock.png failed
Your web server could not fetch $url.
Check your web server configuration and try again.\n";
exit(1);