From d4f65f36b7d31d50f39264882c5440b842429bba Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Tue, 7 Jan 2014 00:02:09 +0100 Subject: Bug 390955: Add some useful standard searches to the index page r=dkl a=sgreen --- images/rss.png | Bin 0 -> 764 bytes index.cgi | 13 +++ skins/standard/global.css | 6 ++ skins/standard/index.css | 23 +++-- template/en/default/index.html.tmpl | 169 +++++++++++++++++++++--------------- 5 files changed, 133 insertions(+), 78 deletions(-) create mode 100644 images/rss.png diff --git a/images/rss.png b/images/rss.png new file mode 100644 index 000000000..1679ab05b Binary files /dev/null and b/images/rss.png differ diff --git a/index.cgi b/index.cgi index 096d48d41..e52d01b03 100755 --- a/index.cgi +++ b/index.cgi @@ -45,6 +45,19 @@ if ($user->in_group('admin')) { $vars->{'release'} = Bugzilla::Update::get_notifications(); } +if ($user->id) { + my $dbh = Bugzilla->dbh; + $vars->{assignee_count} = + $dbh->selectrow_array('SELECT COUNT(*) FROM bugs WHERE assigned_to = ? + AND resolution = ""', undef, $user->id); + $vars->{reporter_count} = + $dbh->selectrow_array('SELECT COUNT(*) FROM bugs WHERE reporter = ? + AND resolution = ""', undef, $user->id); + $vars->{requestee_count} = + $dbh->selectrow_array('SELECT COUNT(DISTINCT bug_id) FROM flags + WHERE requestee_id = ?', undef, $user->id); +} + # Generate and return the UI (HTML page) from the appropriate template. $template->process("index.html.tmpl", $vars) || ThrowTemplateError($template->error()); diff --git a/skins/standard/global.css b/skins/standard/global.css index d10fac026..cf4fe57bf 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -259,6 +259,12 @@ div#docslinks { margin: 0; } +.rss { + background: transparent url(../../images/rss.png) no-repeat; + padding-left: 16px; + line-height: 1.5em; +} + /**************************/ /* Bug links and statuses */ /**************************/ diff --git a/skins/standard/index.css b/skins/standard/index.css index 595692025..bfe0b2ab8 100644 --- a/skins/standard/index.css +++ b/skins/standard/index.css @@ -68,13 +68,11 @@ .bz_common_actions a:hover { text-decoration: none; } - #enter_bug { background: url(index/file-a-bug.png) no-repeat; } - #query { background: url(index/search.png) no-repeat; } - #account { - background: url(index/new-account.png) no-repeat; - margin-right: 0; - } - + #enter_bug { background: url(index/file-a-bug.png) no-repeat; } + #query { background: url(index/search.png) no-repeat; } + #account { background: url(index/new-account.png) no-repeat; } + #help { background: url(index/help.png) no-repeat; } + #quicksearchForm { clear: both; @@ -106,7 +104,16 @@ margin: 0 0 0.8em 0; padding: 0; } - + + #common_queries ul { + list-style: none; + padding-left: 1.5em; + } + + #common_queries li a { + text-decoration: none; + } + ul.additional_links { list-style: none; diff --git a/template/en/default/index.html.tmpl b/template/en/default/index.html.tmpl index b47b912c0..61d083d1b 100644 --- a/template/en/default/index.html.tmpl +++ b/template/en/default/index.html.tmpl @@ -22,9 +22,6 @@