From 0439b260c52f20ef3ec6a2bc928f8a0515aa1d93 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Thu, 16 Aug 2012 17:17:40 -0400 Subject: Dashboard improvements --- extensions/MyDashboard/Extension.pm | 14 +- .../en/default/pages/mydashboard_old.html.tmpl | 326 --------------------- extensions/MyDashboard/web/styles/mydashboard.css | 44 +-- 3 files changed, 14 insertions(+), 370 deletions(-) delete mode 100644 extensions/MyDashboard/template/en/default/pages/mydashboard_old.html.tmpl (limited to 'extensions') diff --git a/extensions/MyDashboard/Extension.pm b/extensions/MyDashboard/Extension.pm index e5f022dec..82c995442 100644 --- a/extensions/MyDashboard/Extension.pm +++ b/extensions/MyDashboard/Extension.pm @@ -190,7 +190,9 @@ sub _standard_saved_queries { if ($user->showmybugslink) { my $query = Bugzilla->params->{mybugstemplate}; - $query =~ s/%userid%/$user->login/; + my $login = $user->login; + $query =~ s/%userid%/$login/; + $query =~ s/^buglist.cgi\?//; push(@query_defs, { name => 'mybugs', heading => "My Bugs", @@ -207,7 +209,7 @@ sub _standard_saved_queries { params => $q->url }); } - my $date_now = DateTime->now(time_zone => Bugzilla->local_timezone); + #my $date_now = DateTime->now(time_zone => Bugzilla->local_timezone); ### Collect the query results for display in the template @@ -230,10 +232,10 @@ sub _standard_saved_queries { my $bug = {}; foreach my $column (@select_columns) { $bug->{$column} = shift @$row; - if ($column eq 'changeddate') { - my $date_then = datetime_from($bug->{$column}); - $bug->{'updated'} = time_ago($date_then, $date_now); - } + #if ($column eq 'changeddate') { + # my $date_then = datetime_from($bug->{$column}); + # $bug->{'updated'} = time_ago($date_then, $date_now); + #} } push(@bugs, $bug); } diff --git a/extensions/MyDashboard/template/en/default/pages/mydashboard_old.html.tmpl b/extensions/MyDashboard/template/en/default/pages/mydashboard_old.html.tmpl deleted file mode 100644 index b7f34a183..000000000 --- a/extensions/MyDashboard/template/en/default/pages/mydashboard_old.html.tmpl +++ /dev/null @@ -1,326 +0,0 @@ -[%# This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - # - # This Source Code Form is "Incompatible With Secondary Licenses", as - # defined by the Mozilla Public License, v. 2.0. - #%] - -[% PROCESS global/variables.none.tmpl %] - -[% PROCESS global/header.html.tmpl - title = "My Dashboard" - style_urls = [ "skins/standard/buglist.css", - "js/yui/assets/skins/sam/paginator.css", - "extensions/MyDashboard/web/styles/mydashboard.css" ] - yui = [ "datatable", "paginator" ] - javascript_urls = [ "extensions/MyDashboard/web/js/mydashboard.js" ] -%] - - - -[% standard_results = [] %] -[% saved_results = [] %] -[% FOREACH r = results %] - [% standard_results.push(r) IF !r.saved %] - [% saved_results.push(r) IF r.saved %] -[% END %] - - -
-
- - -
- - - - [% FOREACH r = standard_results %] - [% PROCESS query_results r = r %] - [% END %] - - - - (back to top) - -
-
- - - - - - - - - - - [% FOREACH request = requestee_list %] - - - - - - - [% END %] - -
RequesterFlag[% terms.Bug %]Created
[% request.requester FILTER html %][% request.type FILTER html %][% request.status FILTER html %] - [% IF request.attach_id %] - - [% request.attach_id FILTER html %]: [%+ request.attach_summary FILTER html %] - - [% ELSE %] - - [% request.bug_id FILTER html %]: [%+ request.bug_summary FILTER html %] - [% END %] - [% request.created FILTER html %]
-
- -
- - - - (back to top) - -
- - - - - - - - - - - [% FOREACH request = requester_list %] - - - - - - - [% END %] -
RequesteeFlag[% terms.Bug %]Created
[% request.requestee FILTER html %][% request.type FILTER html %][% request.status FILTER html %] - [% IF request.attach_id %] - - [% request.attach_id FILTER html %]: [%+ request.attach_summary FILTER html %] - [% ELSE %] - - [% request.bug_id FILTER html %]: [%+ request.bug_summary FILTER html %] - [% END %] - [% request.created FILTER html %]
- -
- -
- - - - (back to top) - -
-
- - - - - - - - - [% FOREACH product = products %] - - - - - [% END %] - -
CountProduct
[% product.count FILTER html %] - [% product.product FILTER html %]
-
- -
- - [% FOREACH r = saved_results %] - [% PROCESS query_results r = r %] - [% END %] -
-
- -[% PROCESS global/footer.html.tmpl %] - -[% BLOCK query_results %] - - -
- [% r.heading FILTER html %] -
- [% IF r.description %] -
- [% r.description FILTER html %] -
- [% END %] - - [% r.bugs.size FILTER html %] [% terms.bugs %] found. - - - (show list) - - - (back to top) - -
-
- - - - - - - - - - - - - - [% FOREACH bug = r.bugs %] - - - - - - - - - - [% END %] - -
IDProductVersionComponentStatusSeveritySummary
[% bug.bug_id FILTER html %][% bug.product FILTER html %][% bug.version FILTER html %][% bug.component FILTER html %][% bug.bug_status FILTER html %][% bug.bug_severity FILTER html %][% bug.short_desc FILTER html %]
-
-
-[% END %] diff --git a/extensions/MyDashboard/web/styles/mydashboard.css b/extensions/MyDashboard/web/styles/mydashboard.css index 7000afa65..8128be2e7 100644 --- a/extensions/MyDashboard/web/styles/mydashboard.css +++ b/extensions/MyDashboard/web/styles/mydashboard.css @@ -8,56 +8,24 @@ #mydashboard .yui-skin-sam .yui-dt table { width:100%; } -#mydashboard #query-links { - display: table; - padding-left: 1ex; - padding-right:1ex; -} -#mydashboard #links-standard, -#mydashboard #links-saved, -#mydashboard #links-special { - display: table-row; - list-style-type: none; -} -#mydashboard .label { - display: table-cell; - white-space: nowrap; - vertical-align: top; - padding-right: 1ex; - font-weight: bold; -} -#mydashboard .links { - display: table-cell; - vertical-align: top; -} -#mydashboard .separator { - color: #000000; -} + #mydashboard .query_heading { font-size: 18px; font-weight: strong; + padding-bottom: 5px; color: rgb(72, 72, 72); } + #mydashboard .query_description { font-size: 90%; font-style: italic; padding-bottom: 5px; color: rgb(109, 117, 129); } -#mydashboard .bug_list, -#mydashboard .back_top { - font-size: 80%; -} -#mydashboard table { - margin-bottom: 10px; -} -#mydashboard hr { - color: #000; - background-color: #000; - border: 0; - height: 1px; - width: 100%; +#mydashboard .bugs_found, +#mydashboard .flags_found { + font-size: 80%; } #mydashboard_container { -- cgit v1.2.3-24-g4f1b