]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1069760 - Cannot use 'component' in a template
authorSimon Green <sgreen@redhat.com>
Wed, 1 Oct 2014 10:55:57 +0000 (20:55 +1000)
committerSimon Green <sgreen@redhat.com>
Wed, 1 Oct 2014 10:55:57 +0000 (20:55 +1000)
r=gerv, a=justdave

template/en/default/admin/products/edit.html.tmpl
template/en/default/admin/users/responsibilities.html.tmpl
template/en/default/config.rdf.tmpl

index 21689d9a7ff3d4acbd6ef2d46ef94d876b163e14..8e1f5d87bb4683d52b650a9ba44ab8c40b76e408 100644 (file)
       </th>
       <td>
         [% IF product.components.size -%]
-          [% FOREACH component = product.components %]
+          [% FOREACH comp = product.components %]
             <a href="editcomponents.cgi?action=edit&product=
             [%- product.name FILTER uri %]&component=
-            [%- component.name FILTER uri %]">[% component.name FILTER html %]</a>:
-            [% component.description FILTER html_light %]
+            [%- comp.name FILTER uri %]">[% comp.name FILTER html %]</a>:
+            [% comp.description FILTER html_light %]
             <br>
           [% END %]
         [% ELSE %]
index c2f6584b9bef7fbebd305f51fe5252ce23fa34dd..23eb9587b5427a6fdd7101ea43fbdf17f5fb967a 100644 (file)
       <th>Default QA Contact</th>
       <th>Default CC</th>
     </tr>
-    [% FOREACH component = item.components %]
+    [% FOREACH comp = item.components %]
       <tr>
         <td>
-          [% IF user.in_group("editcomponents", component.product_id) %]
+          [% IF user.in_group("editcomponents", comp.product_id) %]
             <a href="editcomponents.cgi?action=edit&amp;product=
                      [% item.product.name FILTER uri %]&amp;component=
-                     [% component.name FILTER uri %]">
+                     [% comp.name FILTER uri %]">
           [% END %]
-          [% component.name FILTER html %]
-          [% IF user.in_group("editcomponents", component.product_id) %]
+          [% comp.name FILTER html %]
+          [% IF user.in_group("editcomponents", comp.product_id) %]
             </a>
           [% END %]
         </td>
         [% FOREACH responsibility = ['default_assignee', 'default_qa_contact'] %]
           <td class="center">
-            [% component.$responsibility.id == otheruser.id ? "X" : "&nbsp;" %]
+            [% comp.$responsibility.id == otheruser.id ? "X" : "&nbsp;" %]
           </td>
         [% END %]
         <td class="center">
-          [% component.initial_cc.contains(otheruser) ? "X" : "&nbsp;" %]
+          [% comp.initial_cc.contains(otheruser) ? "X" : "&nbsp;" %]
         </td>
       </tr>
     [% END %]
index b14d0d0567182c88eac0ba63d56a57c58601b9eb..0d183cf56745d8f8ae26849f34dbee4e5bbdf91d 100644 (file)
             [% END %]
             <bz:components>
               <Seq>
-                [% FOREACH component = product.components %]
-                  <li resource="[% escaped_urlbase %]component.cgi?name=[% component.name FILTER uri
+                [% FOREACH comp = product.components %]
+                  <li resource="[% escaped_urlbase %]component.cgi?name=[% comp.name FILTER uri
                       %]&amp;product=[% product.name FILTER uri %]"/>
                 [% END %]
               </Seq>
   <bz:components>
     <Seq>
       [% FOREACH product = products %]
-        [% FOREACH component = product.components %]
+        [% FOREACH comp = product.components %]
           <li>
-            <bz:component rdf:about="[% escaped_urlbase %]component.cgi?name=[% component.name FILTER uri
+            <bz:component rdf:about="[% escaped_urlbase %]component.cgi?name=[% comp.name FILTER uri
                           %]&amp;product=[% product.name FILTER uri %]">
-              <bz:name>[% component.name FILTER html %]</bz:name>
-              <bz:is_active>[% component.is_active FILTER html %]</bz:is_active>
+              <bz:name>[% comp.name FILTER html %]</bz:name>
+              <bz:is_active>[% comp.is_active FILTER html %]</bz:is_active>
               [% IF show_flags %]
                 <bz:flag_types>
                   <Seq>
-                    [% flag_types = component.flag_types.bug.merge(component.flag_types.attachment) %]
+                    [% flag_types = comp.flag_types.bug.merge(comp.flag_types.attachment) %]
                     [% FOREACH flag_type = flag_types %]
                       [% NEXT UNLESS flag_type.is_active %]
                       [% all_visible_flag_types.${flag_type.id} = flag_type %]