// Products multistore bootstrap fix

This commit is contained in:
Jerome Nadaud
2013-09-24 16:19:00 +02:00
parent d26336aa77
commit 003ba20238
6 changed files with 102 additions and 95 deletions
@@ -146,8 +146,8 @@
<hr/>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_wholesale_price" type="default"}
<label class="control-label col-lg-3" for="attribute_wholesale_price">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_wholesale_price" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Leave blank if the price does not change'}">
{l s='Wholesale price:'}
@@ -166,8 +166,8 @@
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_price_impact" type="attribute_price_impact"}
<label class="control-label col-lg-3" for="attribute_price_impact">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_price_impact" type="attribute_price_impact"}
{l s='Impact on price:'}
</label>
<div class="col-lg-9">
@@ -225,8 +225,8 @@
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_weight_impact" type="attribute_weight_impact"}
<label class="control-label col-lg-3" for="attribute_weight_impact">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_weight_impact" type="attribute_weight_impact"}
{l s='Impact on weight:'}
</label>
<div class="col-lg-9">
@@ -256,8 +256,10 @@
</div>
<div id="tr_unit_impact" class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_unit_impact" type="attribute_unit_impact"}
<label class="control-label col-lg-3" for="attribute_unit_impact">{l s='Impact on unit price :'}</label>
<label class="control-label col-lg-3" for="attribute_unit_impact">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_unit_impact" type="attribute_unit_impact"}
{l s='Impact on unit price :'}
</label>
<div class="col-lg-3">
<select name="attribute_unit_impact" id="attribute_unit_impact" onchange="check_unit_impact();">
<option value="0">{l s='None'}</option>
@@ -284,8 +286,8 @@
{if $ps_use_ecotax}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_ecotax" type="default"}
<label class="control-label col-lg-3" for="attribute_ecotax">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_ecotax" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='overrides Eco-tax in the "Information" tab'}">
{l s='Eco-tax (tax excl.):'}
@@ -302,8 +304,8 @@
{/if}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_minimal_quantity" type="default"}
<label class="control-label col-lg-3" for="attribute_minimal_quantity">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_minimal_quantity" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}">
{l s='Minimum quantity:'}
@@ -316,8 +318,8 @@
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="available_date_attribute" type="default"}
<label class="control-label col-lg-3" for="available_date_attribute">
{include file="controllers/products/multishop/checkbox.tpl" field="available_date_attribute" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='The available date when this product is out of stock.'}">
{l s='Available date:'}
@@ -359,8 +361,10 @@
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_default" type="attribute_default"}
<label class="control-label col-lg-3" for="attribute_default">{l s='Default:'}</label>
<label class="control-label col-lg-3" for="attribute_default">
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_default" type="attribute_default"}
{l s='Default:'}
</label>
<div class="col-lg-9">
<p class="checkbox">
<label for="attribute_default">
@@ -30,9 +30,9 @@
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"}
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
<div class="row">
<label class="control-label col-lg-3" for="uploadable_files">
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of upload file fields displayed'}">
{l s='File fields:'}
@@ -43,8 +43,8 @@
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
<label class="control-label col-lg-3" for="text_fields">
{include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of text fields displayed'}">
{l s='Text fields:'}
@@ -188,10 +188,10 @@
</div>
{/if}
{if $ps_stock_management}
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
{if $ps_stock_management}
<div class="row">
<label class="control-label col-lg-5" for="available_now_{$id_lang}">
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when in-stock:'}
@@ -207,8 +207,8 @@
</div>
</div>
<div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
<label class="control-label col-lg-5" for="available_later_{$id_lang}">
{include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"}
<span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when back-ordereding is allowed:'}
@@ -31,38 +31,34 @@
{/if}
<div class="row">
<label class="control-label col-lg-5" for="width">{l s='Width (package):'}</label>
<label class="control-label col-lg-5" for="width">{$bullet_common_field} {l s='Width (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="width" name="width" type="text" value="{$product->width}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
<input maxlength="6" id="width" name="width" type="text" value="{$product->width}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="height">{l s='Height (package):'}</label>
<label class="control-label col-lg-5" for="height">{$bullet_common_field} {l s='Height (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="height" name="height" type="text" value="{$product->height}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="depth">{l s='Depth (package):'}</label>
<label class="control-label col-lg-5" for="depth">{$bullet_common_field} {l s='Depth (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span>
<input maxlength="6" id="depth" name="depth" type="text" value="{$product->depth}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
</div>
</div>
<div class="row">
<label class="control-label col-lg-5" for="weight">{l s='Weight (package):'}</label>
<label class="control-label col-lg-5" for="weight">{$bullet_common_field} {l s='Weight (package):'}</label>
<div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_weight_unit}</span>
<input maxlength="6" id="weight" name="weight" type="text" value="{$product->weight}" onKeyUp="if (isArrowKey(event)) return ;this.value = this.value.replace(/,/g, '.');" />
{$bullet_common_field}
</div>
</div>
@@ -74,21 +74,23 @@
{l s='Click "Save and Stay" after changing selected suppliers to display the associated product references.'}
</div>
<div id="accordion-supplier">
{foreach from=$associated_suppliers item=supplier}
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#supplier-{$supplier->id}">{$supplier->name}</a>
<div class="panel-group" id="accordion-supplier">
{foreach from=$associated_suppliers item=supplier name=data}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-supplier" href="#supplier-{$supplier->id}">{$supplier->name}</a>
</h4>
</div>
<div id="supplier-{$supplier->id}" class="accordion-body collapse in">
<div class="accordion-inner">
<div id="supplier-{$supplier->id}" class="panel-collapse collapse{if $smarty.foreach.data.first} in{/if}">
<div class="panel-body">
<table class="table">
<thead>
<tr>
<th>{l s='Product name'}</th>
<th>{l s='Supplier reference'}</th>
<th>{l s='Unit price tax excluded'}</th>
<th>{l s='Unit price currency'}</th>
<th><span class="title_box">{l s='Product name'}</span></th>
<th><span class="title_box">{l s='Supplier reference'}</span></th>
<th><span class="title_box">{l s='Unit price tax excluded'}</span></th>
<th><span class="title_box">{l s='Unit price currency'}</span></th>
</tr>
</thead>
@@ -28,68 +28,73 @@
<fieldset>
<input type="hidden" name="submitted_tabs[]" value="Warehouses" />
<h3>{l s='Product location in warehouses'}</h3>
<div class="separation"></div>
<div class="alert alert-info" style="display:block; position:'auto';">
<p>{l s='This interface allows you to specify the warehouse in which the product is stocked.'}</p>
<p>{l s='You can also specify product/product combinations as it relates to warehouse location. '}</p>
<div class="row">
<div class="alert alert-info" style="display:block; position:'auto';">
<p>{l s='This interface allows you to specify the warehouse in which the product is stocked.'}</p>
<p>{l s='You can also specify product/product combinations as it relates to warehouse location. '}</p>
</div>
<p>{l s='Please choose the warehouses associated with this product. You must also select a default warehouse. '}</p>
</div>
<div class="row">
<a class="btn btn-default confirm_leave" href="{$link->getAdminLink('AdminWarehouses')|escape:'htmlall':'UTF-8'}&addwarehouse">
<i class="icon-plus-sign"></i> {l s='Create a new warehouse'}
</a>
</div>
<p>{l s='Please choose the warehouses associated with this product. You must also select a default warehouse. '}</p>
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminWarehouses')|escape:'htmlall':'UTF-8'}&addwarehouse">
<img src="../img/admin/add.gif" alt="{l s='Create a new warehouse'}" title="{l s='Create a new warehouse'}" /><span>{l s='Create a new warehouse'}</span>
</a>
<div id="warehouse_accordion">
{foreach from=$warehouses item=warehouse}
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#warehouse-{$warehouse['name']}">{$warehouse['name']}</a>
</div>
<div id="warehouse-{$warehouse['name']}" class="accordion-body collapse in">
<div class="accordion-inner">
<table cellpadding="10" cellspacing="0" class="table">
<tr>
<th width="100">{l s='Stored'}</th>
<th>{l s='Product'}</th>
<th width="150">{l s='Location (optional)'}</th>
</tr>
{foreach $attributes AS $index => $attribute}
{assign var=location value=''}
{assign var=selected value=''}
{foreach from=$associated_warehouses item=aw}
{if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']}
{assign var=location value=$aw->location}
{assign var=selected value=true}
{/if}
{/foreach}
<tr {if $index is odd}class="alt_row"{/if}>
<td><input type="checkbox"
name="check_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
{if $selected == true}checked="checked"{/if}
value="1" />
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
<td><input type="text"
name="location_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
value="{$location|escape:'htmlall':'UTF-8'}"
size="20" />
</td>
<div class="row">
<div class="panel-group" id="warehouse-accordion">
{foreach from=$warehouses item=warehouse name=data}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#warehouse-accordion" href="#warehouse-{$warehouse['name']}">{$warehouse['name']}</a>
</h4>
</div>
<div id="warehouse-{$warehouse['name']}" class="panel-collapse collapse{if $smarty.foreach.data.first} in{/if}">
<div class="panel-body">
<table cellpadding="10" cellspacing="0" class="table">
<tr>
<th width="100">{l s='Stored'}</th>
<th>{l s='Product'}</th>
<th width="150">{l s='Location (optional)'}</th>
</tr>
{/foreach}
<tr>
<td colspan="3">&nbsp;</td>
</tr>
{if $attributes|@count gt 1}
<tr>
<td><input type="checkbox" class="check_all_warehouse" value="check_warehouse_{$warehouse['id_warehouse']}" /></td>
<td colspan="2"><i>{l s='Mark all products as stored in this warehouse.'}</i></td>
</tr>
{/if}
</table>
{foreach $attributes AS $index => $attribute}
{assign var=location value=''}
{assign var=selected value=''}
{foreach from=$associated_warehouses item=aw}
{if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']}
{assign var=location value=$aw->location}
{assign var=selected value=true}
{/if}
{/foreach}
<tr {if $index is odd}class="alt_row"{/if}>
<td><input type="checkbox"
name="check_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
{if $selected == true}checked="checked"{/if}
value="1" />
</td>
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
<td><input type="text"
name="location_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
value="{$location|escape:'htmlall':'UTF-8'}"
size="20" />
</td>
</tr>
{/foreach}
<tr>
<td colspan="3">&nbsp;</td>
</tr>
{if $attributes|@count gt 1}
<tr>
<td><input type="checkbox" class="check_all_warehouse" value="check_warehouse_{$warehouse['id_warehouse']}" /></td>
<td colspan="2"><i>{l s='Mark all products as stored in this warehouse.'}</i></td>
</tr>
{/if}
</table>
</div>
</div>
</div>
</div>
{/foreach}
{/foreach}
</div>
</div>
<fieldset>
</fieldset>
{/if}