]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1531481 - Add bug type labels to My Dashboard
authorKohei Yoshino <kohei.yoshino@gmail.com>
Mon, 8 Apr 2019 22:27:56 +0000 (18:27 -0400)
committerDylan William Hardison <dylan@hardison.net>
Mon, 8 Apr 2019 22:27:56 +0000 (18:27 -0400)
extensions/MyDashboard/lib/Queries.pm
extensions/MyDashboard/web/js/query.js
extensions/MyDashboard/web/styles/mydashboard.css

index 59cb4f14e770519ad2bee19fcb479a7216ecb32c..83cc84b8315b71fa2b2922ee88a75e604970af3f 100644 (file)
@@ -39,6 +39,7 @@ use constant QUERY_ORDER => ("changeddate desc", "bug_id");
 # Share with buglist.cgi?
 use constant SELECT_COLUMNS => qw(
   bug_id
+  bug_type
   bug_status
   short_desc
   changeddate
index 1f1836b7bca8713432bf99c2c593b9e54c1e2a5e..6a4338389f23b2125cda4fa56a0a00ac8fd64f90 100644 (file)
@@ -53,7 +53,7 @@ $(function() {
         bugQuery.plug(Y.Plugin.DataSourceJSONSchema, {
             schema: {
                 resultListLocator: "result.result.bugs",
-                resultFields: ["bug_id", "changeddate", "changeddate_fancy",
+                resultFields: ["bug_id", "bug_type", "changeddate", "changeddate_fancy",
                             "bug_status", "short_desc", "changeddate_api" ],
                 metaFields: {
                     description: "result.result.description",
@@ -170,6 +170,9 @@ $(function() {
         bugQueryTable = new Y.DataTable({
             columns: [
                 { key: Y.Plugin.DataTableRowExpansion.column_key, label: ' ', sortable: false },
+                { key: "bug_type", label: "T", allowHTML: true, sortable: true,
+                formatter: '<span class="bug-type-label iconic" title="{value}" aria-label="{value}" ' +
+                           'data-type="{value}"><span class="icon" aria-hidden="true"></span></span>' },
                 { key: "bug_id", label: "Bug", allowHTML: true, sortable: true,
                 formatter: `<a href="${BUGZILLA.config.basepath}show_bug.cgi?id={value}" target="_blank">{value}</a>` },
                 { key: "changeddate", label: "Updated", formatter: updatedFormatter,
index f5ccfec19c4271de11a3016a5619a3bc1d28f50e..d7bb3471244340105b03f1550d1e639b4c7d01cf 100644 (file)
     width: 100%;
 }
 
+.yui3-datatable-col-bug_type {
+    text-align: center;
+}
+
 .yui3-datatable-col-changeddate,
 .yui3-datatable-col-created {
     white-space: nowrap;