Fix some bugs in product view template
This commit is contained in:
parent
8afaf80128
commit
feef8a5ecc
|
@ -2,8 +2,6 @@
|
|||
<%inherit file="/master/view.mako" />
|
||||
<%namespace file="/forms/lib.mako" import="render_field_readonly" />
|
||||
|
||||
<% product = instance %>
|
||||
|
||||
<%def name="head_tags()">
|
||||
${parent.head_tags()}
|
||||
<style type="text/css">
|
||||
|
@ -23,8 +21,8 @@
|
|||
|
||||
<%def name="context_menu_items()">
|
||||
${parent.context_menu_items()}
|
||||
% if version_count is not Undefined and request.has_perm('product.versions.view'):
|
||||
<li>${h.link_to("View Change History ({})".format(version_count), url('product.versions', uuid=product.uuid))}</li>
|
||||
% if version_count is not Undefined and request.has_perm('instance.versions.view'):
|
||||
<li>${h.link_to("View Change History ({})".format(version_count), url('product.versions', uuid=instance.uuid))}</li>
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
|
@ -86,7 +84,7 @@
|
|||
<th>Code</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
% for i, code in enumerate(product._codes, 1):
|
||||
% for i, code in enumerate(instance._codes, 1):
|
||||
<tr class="${'odd' if i % 2 else 'even'}">
|
||||
<td>${code.ordinal}</td>
|
||||
<td>${code.code}</td>
|
||||
|
@ -160,7 +158,7 @@
|
|||
<th>Unit Cost</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
% for i, cost in enumerate(product.costs, 1):
|
||||
% for i, cost in enumerate(instance.costs, 1):
|
||||
<tr class="${'odd' if i % 2 else 'even'}">
|
||||
<td class="center">${'X' if cost.preference == 1 else ''}</td>
|
||||
<td>${cost.vendor}</td>
|
||||
|
|
Loading…
Reference in a new issue