// Advanced stock bootstrap design

This commit is contained in:
Jerome Nadaud
2013-09-27 12:24:44 +02:00
parent 48966f7916
commit 9e58e3edfd
14 changed files with 178 additions and 163 deletions
@@ -25,35 +25,39 @@
{extends file="helpers/list/list_header.tpl"}
{block name=override_header}
<div class="filter-stock-extended">
<form id="stock_cover" type="get">
<form id="stock_cover" type="get" class="form-horizontal">
<input type="hidden" name="controller" value="AdminStockCover" />
<input type="hidden" name="token" value="{$token}" />
{if count($stock_cover_periods) > 1}
<div>
<label for="coverage_period">{l s='Filter by period:'}</label>
<select name="coverage_period" onChange="$(this).parent().parent().submit();">
{foreach from=$stock_cover_periods key=k item=i}
<option {if $i == $stock_cover_cur_period} selected="selected"{/if} value="{$i}">{$k}</option>
{/foreach}
</select>
</div>
{/if}
{if count($stock_cover_warehouses) > 0}
<div>
<label for="id_warehouse">{l s='Filter by warehouse:'}</label>
<select name="id_warehouse" onChange="$(this).parent().parent().submit();">
{foreach from=$stock_cover_warehouses key=k item=i}
<option {if $i.id_warehouse == $stock_cover_cur_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
{/foreach}
</select>
</div>
{/if}
<div>
<label for="warn_days">{l s='Highlight when coverage (in days) is less than:'}</label>
<input name="warn_days" type="text" size="3" onChange="$(this).parent().parent().submit();"
value="{if isset($stock_cover_warn_days)}{$stock_cover_warn_days}{/if}">
</input>
</div>
{if count($stock_cover_periods) > 1}
<div class="form-group">
<label for="coverage_period" class="control-label col-lg-3">{l s='Filter by period:'}</label>
<div class="col-lg-9">
<select name="coverage_period" onChange="$(this).parent().parent().submit();">
{foreach from=$stock_cover_periods key=k item=i}
<option {if $i == $stock_cover_cur_period} selected="selected"{/if} value="{$i}">{$k}</option>
{/foreach}
</select>
</div>
</div>
{/if}
{if count($stock_cover_warehouses) > 0}
<div class="form-group">
<label for="id_warehouse" class="control-label col-lg-3">{l s='Filter by warehouse:'}</label>
<div class="col-lg-9">
<select name="id_warehouse" onChange="$(this).parent().parent().submit();">
{foreach from=$stock_cover_warehouses key=k item=i}
<option {if $i.id_warehouse == $stock_cover_cur_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
{/foreach}
</select>
</div>
</div>
{/if}
<div class="form-group">
<label for="warn_days" class="control-label col-lg-3">{l s='Highlight when coverage (in days) is less than:'}</label>
<div class="col-lg-9">
<input name="warn_days" type="text" size="3" onChange="$(this).parent().parent().submit();" value="{if isset($stock_cover_warn_days)}{$stock_cover_warn_days}{/if}" />
</div>
</div>
</form>
</div>
{/block}
{/block}
@@ -25,17 +25,19 @@
{extends file="helpers/list/list_header.tpl"}
{block name=override_header}
<div class="filter-stock">
<form id="stock_instant_state" type="get">
<form id="stock_instant_state" type="get" class="form-horizontal">
<input type="hidden" name="controller" value="AdminStockInstantState" />
<input type="hidden" name="token" value="{$token}" />
{if count($stock_instant_state_warehouses) > 0}
<div id="stock_instant_state_form_warehouse">
<label for="id_warehouse">{l s='Filter by warehouse:'}</label>
<select name="id_warehouse" onChange="$(this).parent().parent().submit();">
{foreach from=$stock_instant_state_warehouses key=k item=i}
<option {if $i.id_warehouse == $stock_instant_state_cur_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
{/foreach}
</select>
<div id="stock_instant_state_form_warehouse" class="form-group">
<label for="id_warehouse" class="control-label col-lg-3">{l s='Filter by warehouse:'}</label>
<div class="col-lg-9">
<select name="id_warehouse" onChange="$(this).parent().parent().submit();">
{foreach from=$stock_instant_state_warehouses key=k item=i}
<option {if $i.id_warehouse == $stock_instant_state_cur_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
{/foreach}
</select>
</div>
</div>
{/if}
</form>
@@ -26,15 +26,19 @@
{block name=override_header}
{if count($list_warehouses) > 0}
<div class="filter-stock">
<form type="get">
<label for="id_warehouse">{l s='Filter movements by warehouse:'}</label>
<form type="get" class="form-horizontal">
<input type="hidden" name="controller" value="AdminStockMvt" />
<input type="hidden" name="token" value="{$token}" />
<select name="id_warehouse" onChange="$(this).parent().submit();">
{foreach $list_warehouses as $warehouse}
<option {if $warehouse.id_warehouse == $current_warehouse}selected="selected"{/if} value="{$warehouse.id_warehouse}">{$warehouse.name}</option>
{/foreach}
</select>
<div class="form-group">
<label for="id_warehouse" class="control-label col-lg-3">{l s='Filter movements by warehouse:'}</label>
<div class="col-lg-9">
<select name="id_warehouse" onChange="$(this).parent().submit();">
{foreach $list_warehouses as $warehouse}
<option {if $warehouse.id_warehouse == $current_warehouse}selected="selected"{/if} value="{$warehouse.id_warehouse}">{$warehouse.name}</option>
{/foreach}
</select>
</div>
</div>
</form>
{/if}
</div>
@@ -26,40 +26,34 @@
{block name="other_fieldsets"}
{if isset($show_product_management_form)}
<p>&nbsp;</p>
<input type="hidden" id="product_ids" name="product_ids" value="{$product_ids}" />
<input type="hidden" id="product_ids_to_delete" name="product_ids_to_delete" value="{$product_ids_to_delete}" />
<input type="hidden" name="updatesupply_order" value="1" />
<fieldset>
<legend>
<img alt="Supply Order Management" src="../img/admin/edit.gif">
{l s='Manage the products you want to order from the supplier.'}
</legend>
<p class="clear">{l s='To add a product to the order, type the first letters of the product name, then select it from the drop-down list.'}</p>
<input type="text" size="100" id="cur_product_name" />
<span onclick="addProduct();" style="cursor: pointer;"><img src="../img/admin/add.gif" alt="{l s='Add a product to the supply order'}" title="{l s='Add a product to the supply order'}" /></span>
<p>&nbsp;</p>
<table
id="products_in_supply_order"
class="table"
>
<h3><i class="icon-cogs"></i> {l s='Manage the products you want to order from the supplier.'}</h3>
<div class="alert alert-info">{l s='To add a product to the order, type the first letters of the product name, then select it from the drop-down list.'}</div>
<div class="row">
<div class="col-lg-9">
<input type="text" size="100" id="cur_product_name" />
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default" onclick="addProduct();"><i class="icon-plus-sign"></i> {l s='Add a product to the supply order'}</button>
</div>
</div>
<table id="products_in_supply_order" class="table">
<thead>
<tr class="nodrag nodrop">
<th width="150">{l s='Reference'}</th>
<th width="50">{l s='EAN13'}</th>
<th width="50">{l s='UPC'}</th>
<th width="150">{l s='Supplier Reference'}</th>
<th>{l s='Name'}</th>
<th width="100">{l s='Unit Price (tax excl.)'}</th>
<th width="100">{l s='Quantity'}</th>
<th width="100">{l s='Discount rate'}</th>
<th width="100">{l s='Tax rate'}</th>
<th width="40">{l s='Delete'}</th>
<th><span class="title_box">{l s='Reference'}</span></th>
<th><span class="title_box">{l s='EAN13'}</span></th>
<th><span class="title_box">{l s='UPC'}</span></th>
<th><span class="title_box">{l s='Supplier Reference'}</span></th>
<th><span class="title_box">{l s='Name'}</span></th>
<th class="fixed-width-md"><span class="title_box">{l s='Unit Price (tax excl.)'}</span></th>
<th class="fixed-width-xs"><span class="title_box">{l s='Quantity'}</span></th>
<th class="fixed-width-md"><span class="title_box">{l s='Discount rate'}</span></th>
<th class="fixed-width-md"><span class="title_box">{l s='Tax rate'}</span></th>
<th class="fixed-width-sm">&nbsp;</th>
</tr>
</thead>
<tbody>
@@ -88,27 +82,31 @@
<input type="hidden" name="input_name_{$product.id_product}_{$product.id_product_attribute}" value="{$product.name}" />
</td>
<td>
{$currency->prefix}&nbsp;<input type="text" name="input_unit_price_te_{$product.id_product}_{$product.id_product_attribute}" value="{$product.unit_price_te|htmlentities}" size="8" />&nbsp;{$currency->suffix}
<div class="input-group fixed-width-md">
{if isset($currency->prefix) && trim($currency->prefix) != ''}<span class="input-group-addon">{$currency->prefix}</span>{/if}<input type="text" name="input_unit_price_te_{$product.id_product}_{$product.id_product_attribute}" value="{$product.unit_price_te|htmlentities}" />{if isset($currency->suffix) && trim($currency->suffix) != ''}<span class="input-group-addon">{$currency->suffix}</span>{/if}
</div>
</td>
<td>
<input type="text" name="input_quantity_expected_{$product.id_product}_{$product.id_product_attribute}" value="{$product.quantity_expected|htmlentities}" size="5" />
<input type="text" name="input_quantity_expected_{$product.id_product}_{$product.id_product_attribute}" value="{$product.quantity_expected|htmlentities}" class="fixed-width-xs" />
</td>
<td>
<input type="text" name="input_discount_rate_{$product.id_product}_{$product.id_product_attribute}" value="{round($product.discount_rate, 4)}" size="5" />%
<div class="input-group fixed-width-md">
<input type="text" name="input_discount_rate_{$product.id_product}_{$product.id_product_attribute}" value="{round($product.discount_rate, 4)}" /><span class="input-group-addon">%</span>
</div>
</td>
<td>
<input type="text" name="input_tax_rate_{$product.id_product}_{$product.id_product_attribute}" value="{round($product.tax_rate, 4)}" size="5" />%
<div class="input-group fixed-width-md">
<input type="text" name="input_tax_rate_{$product.id_product}_{$product.id_product_attribute}" value="{round($product.tax_rate, 4)}" /><span class="input-group-addon">%</span>
</div>
</td>
<td>
<a href="#" id="deletelink|{$product.id_product}_{$product.id_product_attribute}" class="removeProductFromSupplyOrderLink">
<img src="../img/admin/delete.gif" alt="{l s='Remove this product from the order.'}" title="{l s='Remove this product from the order.'}" />
<a href="#" id="deletelink|{$product.id_product}_{$product.id_product_attribute}" class="btn btn-default"><i class="icon-trash"></i> {l s='Remove'}
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</fieldset>
<script type="text/javascript">
@@ -139,18 +137,17 @@
// add a new line in the products table
$('#products_in_supply_order > tbody:last').append(
'<tr style="height:50px;">'+
'<tr>'+
'<td>'+product_infos.reference+'<input type="hidden" name="input_check_'+product_infos.id+'" value="'+product_infos.checksum+'" /><input type="hidden" name="input_reference_'+product_infos.id+'" value="'+product_infos.reference+'" /></td>'+
'<td>'+product_infos.ean13+'<input type="hidden" name="input_ean13_'+product_infos.id+'" value="'+product_infos.ean13+'" /></td>'+
'<td>'+product_infos.upc+'<input type="hidden" name="input_upc_'+product_infos.id+'" value="'+product_infos.upc+'" /></td>'+
'<td>'+product_infos.supplier_reference+'<input type="hidden" name="input_supplier_reference_'+product_infos.id+'" value="'+product_infos.supplier_reference+'" /></td>'+
'<td>'+product_infos.name+'<input type="hidden" name="input_name_displayed_'+product_infos.id+'" value="'+product_infos.name+'" /></td>'+
'<td class="center">{$currency->prefix}&nbsp;<input type="text" name="input_unit_price_te_'+product_infos.id+'" value="'+product_infos.unit_price_te+'" size="8" />&nbsp;{$currency->suffix}</td>'+
'<td class="center"><input type="text" name="input_quantity_expected_'+product_infos.id+'" value="0" size="5" /></td>'+
'<td class="center"><input type="text" name="input_discount_rate_'+product_infos.id+'" value="0" size="5" />%</td>'+
'<td class="center"><input type="text" name="input_tax_rate_'+product_infos.id+'" value="0" size="5" />%</td>'+
'<td class="center"><a href="#" class="removeProductFromSupplyOrderLink" id="deletelink|'+product_infos.id+'">'+
'<img src="../img/admin/delete.gif" alt="{l s='Remove this product from the order.'}" title="{l s='Remove this product from the order.'}" />'+
'<td><div class="input-group fixed-width-md">{if isset($currency->prefix) && trim($currency->prefix) != ''}<span class="input-group-addon">{$currency->prefix}</span>{/if}<input type="text" name="input_unit_price_te_'+product_infos.id+'" value="'+product_infos.unit_price_te+'" />{if isset($currency->suffix) && trim($currency->suffix) != ''}<span class="input-group-addon">{$currency->suffix}</span>{/if}</div></td>'+
'<td><input type="text" name="input_quantity_expected_'+product_infos.id+'" value="0" class="fixed-width-xs" /></td>'+
'<td><div class="input-group fixed-width-md"><input type="text" name="input_discount_rate_'+product_infos.id+'" value="0" /><span class="input-group-addon">%</span></div></td>'+
'<td><div class="input-group fixed-width-md"><input type="text" name="input_tax_rate_'+product_infos.id+'" value="0" /><span class="input-group-addon">%</span></div></td>'+
'<td><a href="#" id="deletelink|'+product_infos.id+'" class="btn btn-default"><i class="icon-trash"></i> {l s="Remove"}'+
'</a></td></tr>'
);
@@ -26,25 +26,27 @@
{block name=override_header}
{if isset($warehouses) && count($warehouses) > 0 && isset($filter_status)}
<div class="filter-stock-extended">
<form id="supply_orders" type="get">
<form id="supply_orders" type="get" class="form-horizontal">
<input type="hidden" name="controller" value="AdminSupplyOrders" />
<input type="hidden" name="token" value="{$token}" />
<div>
<label for="id_warehouse">{l s='Filter by warehouse:'}</label>
<select name="id_warehouse" onChange="$(this).parent().parent().submit();">
{foreach from=$warehouses key=k item=i}
<option {if $i.id_warehouse == $current_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
{/foreach}
</select>
<div class="form-group">
<label for="id_warehouse" class="control-label col-lg-3">{l s='Filter by warehouse:'}</label>
<div class="col-lg-9">
<select name="id_warehouse" onChange="$(this).parent().parent().submit();">
{foreach from=$warehouses key=k item=i}
<option {if $i.id_warehouse == $current_warehouse} selected="selected"{/if} value="{$i.id_warehouse}">{$i.name}</option>
{/foreach}
</select>
</div>
</div>
<div>
<label for="filter_status">{l s='Choose not to display completed/canceled orders:'}</label>
<input type="checkbox" name="filter_status" class="noborder" onChange="$(this).parent().parent().submit();" {if $filter_status == 1}value="on" checked{/if}></input>
<div class="form-group">
<div class="checkbox col-lg-3 col-lg-push-3">
<label for="filter_status">
<input type="checkbox" name="filter_status" class="noborder" onChange="$(this).parent().parent().submit();" {if $filter_status == 1}value="on" checked{/if} /> {l s='Choose not to display completed/canceled orders:'}
</label>
</div>
</div>
</form>
</div>
{/if}
{/block}
{/block}
@@ -72,34 +72,38 @@
{if isset($is_template) && $is_template == 1} {l s='Template'} {/if}{l s='Summary'}
</h3>
<table class="table">
<tr>
<th>{l s='Designation'}</th>
<th>{l s='Value'}</th>
</tr>
<tr>
<td>{l s='Total (tax excl.)'}</td>
<td>{$supply_order_total_te}</td>
</tr>
<tr>
<td>{l s='Discount'}</td>
<td>{$supply_order_discount_value_te}</td>
</tr>
<tr>
<td>{l s='Total with discount (tax excl.)'}</td>
<td>{$supply_order_total_with_discount_te}</td>
</tr>
<tr>
<td>{l s='Total Tax'}</td>
<td>{$supply_order_total_tax}</td>
</tr>
<tr>
<td>{l s='Total (tax incl.)'}</td>
<td>{$supply_order_total_ti}</td>
</tr>
<tr>
<td>{l s='Total to pay.'}</td>
<td>{$supply_order_total_ti}</td>
</tr>
<thead>
<tr>
<th><span class="title_box">{l s='Designation'}</span></th>
<th><span class="title_box">{l s='Value'}</span></th>
</tr>
</thead>
<tbody>
<tr>
<td>{l s='Total (tax excl.)'}</td>
<td>{$supply_order_total_te}</td>
</tr>
<tr>
<td>{l s='Discount'}</td>
<td>{$supply_order_discount_value_te}</td>
</tr>
<tr>
<td>{l s='Total with discount (tax excl.)'}</td>
<td>{$supply_order_total_with_discount_te}</td>
</tr>
<tr>
<td>{l s='Total Tax'}</td>
<td>{$supply_order_total_tax}</td>
</tr>
<tr>
<td>{l s='Total (tax incl.)'}</td>
<td>{$supply_order_total_ti}</td>
</tr>
<tr>
<td>{l s='Total to pay.'}</td>
<td>{$supply_order_total_ti}</td>
</tr>
</tbody>
</table>
</fieldset>
</div>
@@ -39,20 +39,22 @@ $(document).ready(function() {
});
});
</script>
<input type="hidden" name="id_supply_order" id="id_supply_order" value="{$supply_order->id}">
<label>{l s='Status of the order:'}</label>
<div class="margin-form">
<select name="id_supply_order_state" id="id_supply_order_state">
{foreach $supply_order_states as $state}
<option value="{$state['id_supply_order_state']}" {if $state['allowed'] == 0} disabled="disabled" {/if}>{$state['name']}</option>
{/foreach}
</select>
<p class="preference_description">
{l s='Choose the new status for your order'}
</p>
{assign var=order_state value=$supply_order_state->name[$employee->id_lang]|regex_replace:"/[^A-Za-z_ \t]/":""}
<div class="alert alert-warning"><strong>{l s='Current order state: %s'|sprintf:$order_state}</strong></div>
<div class="alert alert-info">{l s='Choose the new status for your order'}</div>
<div class="form-horizontal">
<input type="hidden" name="id_supply_order" id="id_supply_order" value="{$supply_order->id}">
<div class="form-group">
<label class="control-label col-lg-3">{l s='Status of the order:'}</label>
<div class="col-lg-9">
<select name="id_supply_order_state" id="id_supply_order_state">
{foreach $supply_order_states as $state}
<option value="{$state['id_supply_order_state']}" {if $state['allowed'] == 0} disabled="disabled" {/if}>{$state['name']}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="margin-form">
<input type="submit" id="_form_submit_btn" value="{l s='Save'}" name="submitChangestate" class="button" style="display: none;">
</div>
@@ -60,14 +62,10 @@ $(document).ready(function() {
{/block}
{block name="other_fieldsets"}
<br />
{if isset($supply_order_state) && $supply_order_state->editable == false && isset($supply_order)}
<fieldset>
<legend>
<img src="../img/admin/pdf.gif" alt="{l s='Supply Order State'}">
{l s='Print the supply order form'}
</legend>
<a href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateSupplyOrderFormPDF&id_supply_order={$supply_order->id}" target="_blank" title="Export as PDF">{l s='Click here to download the supply order form.'}.</a>
<h3><i class="icon-download-alt"></i> {l s='Print the supply order form'}</h3>
<a href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateSupplyOrderFormPDF&id_supply_order={$supply_order->id}" onclick="return !window.open(this.href);" title="Export as PDF" class="btn btn-default"><i class="icon-download-alt"></i> {l s='Click here to download the supply order form.'}.</a>
</fieldset>
{/if}
@@ -23,6 +23,6 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="#" id="details_{$params.action}_{$id}" title="{$action}" onclick="display_action_details('{$id}', '{$controller}', '{$token}', '{$params.action}', {$json_params|escape}); return false">
<a href="#" id="details_{$params.action}_{$id}" title="{$action}" onclick="display_action_details('{$id}', '{$controller}', '{$token}', '{$params.action}', {$json_params|escape}); return false" class="">
<i class="icon-collapse"></i> {$action}
</a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$href}" title="{$action}">
<a href="{$href}" title="{$action}" class="">
<i class="icon-time"></i> {$action}
</a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$href}" onclick="return confirm('{$confirm}');" title="{$action}">
<a href="{$href}" onclick="return confirm('{$confirm}');" title="{$action}" class="btn btn-default">
<i class="icon-copy"></i> {$action}
</a>
@@ -22,6 +22,6 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$href}" title="{$action}">
<a href="{$href}" title="{$action}" class="">
<i class="icon-truck"></i> {$action}
</a>