Commit a9efeb74 authored by Simon Green's avatar Simon Green

Bug 1069760 - Cannot use 'component' in a template

r=gerv, a=justdave
parent 0ff4174b
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
</th> </th>
<td> <td>
[% IF product.components.size -%] [% IF product.components.size -%]
[% FOREACH component = product.components %] [% FOREACH comp = product.components %]
<a href="editcomponents.cgi?action=edit&product= <a href="editcomponents.cgi?action=edit&product=
[%- product.name FILTER uri %]&component= [%- product.name FILTER uri %]&component=
[%- component.name FILTER uri %]">[% component.name FILTER html %]</a>: [%- comp.name FILTER uri %]">[% comp.name FILTER html %]</a>:
[% component.description FILTER html_light %] [% comp.description FILTER html_light %]
<br> <br>
[% END %] [% END %]
[% ELSE %] [% ELSE %]
......
...@@ -23,26 +23,26 @@ ...@@ -23,26 +23,26 @@
<th>Default QA Contact</th> <th>Default QA Contact</th>
<th>Default CC</th> <th>Default CC</th>
</tr> </tr>
[% FOREACH component = item.components %] [% FOREACH comp = item.components %]
<tr> <tr>
<td> <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= <a href="editcomponents.cgi?action=edit&amp;product=
[% item.product.name FILTER uri %]&amp;component= [% item.product.name FILTER uri %]&amp;component=
[% component.name FILTER uri %]"> [% comp.name FILTER uri %]">
[% END %] [% END %]
[% component.name FILTER html %] [% comp.name FILTER html %]
[% IF user.in_group("editcomponents", component.product_id) %] [% IF user.in_group("editcomponents", comp.product_id) %]
</a> </a>
[% END %] [% END %]
</td> </td>
[% FOREACH responsibility = ['default_assignee', 'default_qa_contact'] %] [% FOREACH responsibility = ['default_assignee', 'default_qa_contact'] %]
<td class="center"> <td class="center">
[% component.$responsibility.id == otheruser.id ? "X" : "&nbsp;" %] [% comp.$responsibility.id == otheruser.id ? "X" : "&nbsp;" %]
</td> </td>
[% END %] [% END %]
<td class="center"> <td class="center">
[% component.initial_cc.contains(otheruser) ? "X" : "&nbsp;" %] [% comp.initial_cc.contains(otheruser) ? "X" : "&nbsp;" %]
</td> </td>
</tr> </tr>
[% END %] [% END %]
......
...@@ -139,8 +139,8 @@ ...@@ -139,8 +139,8 @@
[% END %] [% END %]
<bz:components> <bz:components>
<Seq> <Seq>
[% FOREACH component = product.components %] [% FOREACH comp = product.components %]
<li resource="[% escaped_urlbase %]component.cgi?name=[% component.name FILTER uri <li resource="[% escaped_urlbase %]component.cgi?name=[% comp.name FILTER uri
%]&amp;product=[% product.name FILTER uri %]"/> %]&amp;product=[% product.name FILTER uri %]"/>
[% END %] [% END %]
</Seq> </Seq>
...@@ -176,16 +176,16 @@ ...@@ -176,16 +176,16 @@
<bz:components> <bz:components>
<Seq> <Seq>
[% FOREACH product = products %] [% FOREACH product = products %]
[% FOREACH component = product.components %] [% FOREACH comp = product.components %]
<li> <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 %]"> %]&amp;product=[% product.name FILTER uri %]">
<bz:name>[% component.name FILTER html %]</bz:name> <bz:name>[% comp.name FILTER html %]</bz:name>
<bz:is_active>[% component.is_active FILTER html %]</bz:is_active> <bz:is_active>[% comp.is_active FILTER html %]</bz:is_active>
[% IF show_flags %] [% IF show_flags %]
<bz:flag_types> <bz:flag_types>
<Seq> <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 %] [% FOREACH flag_type = flag_types %]
[% NEXT UNLESS flag_type.is_active %] [% NEXT UNLESS flag_type.is_active %]
[% all_visible_flag_types.${flag_type.id} = flag_type %] [% all_visible_flag_types.${flag_type.id} = flag_type %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment