From: Frédéric Buclin Date: Mon, 6 Jan 2014 23:02:09 +0000 (+0100) Subject: Bug 390955: Add some useful standard searches to the index page X-Git-Tag: bugzilla-4.5.2~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4f65f36b7d31d50f39264882c5440b842429bba;p=thirdparty%2Fbugzilla.git Bug 390955: Add some useful standard searches to the index page r=dkl a=sgreen --- diff --git a/images/rss.png b/images/rss.png new file mode 100644 index 0000000000..1679ab05b0 Binary files /dev/null and b/images/rss.png differ diff --git a/index.cgi b/index.cgi index 096d48d41d..e52d01b030 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 d10fac026e..cf4fe57bf6 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 5956920255..bfe0b2ab87 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 b47b912c08..61d083d1b7 100644 --- a/template/en/default/index.html.tmpl +++ b/template/en/default/index.html.tmpl @@ -22,9 +22,6 @@