From d4f65f36b7d31d50f39264882c5440b842429bba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Tue, 7 Jan 2014 00:02:09 +0100 Subject: [PATCH] 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 0000000000000000000000000000000000000000..1679ab05b016ab3eb7556d6eaa869795bf457aa0 GIT binary patch literal 764 zc-jH{0t5YtP)ycK`yFAWD;1ET2aX4PeS5VXXgH#(|69jGm_GU@1D8vz3+LxpJ8L?l8MS>?e&-y z%WwuTdNIE7EdHio488!C7VH80_u>sxi4*Ze##>tjHyI4h^~p_yXBY;V7~x4qiDX^o z$0suUd9_8Fo{vZ}h4R*ulmz%Q;}E~b|0~uMp2X6k2UB6Iq)2TF6^AaO_{f3{_rnnU zi6Jm=Ws}%12#^$9)n`OF)-{H^$f#o?Aj#uD5NjJvVCb8 z-B>S$xnn=9j>}+Mn>CUD>NdR3&q`w7k;qeM0wu6^wW8|MOO&6!4=ddb{F#RP_&mh) zh&C`ft^uj`lGt|w0g0yETI}Y>sAY^qD3eRt@_a%KM5W6LU^-*DM4)W^=yeGW@x-vP^51&;a z_u{UmC~NE1Vr3#lv4n8W*3mnNoEQXe=!ExXK$Ebldhnf{$W4qw=54T8C6%^EPa`Y= zTC8eULRQ}bw)+@7dl}CANBY)CbCDGr>2aaR?%ik}jX`KOnc%8hS}Ytd3$EobO|$Q5mVUPR@OK7nDP0&O#Q>d=_Sn z1vYtQ@4be7bs6d9|5=jKsKSQnnh9Iz+9hH&apbr?VDvVzx4Bgj1I#v;5_PC`r3U$u usA%IQS3%99X~E(!%1spbn*KZg6<`2SHB&n2#K$=R0000in_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 @@