From 580f817dd9cf45cca5a7ed16a70310316ad3bb86 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 26 Jan 2018 18:30:29 -0600 Subject: [PATCH] Add vendor links in cost grid when viewing product --- tailbone/templates/products/view.mako | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tailbone/templates/products/view.mako b/tailbone/templates/products/view.mako index 10db733e..a6e157d1 100644 --- a/tailbone/templates/products/view.mako +++ b/tailbone/templates/products/view.mako @@ -191,7 +191,13 @@ % for i, cost in enumerate(instance.costs, 1): ${'X' if cost.preference == 1 else ''} - ${cost.vendor} + + % if request.has_perm('vendors.view'): + ${h.link_to(cost.vendor, request.route_url('vendors.view', uuid=cost.vendor_uuid))} + % else: + ${cost.vendor} + % endif + ${cost.code or ''} ${h.pretty_quantity(cost.case_size)} ${'$ %0.2f' % cost.case_cost if cost.case_cost is not None else ''}