// 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/> <hr/>
<div class="row"> <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"> <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" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Leave blank if the price does not change'}"> title="{l s='Leave blank if the price does not change'}">
{l s='Wholesale price:'} {l s='Wholesale price:'}
@@ -166,8 +166,8 @@
<div class="row"> <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"> <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:'} {l s='Impact on price:'}
</label> </label>
<div class="col-lg-9"> <div class="col-lg-9">
@@ -225,8 +225,8 @@
<div class="row"> <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"> <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:'} {l s='Impact on weight:'}
</label> </label>
<div class="col-lg-9"> <div class="col-lg-9">
@@ -256,8 +256,10 @@
</div> </div>
<div id="tr_unit_impact" class="row"> <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">
<label class="control-label col-lg-3" for="attribute_unit_impact">{l s='Impact on unit price :'}</label> {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"> <div class="col-lg-3">
<select name="attribute_unit_impact" id="attribute_unit_impact" onchange="check_unit_impact();"> <select name="attribute_unit_impact" id="attribute_unit_impact" onchange="check_unit_impact();">
<option value="0">{l s='None'}</option> <option value="0">{l s='None'}</option>
@@ -284,8 +286,8 @@
{if $ps_use_ecotax} {if $ps_use_ecotax}
<div class="row"> <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"> <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" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='overrides Eco-tax in the "Information" tab'}"> title="{l s='overrides Eco-tax in the "Information" tab'}">
{l s='Eco-tax (tax excl.):'} {l s='Eco-tax (tax excl.):'}
@@ -302,8 +304,8 @@
{/if} {/if}
<div class="row"> <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"> <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" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}"> title="{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}">
{l s='Minimum quantity:'} {l s='Minimum quantity:'}
@@ -316,8 +318,8 @@
</div> </div>
<div class="row"> <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"> <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" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='The available date when this product is out of stock.'}"> title="{l s='The available date when this product is out of stock.'}">
{l s='Available date:'} {l s='Available date:'}
@@ -359,8 +361,10 @@
</div> </div>
<div class="row"> <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">
<label class="control-label col-lg-3" for="attribute_default">{l s='Default:'}</label> {include file="controllers/products/multishop/checkbox.tpl" field="attribute_default" type="attribute_default"}
{l s='Default:'}
</label>
<div class="col-lg-9"> <div class="col-lg-9">
<p class="checkbox"> <p class="checkbox">
<label for="attribute_default"> <label for="attribute_default">
@@ -31,8 +31,8 @@
{include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"} {include file="controllers/products/multishop/check_fields.tpl" product_tab="Customization"}
<div class="row"> <div class="row">
{include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"}
<label class="control-label col-lg-3" for="uploadable_files"> <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" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of upload file fields displayed'}"> title="{l s='Number of upload file fields displayed'}">
{l s='File fields:'} {l s='File fields:'}
@@ -43,8 +43,8 @@
</div> </div>
</div> </div>
<div class="row"> <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"> <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" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Number of text fields displayed'}"> title="{l s='Number of text fields displayed'}">
{l s='Text fields:'} {l s='Text fields:'}
@@ -189,9 +189,9 @@
{/if} {/if}
{if $ps_stock_management} {if $ps_stock_management}
{include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"}
<div class="row"> <div class="row">
<label class="control-label col-lg-5" for="available_now_{$id_lang}"> <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" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;"> title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when in-stock:'} {l s='Displayed text when in-stock:'}
@@ -207,8 +207,8 @@
</div> </div>
</div> </div>
<div class="row"> <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}"> <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" <span class="label-tooltip" data-toggle="tooltip"
title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;"> title="{l s='Forbidden characters:'} &#60;&#62;;&#61;#&#123;&#125;">
{l s='Displayed text when back-ordereding is allowed:'} {l s='Displayed text when back-ordereding is allowed:'}
@@ -31,38 +31,34 @@
{/if} {/if}
<div class="row"> <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"> <div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span> <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, '.');" /> <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}
</div> </div>
</div> </div>
<div class="row"> <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"> <div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span> <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, '.');" /> <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> </div>
<div class="row"> <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"> <div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_dimension_unit}</span> <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, '.');" /> <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> </div>
<div class="row"> <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"> <div class="input-group col-lg-2">
<span class="input-group-addon">{$ps_weight_unit}</span> <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, '.');" /> <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>
</div> </div>
@@ -74,21 +74,23 @@
{l s='Click "Save and Stay" after changing selected suppliers to display the associated product references.'} {l s='Click "Save and Stay" after changing selected suppliers to display the associated product references.'}
</div> </div>
<div id="accordion-supplier"> <div class="panel-group" id="accordion-supplier">
{foreach from=$associated_suppliers item=supplier} {foreach from=$associated_suppliers item=supplier name=data}
<div class="accordion-group"> <div class="panel panel-default">
<div class="accordion-heading"> <div class="panel-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#supplier-{$supplier->id}">{$supplier->name}</a> <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>
<div id="supplier-{$supplier->id}" class="accordion-body collapse in"> <div id="supplier-{$supplier->id}" class="panel-collapse collapse{if $smarty.foreach.data.first} in{/if}">
<div class="accordion-inner"> <div class="panel-body">
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>{l s='Product name'}</th> <th><span class="title_box">{l s='Product name'}</span></th>
<th>{l s='Supplier reference'}</th> <th><span class="title_box">{l s='Supplier reference'}</span></th>
<th>{l s='Unit price tax excluded'}</th> <th><span class="title_box">{l s='Unit price tax excluded'}</span></th>
<th>{l s='Unit price currency'}</th> <th><span class="title_box">{l s='Unit price currency'}</span></th>
</tr> </tr>
</thead> </thead>
@@ -28,68 +28,73 @@
<fieldset> <fieldset>
<input type="hidden" name="submitted_tabs[]" value="Warehouses" /> <input type="hidden" name="submitted_tabs[]" value="Warehouses" />
<h3>{l s='Product location in warehouses'}</h3> <h3>{l s='Product location in warehouses'}</h3>
<div class="separation"></div> <div class="row">
<div class="alert alert-info" style="display:block; position:'auto';"> <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='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> <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>
<p>{l s='Please choose the warehouses associated with this product. You must also select a default warehouse. '}</p> <div class="row">
<a class="btn btn-default confirm_leave" href="{$link->getAdminLink('AdminWarehouses')|escape:'htmlall':'UTF-8'}&addwarehouse">
<a class="button bt-icon confirm_leave" href="{$link->getAdminLink('AdminWarehouses')|escape:'htmlall':'UTF-8'}&addwarehouse"> <i class="icon-plus-sign"></i> {l s='Create a new warehouse'}
<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>
</a> </div>
<div class="row">
<div id="warehouse_accordion"> <div class="panel-group" id="warehouse-accordion">
{foreach from=$warehouses item=warehouse} {foreach from=$warehouses item=warehouse name=data}
<div class="accordion-group"> <div class="panel panel-default">
<div class="accordion-heading"> <div class="panel-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#warehouse-{$warehouse['name']}">{$warehouse['name']}</a> <h4 class="panel-title">
</div> <a class="accordion-toggle" data-toggle="collapse" data-parent="#warehouse-accordion" href="#warehouse-{$warehouse['name']}">{$warehouse['name']}</a>
<div id="warehouse-{$warehouse['name']}" class="accordion-body collapse in"> </h4>
<div class="accordion-inner"> </div>
<table cellpadding="10" cellspacing="0" class="table"> <div id="warehouse-{$warehouse['name']}" class="panel-collapse collapse{if $smarty.foreach.data.first} in{/if}">
<tr> <div class="panel-body">
<th width="100">{l s='Stored'}</th> <table cellpadding="10" cellspacing="0" class="table">
<th>{l s='Product'}</th> <tr>
<th width="150">{l s='Location (optional)'}</th> <th width="100">{l s='Stored'}</th>
</tr> <th>{l s='Product'}</th>
{foreach $attributes AS $index => $attribute} <th width="150">{l s='Location (optional)'}</th>
{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> </tr>
{/foreach} {foreach $attributes AS $index => $attribute}
<tr> {assign var=location value=''}
<td colspan="3">&nbsp;</td> {assign var=selected value=''}
</tr> {foreach from=$associated_warehouses item=aw}
{if $attributes|@count gt 1} {if $aw->id_product == $attribute['id_product'] && $aw->id_product_attribute == $attribute['id_product_attribute'] && $aw->id_warehouse == $warehouse['id_warehouse']}
<tr> {assign var=location value=$aw->location}
<td><input type="checkbox" class="check_all_warehouse" value="check_warehouse_{$warehouse['id_warehouse']}" /></td> {assign var=selected value=true}
<td colspan="2"><i>{l s='Mark all products as stored in this warehouse.'}</i></td> {/if}
</tr> {/foreach}
{/if} <tr {if $index is odd}class="alt_row"{/if}>
</table> <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> </div>
</div> {/foreach}
{/foreach} </div>
</div> </div>
<fieldset> </fieldset>
{/if} {/if}