]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 475063: Make the logged-out index.cgi simpler
authormkanat%bugzilla.org <>
Thu, 12 Feb 2009 00:46:34 +0000 (00:46 +0000)
committermkanat%bugzilla.org <>
Thu, 12 Feb 2009 00:46:34 +0000 (00:46 +0000)
Patch By Guy Pyrzak <guy.pyrzak@gmail.com> r=mkanat, a=mkanat

16 files changed:
skins/standard/index.css
skins/standard/index/bug.gif [new file with mode: 0644]
skins/standard/index/login.gif [new file with mode: 0644]
skins/standard/index/seach.gif [new file with mode: 0644]
template/en/default/attachment/create.html.tmpl
template/en/default/attachment/created.html.tmpl
template/en/default/attachment/edit.html.tmpl
template/en/default/attachment/updated.html.tmpl
template/en/default/bug/create/create.html.tmpl
template/en/default/bug/create/created.html.tmpl
template/en/default/bug/process/header.html.tmpl
template/en/default/bug/show.html.tmpl
template/en/default/global/header.html.tmpl
template/en/default/index.html.tmpl
template/en/default/list/list.html.tmpl
testserver.pl

index 2b021f349ad7cd34defa43dd3356171e1f4cc89b..61837f49122fc2bf99c7cc972e440997255311c5 100644 (file)
@@ -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) */
         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 (file)
index 0000000..55ac188
Binary files /dev/null and b/skins/standard/index/bug.gif differ
diff --git a/skins/standard/index/login.gif b/skins/standard/index/login.gif
new file mode 100644 (file)
index 0000000..cdc75c8
Binary files /dev/null and b/skins/standard/index/login.gif differ
diff --git a/skins/standard/index/seach.gif b/skins/standard/index/seach.gif
new file mode 100644 (file)
index 0000000..5276c15
Binary files /dev/null and b/skins/standard/index/seach.gif differ
index 3c099bee7446a731f527aca6d9e3329e942cf443..10648159b89088f456a82d18ea4cfd36f57bea33 100644 (file)
@@ -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"
 %]
 
index faf1b87c09b3f66cb3f1ffddcf538910341f8f23..22d5c1220ad8974d9738cf318036f8649cb632f8 100644 (file)
@@ -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"
 %]
index 10c6153235451307a8ec9386e717da3bdf9c8845..f461e9e914b1c39209a3856c54bcfaaf251fa69d 100644 (file)
@@ -35,7 +35,6 @@
   title = title
   header = header
   subheader = subheader
-  javascript_urls = [ "js/yui/yahoo-dom-event.js" ]
   doc_section = "attachments.html"
 %]
 
index bc22b466671dcfc73c27308e955685e31b8886f2..e0a92bc8a56c0125211c39045e51081dfa65d4ab 100644 (file)
@@ -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"
 %]
index 7b61807815581d0852cc2fb131f9c83af4556269..2cee5c91d7268712211737e8832ed9b3c1c47e83 100644 (file)
@@ -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" ]
 %]
 
index 7ec59b12661fc4b11d6d625a56a10743cd92ea30..0a03a4d71069e920b1304f42156a954da5626c4b 100644 (file)
@@ -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" ]
   
   
index 4aecfc1b812d0647b74861a54a115826056efb77..3ca8e10e88b2ff4d7c637158965fe3c36c5b040c 100644 (file)
@@ -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"
 %]
index cf6127413a284c4b3969e9913400ab546fd4c583..b92acb134371612933982541ef437527f98832b4 100644 (file)
@@ -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"
   %]
index 82a75e6a3e9c4afa606c6f1ff52764b00d40e899..b687da6afe291ac9c4bc63746b1d0ba81dd64aeb 100644 (file)
             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. 
       [% 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 %]
   # 'bannerhtml'
   #%]
 
-
 <div id="header">
 
 [% INCLUDE global/banner.html.tmpl %]
index 9e0ec8aed621587c90cce92ad5bac9e303eda872..80b34619587554d9d5c1e9a7604f8a19781078f7 100644 (file)
@@ -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:
    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>
 
index a75f1340cf1d1ce512e7623b788903fb6ba660b3..e0676b2b7960009df50d1c1bd20a045b8bd9b163 100644 (file)
@@ -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"
 %]
index d3cab1dc5538fe1bc6b79df98e6aa912a618a2b7..f7949948f3bc5d1707a02a4776a221baea9be029 100755 (executable)
@@ -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);