// update order tab

This commit is contained in:
sLorenzini
2013-07-26 12:15:23 +02:00
parent 8b7c29dd18
commit 3c035324f4
11 changed files with 271 additions and 238 deletions
@@ -22,7 +22,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<table class="table table-hover" width="100%;" cellspacing="0" cellpadding="0" id="documents_table">
<table class="table" id="documents_table">
<thead>
<tr>
<th width="10%">
@@ -27,80 +27,78 @@
{block name="input"}
{if $input.type == 'text_customer'}
<span class="normal-text">{$customer->firstname} {$customer->lastname}</span>
<p style="clear: both">
<a href="{$url_customer}">{l s='View details on the customer page'}</a>
<span>{$customer->firstname} {$customer->lastname}</span>
<p>
<a class="text-muted" href="{$url_customer}">{l s='View details on the customer page'}</a>
</p>
{elseif $input.type == 'text_order'}
<span class="normal-text">{$text_order}</span>
<p style="clear: both">
<a href="{$url_order}">{l s='View details on the order page'}</a>
<span>{$text_order}</span>
<p>
<a class="text-muted" href="{$url_order}">{l s='View details on the order page'}</a>
</p>
{elseif $input.type == 'list_products'}
<table cellpadding="0" cellspacing="0">
<tr>
<td class="col-left">&nbsp;</td>
<td>
<table cellspacing="0" cellpadding="0" class="table">
<table class="table">
<thead>
<tr>
<th>{l s='Reference'}</th>
<th>{l s='Product name'}</th>
<th class="text-center">{l s='Quantity'}</th>
<th class="text-center">{l s='Action'}</th>
</tr>
</thead>
<tbody>
{foreach $returnedCustomizations as $returnedCustomization}
<tr>
<th style="width: 100px;">{l s='Reference'}</th>
<th>{l s='Product name'}</th>
<th>{l s='Quantity'}</th>
<th>{l s='Action'}</th>
<td>{$returnedCustomization['reference']}</td>
<td>{$returnedCustomization['name']}</td>
<td class="text-center">{$returnedCustomization['product_quantity']|intval}</td>
<td class="text-center">
<a class="btn btn-default" href="{$current}&deleteorder_return_detail&id_order_detail={$returnedCustomization['id_order_detail']}&id_order_return={$id_order_return}&id_customization={$returnedCustomization['id_customization']}&token={$token}">
<i class="icon-remove"></i>
{l s='Delete'}
</a>
</td>
</tr>
{foreach $returnedCustomizations as $returnedCustomization}
{foreach $customizationDatas as $type => $datas}
<tr>
<td>{$returnedCustomization['reference']}</td>
<td class="center">{$returnedCustomization['name']}</td>
<td class="center">{$returnedCustomization['product_quantity']|intval}</td>
<td class="center">
<a href="{$current}&deleteorder_return_detail&id_order_detail={$returnedCustomization['id_order_detail']}&id_order_return={$id_order_return}&id_customization={$returnedCustomization['id_customization']}&token={$token}">
<img src="../img/admin/delete.gif">
<td colspan="4">
{if $type == 'type_file'}
<ul>
{foreach $datas a $data name='loop'}
<li>
<a href="displayImage.php?img={$data['value']}&name={$order->id|intval}-file{$loop.iteration}" target="_blank"><img src="{$picture_folder}{$data['value']}_small" alt="" /></a>
</li>
{/foreach}
</ul>
{elseif $type == 'type_textfield'}
<ul>
{foreach $datas as $data name='loop'}
<li>{if $data['name']}$data['name']{else}{l s='Text #%d' sprintf=$loop.iteration}{/if}{l s=':'} {$data['value']}</li>
{/foreach}
</ul>
{/if}
</td>
</tr>
{/foreach}
{/foreach}
{* Classic products *}
{foreach $products as $k => $product}
{if !isset($quantityDisplayed[$product['id_order_detail']]) || $product['product_quantity']|intval > $quantityDisplayed[$product['id_order_detail']]|intval}
<tr>
<td>{$product['product_reference']}</td>
<td class="text-center">{$product['product_name']}</td>
<td class="text-center">{$product['product_quantity']}</td>
<td class="text-center">
<a class="btn btn-default" href="{$current}&deleteorder_return_detail&id_order_detail={$product['id_order_detail']}&id_order_return={$id_order_return}&token={$token}">
<i class="icon-remove"></i>
{l s='Delete'}
</a>
</td>
</tr>
{foreach $customizationDatas as $type => $datas}
<tr>
<td colspan="4">
{if $type == 'type_file'}
<ul style="margin: 4px 0px 4px 0px; padding: 0px; list-style-type: none;">
{foreach $datas a $data name='loop'}
<li style="display: inline; margin: 2px;">
<a href="displayImage.php?img={$data['value']}&name={$order->id|intval}-file{$loop.iteration}" target="_blank"><img src="{$picture_folder}{$data['value']}_small" alt="" /></a>
</li>
{/foreach}
</ul>
{elseif $type == 'type_textfield'}
<ul style="margin: 0px 0px 4px 0px; padding: 0px 0px 0px 6px; list-style-type: none;">
{foreach $datas as $data name='loop'}
<li>{if $data['name']}$data['name']{else}{l s='Text #%d' sprintf=$loop.iteration}{/if}{l s=':'} {$data['value']}</li>
{/foreach}
</ul>
{/if}
</td>
</tr>
{/foreach}
{/foreach}
{* Classic products *}
{foreach $products as $k => $product}
{if !isset($quantityDisplayed[$product['id_order_detail']]) || $product['product_quantity']|intval > $quantityDisplayed[$product['id_order_detail']]|intval}
<tr>
<td>{$product['product_reference']}</td>
<td class="center">{$product['product_name']}</td>
<td class="center">{$product['product_quantity']}</td>
<td class="center">
<a href="{$current}&deleteorder_return_detail&id_order_detail={$product['id_order_detail']}&id_order_return={$id_order_return}&token={$token}">
<img src="../img/admin/delete.gif">
</a>
</td>
</tr>
{/if}
{/foreach}
</table>
</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
{else}
{$smarty.block.parent}
@@ -24,6 +24,9 @@
*}
{* Generate HTML code for printing OrderSlip Icon with link *}
<span style="width:20px; margin-right:5px;">
<a target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$order_slip->id}"><img src="../img/admin/tab-invoice.gif" alt="order_slip" /></a>
</span>
<a class="btn btn-default" target="_blank" href="{$link->getAdminLink('AdminPdf')|escape:'htmlall':'UTF-8'}&submitAction=generateOrderSlipPDF&id_order_slip={$order_slip->id}">
<i class="icon-file-text"></i>
{l s='Download credit slip'}
</a>