]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 325567: display more information when listing flag types in editflagtyp...
authorjocuri%softhome.net <>
Thu, 2 Mar 2006 06:24:13 +0000 (06:24 +0000)
committerjocuri%softhome.net <>
Thu, 2 Mar 2006 06:24:13 +0000 (06:24 +0000)
editflagtypes.cgi
template/en/default/admin/flag-type/list.html.tmpl

index dfef556474b4c1ec3842c36cd4eb8b8f97018506..1851e8b135f23033f754b73036d0db18e1451286 100755 (executable)
@@ -102,6 +102,20 @@ sub list {
       Bugzilla::FlagType::match({ 'target_type' => 'attachment', 
                                   'group' => scalar $cgi->param('group') }, 1);
 
+    # Users want to see group names, not IDs
+    # So get the group names
+    my %group_name_cache = ();
+    foreach my $flag_type_set ("bug_types", "attachment_types") {
+        foreach my $flag_type (@{$vars->{$flag_type_set}}) {
+            foreach my $group ("grant", "request") {
+                my $gid = $flag_type->{$group . "_gid"};
+                next if (!$gid);
+                $group_name_cache{$gid} ||= new Bugzilla::Group($gid)->name();
+                $flag_type->{$group . "_group_name"} = $group_name_cache{$gid};
+            }
+        }
+    }
+
     # Return the appropriate HTTP response headers.
     print $cgi->header();
 
index bd1d7cb727c93a9f2816188b3a50a374f57111d1..a9dc40519f34594261cb2cc684333b354bd1061b 100644 (file)
@@ -26,6 +26,7 @@
   style = "
     table#flag_types tr th { text-align: left; }
     .inactive { color: #787878; }
+    .multiplicable { display: block; }
   "
 %]
 
@@ -88,6 +89,9 @@
       <th>Edit name ...</th>
       <th>Description</th>
       <th>Sortkey</th>
+      <th>Properties</th>
+      <th>Grant group</th>
+      <th>Request group</th>
       <th>Actions</th>
     </tr>
 
         <td><a href="editflagtypes.cgi?action=edit&amp;id=[% type.id %]">[% type.name FILTER html FILTER no_break %]</a></td>
         <td>[% type.description FILTER html %]</td>
         <td align="right">[% type.sortkey FILTER html %]</td>
+        <td>
+          [% IF type.is_requestable %]
+            <span class="requestable">requestable</span>
+          [% END %]
+          [% IF type.is_requestable && type.is_requesteeble %]
+            <span class="requesteeble">(specifically)</span>
+          [% END %]
+          [% IF type.is_multiplicable %]
+            <span class="multiplicable">multiplicable</span>
+          [% END %]
+        </td>
+        <td>[% type.grant_group_name FILTER html %]</td>
+        <td>[% type.request_group_name FILTER html %]</td>
         <td>
           <a href="editflagtypes.cgi?action=copy&amp;id=[% type.id %]">Copy</a>
           | <a href="editflagtypes.cgi?action=confirmdelete&amp;id=[% type.id %]"