summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/MyDashboard/Extension.pm14
-rw-r--r--extensions/MyDashboard/template/en/default/pages/mydashboard_old.html.tmpl326
-rw-r--r--extensions/MyDashboard/web/styles/mydashboard.css44
3 files changed, 14 insertions, 370 deletions
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" ]
-%]
-
-<script type="text/javascript">
-<!--
- [%# Set up severities list for proper sorting %]
- var severities = new Array();
- [% sort_count = 0 %]
- [% FOREACH s = severities %]
- severities['[% s FILTER js %]'] = [% sort_count FILTER js %];
- [% sort_count = sort_count + 1 %]
- [% END %]
--->
-</script>
-
-[% standard_results = [] %]
-[% saved_results = [] %]
-[% FOREACH r = results %]
- [% standard_results.push(r) IF !r.saved %]
- [% saved_results.push(r) IF r.saved %]
-[% END %]
-
-<a name="top"></a>
-<div id="mydashboard">
- <div class="yui-skin-sam">
- <ul id="query-links">
- <li id="links-standard">
- <div class="label">Standard Queries:</div>
- <ul class="links">
- [% FOREACH r = standard_results %]
- <li>
- <a href="#[% r.name FILTER uri %]">[% r.heading FILTER html %]</a></li>
- <span class="separator">| </span>
- </li>
- [% END%]
- <li>
- <a href="#requestee">Open Issues with Flags Requested of You</a>
- <span class="separator"> | </span>
- </li>
- <li>
- <a href="#requester">Open Issues with Flags You Have Requested</a>
- <span class="separator"> | </span>
- </li>
- <li>
- <a href="#products">Active Products with Open Issues</a>
- </li>
- </ul>
- </li>
- <li id="links-saved">
- <div class="label">Saved Queries
- (<a title="Click to add/remove saved searches from my dashboard"
- href="[% urlbase FILTER none %]userprefs.cgi?tab=saved-searches">edit</a>):</div>
- <ul class="links">
- [% FOREACH r = saved_results %]
- <li>
- <a href="#[% r.name FILTER uri %]">[% r.heading FILTER html %]</a>
- [% '<span class="separator"> | </span>' IF !loop.last() %]
- </li>
- [% END %]
- [% IF NOT saved_results.size %]
- <li>Click edit to add or remove saved searches from my dashboard</li>
- [% END %]
- </ul>
- </li>
- </ul>
-
- <hr>
-
- <script type="text/javascript">
- <!--
- var query_column_defs = [
- { key:"id", label:"ID", sortable:true, sortOptions:{ sortFunction:sortBugIdLinks } },
- { key:"product", label:"Product", sortable:true },
- { key:"version", label:"Version", sortable:true },
- { key:"component", label:"Component", sortable:true },
- { key:"bug_status", label:"Status", sortable:true },
- { key:"bug_severity", label:"Severity", sortable:true, sortOptions:{ sortFunction:sortBugSeverity } },
- { key:"summary", label:"Summary", sortable:true },
- ];
- var query_fields = [
- { key:"id" },
- { key:"product" },
- { key:"version" },
- { key:"component" },
- { key:"bug_status" },
- { key:"bug_severity" },
- { key:"summary" }
- ];
- var requester_column_defs = [
- { key:"requestee", label:"Requestee", sortable:true },
- { key:"flag", label:"Flag", sortable:true },
- { key:"bug", label:"Bug", sortable:true },
- { key:"created", label:"Created", sortable:true }
- ];
- var requester_fields = [
- { key:"requestee" },
- { key:"flag" },
- { key:"bug" },
- { key:"created" }
- ];
- var requestee_column_defs = [
- { key:"requester", label:"Requester", sortable:true },
- { key:"flag", label:"Flag", sortable:true },
- { key:"bug", label:"Bug", sortable:true },
- { key:"created", label:"Created", sortable:true }
- ];
- var requestee_fields = [
- { key:"requester" },
- { key:"flag" },
- { key:"bug" },
- { key:"created" }
- ];
- var product_column_defs = [
- { key:"count", label:"Count", sortable:true },
- { key:"product", label:"Product", sortable:true }
- ];
- var product_fields = [
- { key:"count", parser:"number" },
- { key:"product" }
- ];
- addStatListener("requestee_container", "requestee_table", requestee_column_defs, requestee_fields, {
- paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false })
- });
- addStatListener("requester_container", "requester_table", requester_column_defs, requester_fields, {
- paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false })
- });
- addStatListener("activeproducts", "activeproducts_table", product_column_defs, product_fields, {
- paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false })
- });
- -->
- </script>
-
- [% FOREACH r = standard_results %]
- [% PROCESS query_results r = r %]
- [% END %]
-
- <div class="query_heading">
- <a name="requestee">Open Issues with Flags Requested of You</a>
- </div>
- <span class="back_top">
- (<a href="#top">back to top</a>)
- </span>
- <br>
- <div id="requestee_container">
- <table id="requestee_table" cellspacing="0" cellpadding="3" width="100%">
- <thead>
- <tr bgcolor="#dedede">
- <th>Requester</th>
- <th>Flag</th>
- <th>[% terms.Bug %]</th>
- <th>Created</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH request = requestee_list %]
- <tr class="bz_bugitem [%+ loop.count() % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
- <td>[% request.requester FILTER html %]</td>
- <td>[% request.type FILTER html %][% request.status FILTER html %]</td>
- <td>
- [% IF request.attach_id %]
- <a href="[% urlbase FILTER none %]attachment.cgi?action=edit&id=[% request.attach_id FILTER uri %]">
- [% request.attach_id FILTER html %]: [%+ request.attach_summary FILTER html %]</a>
-
- [% ELSE %]
- <a href="[% urlbase FILTER none %]show_bug.cgi?id=[% request.bug_id FILTER uri %]">
- [% request.bug_id FILTER html %]: [%+ request.bug_summary FILTER html %]</a>
- [% END %]
- </td>
- <td>[% request.created FILTER html %]</td>
- </tr>
- [% END %]
- </tbody>
- </table>
- </div>
-
- <hr>
-
- <div class="query_heading">
- <a name="requester">Open Issues with Flags You Have Requested</a>
- </div>
- <span class="back_top">
- (<a href="#top">back to top</a>)
- </span>
- <div id="requester_container">
- <table id="requester_table" cellspacing="0" cellpadding="3" width="100%">
- <thead bgcolor="#dedede">
- <tr>
- <th>Requestee</th>
- <th>Flag</th>
- <th>[% terms.Bug %]</th>
- <th>Created</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH request = requester_list %]
- <tr class="bz_bugitem [%+ loop.count() % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
- <td>[% request.requestee FILTER html %]</td>
- <td>[% request.type FILTER html %][% request.status FILTER html %]</td>
- <td>
- [% IF request.attach_id %]
- <a href="[% urlbase FILTER none %]attachment.cgi?action=edit&id=[% request.attach_id FILTER uri %]">
- [% request.attach_id FILTER html %]: [%+ request.attach_summary FILTER html %]</a>
- [% ELSE %]
- <a href="[% urlbase FILTER none %]show_bug.cgi?id=[% request.bug_id FILTER uri %]">
- [% request.bug_id FILTER html %]: [%+ request.bug_summary FILTER html %]</a>
- [% END %]
- </td>
- <td>[% request.created FILTER html %]</td>
- </tr>
- [% END %]
- </table>
- </tbody>
- </div>
-
- <hr>
-
- <div class="query_heading">
- <a name="products">Active Products with Open [% terms.Bugs %]</a>
- </div>
- <span class="back_top">
- (<a href="#top">back to top</a>)
- </span>
- <br>
- <div id="activeproducts">
- <table id="activeproducts_table" cellspacing="0" cellpadding="4" width="100%">
- <thead>
- <tr bgcolor="#dedede">
- <th>Count</th>
- <th>Product</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH product = products %]
- <tr class="bz_bugitem [%+ loop.count() % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
- <td align="right">[% product.count FILTER html %]</td>
- <td><a href="buglist.cgi?product=[% product.product FILTER uri %][% products_buffer FILTER none %]">
- [% product.product FILTER html %]</a></td>
- </tr>
- [% END %]
- </tbody>
- </table>
- </div>
-
- <hr>
-
- [% FOREACH r = saved_results %]
- [% PROCESS query_results r = r %]
- [% END %]
- </div>
-</div>
-
-[% PROCESS global/footer.html.tmpl %]
-
-[% BLOCK query_results %]
- <script>
- <!--
- addStatListener("[% r.name FILTER js %]_container", "[% r.name FILTER js %]_table", query_column_defs, query_fields, {
- paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false })
- });
- -->
- </script>
-
- <div class="query_heading">
- <a name="[% r.name FILTER uri %]">[% r.heading FILTER html %]</a>
- </div>
- [% IF r.description %]
- <div class="query_description">
- [% r.description FILTER html %]
- </div>
- [% END %]
- <span class="bugs_found">
- [% r.bugs.size FILTER html %]&nbsp;[% terms.bugs %] found.
- </span>
- <span class="bug_list">
- (<a href="[% urlbase FILTER none %]buglist.cgi?[% r.buffer FILTER none %]">show list</a>)
- </span>
- <span class="back_top">
- (<a href="#top">back to top</a>)
- </span>
- <br>
- <div id="[% r.name FILTER html %]_container">
- <table id="[% r.name FILTER html %]_table" cellspacing="0" cellpadding="3" width="100%">
- <thead>
- <tr>
- <th>ID</th>
- <th>Product</th>
- <th>Version</th>
- <th>Component</th>
- <th>Status</th>
- <th>Severity</th>
- <th>Summary</th>
- </tr>
- </thead>
- <tbody>
- [% FOREACH bug = r.bugs %]
- <tr class="bz_bugitem [%+ loop.count() % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
- <td align="center"><a href="show_bug.cgi?id=[% bug.bug_id FILTER uri %]">[% bug.bug_id FILTER html %]</a></td>
- <td><a href="buglist.cgi?product=[% bug.product FILTER uri %][% products_buffer FILTER none %]">[% bug.product FILTER html %]</a></td>
- <td>[% bug.version FILTER html %]</td>
- <td>[% bug.component FILTER html %]</td>
- <td align="center">[% bug.bug_status FILTER html %]</td>
- <td align="center">[% bug.bug_severity FILTER html %]</td>
- <td>[% bug.short_desc FILTER html %]</td>
- </tr>
- [% END %]
- </tbody>
- </table>
- </div>
- <hr>
-[% 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 {