]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1527459 - Display dependency bugs by type, using the same colour/icon for each
authorKohei Yoshino <kohei.yoshino@gmail.com>
Mon, 8 Apr 2019 21:06:58 +0000 (17:06 -0400)
committerGitHub <noreply@github.com>
Mon, 8 Apr 2019 21:06:58 +0000 (17:06 -0400)
extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
extensions/BugModal/web/bug_modal.css

index d518c31f19a851700fa95b09761637278ceb31d6..e94c43b6f776e2e784fef63e0aefbf9f1f53ac44 100644 (file)
 
     [% IF bug.dependson.size + bug.blocked.size > 1 %]
       [% WRAPPER bug_modal/field.html.tmpl
+          name = "dependencytree"
           container = 1
           label = ""
           hide_on_edit = 1
index cadfe7c632482595397506b7d7105bd7bc330cd2..2fc6476e0896f70b046cc6a8ae874e6a00715329 100644 (file)
@@ -385,9 +385,22 @@ END;
 [%# bug lists, depencancies, blockers %]
 [% BLOCK bug_list %]
   [% IF NOT edit %]
-    [% FOREACH b IN values %]
-      [% INCLUDE bug/link.html.tmpl bug=b link_text=b.id use_alias=1  %]
-      [% ", " UNLESS loop.last %]
+    [% FOREACH type IN bug_fields.bug_type.legal_values.pluck('name') %]
+      [%
+        bugs = [];
+        FOREACH b IN values; bugs.push(b) IF b.bug_type == type; END;
+        NEXT UNLESS bugs.size > 0;
+      %]
+      <div class="bug-list">
+        <span class="bug-type-label iconic" title="[% type FILTER html %]"
+              aria-label="[% type FILTER html %]" data-type="[% type FILTER html %]">
+          <span class="icon" aria-hidden="true"></span>
+        </span>
+        [% FOREACH b IN bugs %]
+          [% INCLUDE bug/link.html.tmpl bug=b link_text=b.id use_alias=1  %]
+          [% ", " UNLESS loop.last %]
+        [% END %]
+      </div>
     [% END %]
   [% ELSE %]
     <input type="text" id="[% name FILTER html %]" name="[% name FILTER html %]"
index 2666a340031776df2e51fbc573a1226c249cad35..80d4f05a757f3662d1b215524ccc30a51d065a8d 100644 (file)
@@ -369,6 +369,26 @@ input[type="number"] {
     text-decoration: underline;
 }
 
+.field .value .bug-list {
+  margin: -2px 0 6px;
+  padding-left: 20px;
+  line-height: 1.5;
+}
+
+.field .value .bug-list .bug-type-label {
+  float: left;
+  margin-left: -20px;
+}
+
+.field .value .bug-list .bug-type-label .icon {
+  font-size: 16px;
+}
+
+#field-value-dependencytree {
+  display: block;
+  margin: -2px 0 8px;
+}
+
 /* actions */
 
 #top-actions {