// update module and orders tab

This commit is contained in:
sLorenzini committed 2013-07-22 17:56:24 +02:00
1 parent 9d16eb1d1b
commit f194aec8c5
2 files changed
+70 -46

No files matched your search

@@ -131,7 +131,7 @@
{if $module->id && isset($module->version_addons) && $module->version_addons} {if $module->id && isset($module->version_addons) && $module->version_addons}
<p> <p>
<a href="{$module->options.update_url}"> <a href="{$module->options.update_url}">
<span class="btn btn-default btn-warning"> <span class="btn btn-warning">
<i class="icon-refresh"></i> {l s='Update it!'} <i class="icon-refresh"></i> {l s='Update it!'}
</span> </span>
</a> </a>
@@ -141,14 +141,14 @@
<a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed"> <a {if isset($module->id) && $module->id gt 0 && !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{if isset($module->id) && $module->id gt 0}{$module->options.uninstall_url}{else}{$module->options.install_url}{/if}" class="button installed">
{if isset($module->id) && $module->id gt 0} {if isset($module->id) && $module->id gt 0}
<p> <p>
<span class="btn btn-default btn-danger"> <span class="btn btn-danger">
<i class="icon-minus-sign-alt"></i> <i class="icon-minus-sign-alt"></i>
{l s='Uninstall'} {l s='Uninstall'}
</span> </span>
</p> </p>
{else} {else}
<p> <p>
<span class="btn btn-default btn-success"> <span class="btn btn-success">
<i class="icon-plus-sign-alt"></i> <i class="icon-plus-sign-alt"></i>
{l s='Install'} {l s='Install'}
</span> </span>
@@ -162,33 +162,40 @@
<!-- Customer informations --> <!-- Customer informations -->
<div class="col-lg-6"> <div class="col-lg-6">
<fieldset> <form action="" method="post">
<legend><img src="../img/admin/tab-customers.gif" /> {l s='Customer information'}</legend> <fieldset class="well">
<span style="font-weight: bold; font-size: 14px;"><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a></span> ({l s='#'}{$customer->id})<br /> <legend>
(<a href="mailto:{$customer->email}">{$customer->email}</a>)<br /><br /> <i class="icon-user"></i>
{if ($customer->isGuest())} {l s='Customer information'}
{l s='This order has been placed by a guest.'} </legend>
{if (!Customer::customerExists($customer->email))} <span style="font-weight: bold; font-size: 14px;"><a href="?tab=AdminCustomers&id_customer={$customer->id}&viewcustomer&token={getAdminToken tab='AdminCustomers'}"> {$customer->firstname} {$customer->lastname}</a></span> ({l s='#'}{$customer->id})<br />
<form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}"> (<a href="mailto:{$customer->email}">{$customer->email}</a>)<br /><br />
<input type="hidden" name="id_lang" value="{$order->id_lang}" /> {if ($customer->isGuest())}
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p> {l s='This order has been placed by a guest.'}
{l s='This feature will generate a random password and send an email to the customer.'} {if (!Customer::customerExists($customer->email))}
</form> <form method="post" action="index.php?tab=AdminCustomers&id_customer={$customer->id}&token={getAdminToken tab='AdminCustomers'}">
<input type="hidden" name="id_lang" value="{$order->id_lang}" />
<p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="{l s='Transform a guest into a customer'}" /></p>
{l s='This feature will generate a random password and send an email to the customer.'}
</form>
{else}
<div><b style="color:red;">{l s='A registered customer account has already claimed this email address'}</b></div>
{/if}
{else} {else}
<div><b style="color:red;">{l s='A registered customer account has already claimed this email address'}</b></div> {l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br />
{/if} {l s='Valid orders placed:'} <b>{$customerStats['nb_orders']}</b><br />
{else} {l s='Total spent since registration:'} <b>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b><br />
{l s='Account registered:'} <b>{dateFormat date=$customer->date_add full=true}</b><br /> </fieldset>
{l s='Valid orders placed:'} <b>{$customerStats['nb_orders']}</b><br />
{l s='Total spent since registration:'} <b>{displayPrice price=Tools::ps_round(Tools::convertPrice($customerStats['total_orders'], $currency), 2) currency=$currency->id}</b><br />
</fieldset>
{/if} {/if}
{/if} {/if}
<!-- Sources block --> <!-- Sources block -->
{if (sizeof($sources))} {if (sizeof($sources))}
<fieldset> <fieldset>
<legend><img src="../img/admin/tab-stats.gif" /> {l s='Sources'}</legend> <legend>
<i class="icon-signal"></i>
{l s='Sources'}
</legend>
<ul {if sizeof($sources) > 3}style="height: 200px; overflow-y: scroll;"{/if}> <ul {if sizeof($sources) > 3}style="height: 200px; overflow-y: scroll;"{/if}>
{foreach from=$sources item=source} {foreach from=$sources item=source}
<li> <li>
@@ -204,33 +211,50 @@
<!-- Admin order hook --> <!-- Admin order hook -->
{hook h="displayAdminOrder" id_order=$order->id} {hook h="displayAdminOrder" id_order=$order->id}
</form>
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
<form action="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}" method="post" onsubmit="if (getE('visibility').checked == true) return confirm('{l s='Do you want to send this message to the customer?'}');"> <form action="{$smarty.server.REQUEST_URI}&token={$smarty.get.token}" method="post" onsubmit="if (getE('visibility').checked == true) return confirm('{l s='Do you want to send this message to the customer?'}');">
<fieldset> <fieldset class="well">
<legend onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><img src="../img/admin/email_edit.gif" /> {l s='New message'}</legend> <legend onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false">
<div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if}; overflow: auto; width: 400px;"> <i class="icon-envelope"></i>
<a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false"><b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer.'}</a> {l s='New message'}
</div> </legend>
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a><br> <div id="message_m" style="display: {if Tools::getValue('message')}none{else}block{/if};">
<div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}"> <a href="#" onclick="$('#message').slideToggle();$('#message_m').slideToggle();return false">
<select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')"> <b>{l s='Click here'}</b> {l s='to add a comment or send a message to the customer.'}
<option value="0" selected="selected">-- {l s='Choose a standard message'} --</option> </a>
{foreach from=$orderMessages item=orderMessage} </div>
<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option> <a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a>
{/foreach} <div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}">
</select><br /><br /> <select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')">
<b>{l s='Display to customer?'}</b> <option value="0" selected="selected">-- {l s='Choose a standard message'} --</option>
<input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'} {foreach from=$orderMessages item=orderMessage}
<input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'} <option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>
<p id="nbchars" style="display:inline;font-size:10px;color:#666;"></p><br /><br /> {/foreach}
<textarea id="txt_msg" name="message" cols="50" rows="8" onKeyUp="var length = document.getElementById('txt_msg').value.length; if (length > 600) length = '600+'; document.getElementById('nbchars').innerHTML = '{l s='600 characters, max.'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br /> </select>
<input type="hidden" name="id_order" value="{$order->id}" /> <div class="row">
<input type="hidden" name="id_customer" value="{$order->id_customer}" /> <label class="control-label col-lg-4 text-right">{l s='Display to customer?'}</label>
<input type="submit" class="button" name="submitMessage" value="{l s='Send'}" /> <div class="col-lg-8">
</div> <label for="visibility" class="radio-inline">
</fieldset> <input type="radio" name="visibility" id="visibility" value="0" /> {l s='Yes'}
</label>
<label for="visibility" class="radio-inline">
<input type="radio" name="visibility" value="1" checked="checked" /> {l s='No'}
</label>
</div>
</div>
<p id="nbchars" style="display:inline;font-size:10px;color:#666;"></p>
<textarea id="txt_msg" name="message" cols="50" rows="8" onKeyUp="var length = document.getElementById('txt_msg').value.length; if (length > 600) length = '600+'; document.getElementById('nbchars').innerHTML = '{l s='600 characters, max.'} (' + length + ')';">{Tools::getValue('message')|escape:'htmlall':'UTF-8'}</textarea><br /><br />
<input type="hidden" name="id_order" value="{$order->id}" />
<input type="hidden" name="id_customer" value="{$order->id_customer}" />
<button type="submit" class="btn btn-default pull-right" name="submitMessage">
{l s='Send'}
</button>
</div>
</fieldset>
</form> </form>
{if (sizeof($messages))} {if (sizeof($messages))}