Add vendor links in cost grid when viewing product

This commit is contained in:
Lance Edgar 2018-01-26 18:30:29 -06:00
parent e5c5a071f2
commit 580f817dd9

View file

@ -191,7 +191,13 @@
% for i, cost in enumerate(instance.costs, 1): % for i, cost in enumerate(instance.costs, 1):
<tr class="${'even' if i % 2 == 0 else 'odd'}"> <tr class="${'even' if i % 2 == 0 else 'odd'}">
<td class="center">${'X' if cost.preference == 1 else ''}</td> <td class="center">${'X' if cost.preference == 1 else ''}</td>
<td>${cost.vendor}</td> <td>
% if request.has_perm('vendors.view'):
${h.link_to(cost.vendor, request.route_url('vendors.view', uuid=cost.vendor_uuid))}
% else:
${cost.vendor}
% endif
</td>
<td class="center">${cost.code or ''}</td> <td class="center">${cost.code or ''}</td>
<td class="center">${h.pretty_quantity(cost.case_size)}</td> <td class="center">${h.pretty_quantity(cost.case_size)}</td>
<td class="right">${'$ %0.2f' % cost.case_cost if cost.case_cost is not None else ''}</td> <td class="right">${'$ %0.2f' % cost.case_cost if cost.case_cost is not None else ''}</td>