Tweak product view page styles
Use the new grid styles, plus tweak a field renderer
This commit is contained in:
parent
c24120393f
commit
4ae70de339
|
@ -6,6 +6,7 @@
|
||||||
${parent.head_tags()}
|
${parent.head_tags()}
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#product-main {
|
#product-main {
|
||||||
|
margin-top: 1em;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
#product-image {
|
#product-image {
|
||||||
|
@ -77,15 +78,15 @@
|
||||||
<%def name="lookup_codes_panel()">
|
<%def name="lookup_codes_panel()">
|
||||||
<div class="panel-grid" id="product-codes">
|
<div class="panel-grid" id="product-codes">
|
||||||
<h2>Additional Lookup Codes</h2>
|
<h2>Additional Lookup Codes</h2>
|
||||||
<div class="grid full hoverable no-border">
|
<div class="newgrid full no-border">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<th>Seq</th>
|
<th>Seq</th>
|
||||||
<th>Code</th>
|
<th>Code</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
% for i, code in enumerate(instance._codes, 1):
|
% for code in instance._codes:
|
||||||
<tr class="${'odd' if i % 2 else 'even'}">
|
<tr>
|
||||||
<td>${code.ordinal}</td>
|
<td>${code.ordinal}</td>
|
||||||
<td>${code.code}</td>
|
<td>${code.code}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -162,7 +163,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<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>${cost.vendor}</td>
|
||||||
<td class="center">${cost.code}</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>
|
||||||
<td class="right">${'$ %0.4f' % cost.unit_cost if cost.unit_cost is not None else ''}</td>
|
<td class="right">${'$ %0.4f' % cost.unit_cost if cost.unit_cost is not None else ''}</td>
|
||||||
|
|
|
@ -272,6 +272,7 @@ class ProductsView(MasterView):
|
||||||
fs.department.set(renderer=forms.renderers.DepartmentFieldRenderer)
|
fs.department.set(renderer=forms.renderers.DepartmentFieldRenderer)
|
||||||
fs.subdepartment.set(renderer=forms.renderers.SubdepartmentFieldRenderer)
|
fs.subdepartment.set(renderer=forms.renderers.SubdepartmentFieldRenderer)
|
||||||
fs.category.set(renderer=forms.renderers.CategoryFieldRenderer)
|
fs.category.set(renderer=forms.renderers.CategoryFieldRenderer)
|
||||||
|
fs.unit_size.set(renderer=forms.renderers.QuantityFieldRenderer)
|
||||||
fs.unit_of_measure.set(label="Unit of Measure",
|
fs.unit_of_measure.set(label="Unit of Measure",
|
||||||
renderer=forms.renderers.EnumFieldRenderer(self.enum.UNIT_OF_MEASURE))
|
renderer=forms.renderers.EnumFieldRenderer(self.enum.UNIT_OF_MEASURE))
|
||||||
fs.regular_price.set(renderer=forms.renderers.PriceFieldRenderer, readonly=True)
|
fs.regular_price.set(renderer=forms.renderers.PriceFieldRenderer, readonly=True)
|
||||||
|
|
Loading…
Reference in a new issue