Merge branch 'ticket-AideContact-SAV' into develop
This commit is contained in:
commit
3ae711d543
@ -696,12 +696,12 @@ class AdminCustomerThreads extends AdminTab
|
||||
<div class="more-info" id="info_'.(int)$message['id_customer_message'].'"" style="font-size:11px">
|
||||
<h4><span class="anticon anticon-info"></span> '.$this->l('Informations').'</h4>
|
||||
<ul>';
|
||||
if(empty($message['employee_name'])) {
|
||||
$output .= '<li><span class="anticon anticon-sphere"></span> '.strip_tags($message['user_agent']).'</li>';
|
||||
}
|
||||
// if(empty($message['employee_name'])) {
|
||||
// $output .= '<li><span class="anticon anticon-sphere"></span> '.strip_tags($message['user_agent']).'</li>';
|
||||
// }
|
||||
|
||||
$output .= '<li><b>'.$this->l('Thread ID:').'</b> '.(int)$message['id_customer_thread'].'</li>
|
||||
<li><b>'.$this->l('Message ID:').'</b> '.(int)$message['id_customer_message'].'</li>';
|
||||
// $output .= '<li><b>'.$this->l('Thread ID:').'</b> '.(int)$message['id_customer_thread'].'</li>
|
||||
// <li><b>'.$this->l('Message ID:').'</b> '.(int)$message['id_customer_message'].'</li>';
|
||||
|
||||
if(!empty($message['id_order']) AND empty($message['employee_name'])) {
|
||||
$output .= '<li><b>'.$this->l('Order #').'</b> <a href="index.php?tab=AdminOrders&id_order='.(int)($message['id_order']).'&vieworder&token='.Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee)).'" title="'.$this->l('View order').'">'.(int)($message['id_order']).' <span class="anticon anticon-eye"></span></a></li>';
|
||||
@ -730,10 +730,10 @@ class AdminCustomerThreads extends AdminTab
|
||||
$img_path = (isset($image_obj)?$image_obj->getExistingImgPath():'');
|
||||
}
|
||||
$output .= '
|
||||
<div style="float:left;width:100px;margin-right:5px;margin-bottom:5px;">
|
||||
<div style="float:left;width:100px;margin-right:10px;margin-bottom:5px; text-align:center;">
|
||||
<a target="_blank" href="index.php?tab=AdminCatalog&id_product='.(int)($product['id_product']).'&updateproduct&token='.Tools::getAdminToken('AdminCatalog'.(int)(Tab::getIdFromClassName('AdminCatalog')).(int)($cookie->id_employee)).'" title="'.$this->l('View product').'">
|
||||
<img width="90" src="'.(isset($img_path)?_THEME_PROD_DIR_.$img_path.'-small.jpg':'').'"/>
|
||||
<p><b>#'.(int)($product['id_product']).'</b> - '.mb_strimwidth($product['name'], 0, 40, "...").'</p>
|
||||
<img width="62" src="'.(isset($img_path)?_THEME_PROD_DIR_.$img_path.'-small.jpg':'').'"/>
|
||||
<p><b>#'.(int)($product['id_product']).'</b><br />'.mb_strimwidth($product['name'], 0, 55, "...").'</p>
|
||||
</a>
|
||||
</div>';
|
||||
}
|
||||
@ -746,7 +746,7 @@ class AdminCustomerThreads extends AdminTab
|
||||
</div>';
|
||||
}
|
||||
|
||||
$output .= '<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
$output .= '<form class="form-subject-message" action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<label>'.$this->l('Subject:').'</label>
|
||||
<input type="hidden" name="id_customer_message" value="'.$message['id_customer_message'].'" />
|
||||
<div class="styled-select semi-square '.(!empty($message['employee_name'])?'bg-rose':'bg-purple-light').'">
|
||||
@ -768,6 +768,40 @@ class AdminCustomerThreads extends AdminTab
|
||||
.'<b>'.$this->l('Subject:').'</b> '.$message['subject'];
|
||||
}
|
||||
|
||||
$employees = Db::getInstance()->ExecuteS('
|
||||
SELECT e.id_employee, e.firstname, e.lastname FROM '._DB_PREFIX_.'employee e
|
||||
WHERE e.active = 1 ORDER BY e.lastname ASC');
|
||||
$output .= '<form class="form-forward-message" action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post" enctype="multipart/form-data">
|
||||
<div>
|
||||
<label for="id_employee_forward">'.$this->l('Forward this discussion to an employee:').'</label>
|
||||
<div class="styled-select semi-square '.(!empty($message['employee_name'])?'bg-rose':'bg-purple-light').'">
|
||||
<select name="id_employee_forward" style="vertical-align: middle;" onchange="
|
||||
if ($(this).val() >= 0)
|
||||
$(\'#message_forward\').show(400);
|
||||
else
|
||||
$(\'#message_forward\').hide(200);
|
||||
if ($(this).val() == 0)
|
||||
$(\'#message_forward_email\').show(200);
|
||||
else
|
||||
$(\'#message_forward_email\').hide(200);
|
||||
">
|
||||
<option value="-1">'.$this->l('-- Choose --').'</option>
|
||||
<option value="0">'.$this->l('Someone else').'</option>';
|
||||
foreach ($employees AS $employee) {
|
||||
$output.= ' <option value="'.(int)($employee['id_employee']).'">'.substr($employee['firstname'], 0, 1).'. '.$employee['lastname'].'</option>';
|
||||
}
|
||||
$output.= ' </select>
|
||||
</div>
|
||||
<div id="message_forward_email" style="display:none">
|
||||
<b>'.$this->l('E-mail').'</b> <input type="text" name="email" />
|
||||
</div>
|
||||
<div id="message_forward" style="display:none;margin-bottom:10px">
|
||||
<textarea name="message_forward" style="width: 340px; height: 80px; margin-top: 15px;" onclick="if ($(this).val() == \''.addslashes($this->l('You can add a comment here.')).'\') { $(this).val(\'\'); }">'.$this->l('You can add a comment here.').'</textarea><br />
|
||||
<input type="Submit" name="submitForward" class="button" value="'.$this->l('Forward this discussion').'" style="margin-top: 10px;" />
|
||||
</div>
|
||||
</div>
|
||||
</form>';
|
||||
|
||||
// Adding Antadis - linking with ant_support_form module
|
||||
if (Module::isInstalled('ant_support_form')) {
|
||||
$result = Db::getInstance()->getRow('
|
||||
@ -972,41 +1006,9 @@ class AdminCustomerThreads extends AdminTab
|
||||
return;
|
||||
$cookie->{'customer_threadFilter_cl!id_contact'} = $thread->id_contact;
|
||||
|
||||
$employees = Db::getInstance()->ExecuteS('
|
||||
SELECT e.id_employee, e.firstname, e.lastname FROM '._DB_PREFIX_.'employee e
|
||||
WHERE e.active = 1 ORDER BY e.lastname ASC');
|
||||
|
||||
echo '
|
||||
<h2>'.$this->l('Messages').'</h2>
|
||||
<form class="form-forward-message" action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post" enctype="multipart/form-data">
|
||||
<div>
|
||||
<label for="id_employee_forward">'.$this->l('Forward this discussion to an employee:').'</label>
|
||||
<div class="styled-select bg-purple semi-square">
|
||||
<select name="id_employee_forward" style="vertical-align: middle;" onchange="
|
||||
if ($(this).val() >= 0)
|
||||
$(\'#message_forward\').show(400);
|
||||
else
|
||||
$(\'#message_forward\').hide(200);
|
||||
if ($(this).val() == 0)
|
||||
$(\'#message_forward_email\').show(200);
|
||||
else
|
||||
$(\'#message_forward_email\').hide(200);
|
||||
">
|
||||
<option value="-1">'.$this->l('-- Choose --').'</option>
|
||||
<option value="0">'.$this->l('Someone else').'</option>';
|
||||
foreach ($employees AS $employee)
|
||||
echo ' <option value="'.(int)($employee['id_employee']).'">'.substr($employee['firstname'], 0, 1).'. '.$employee['lastname'].'</option>';
|
||||
echo ' </select>
|
||||
</div>
|
||||
<div id="message_forward_email" style="display:none">
|
||||
<b>'.$this->l('E-mail').'</b> <input type="text" name="email" />
|
||||
</div>
|
||||
<div id="message_forward" style="display:none;margin-bottom:10px">
|
||||
<textarea name="message_forward" style="width: 500px; height: 80px; margin-top: 15px;" onclick="if ($(this).val() == \''.addslashes($this->l('You can add a comment here.')).'\') { $(this).val(\'\'); }">'.$this->l('You can add a comment here.').'</textarea><br />
|
||||
<input type="Submit" name="submitForward" class="button" value="'.$this->l('Forward this discussion').'" style="margin-top: 10px;" />
|
||||
</div>
|
||||
</div>
|
||||
</form>';
|
||||
<div class="btn-action">';
|
||||
|
||||
if ($nextThread)
|
||||
echo $this->displayButton('
|
||||
@ -1045,7 +1047,7 @@ class AdminCustomerThreads extends AdminTab
|
||||
<span class="anticon anticon-tick"></span> '.$this->l('In Pending 2').'
|
||||
</a>');
|
||||
|
||||
echo '<div class="clear"> </div>';
|
||||
echo '</div><div class="clear"> </div>';
|
||||
|
||||
$messages = Db::getInstance()->ExecuteS('
|
||||
SELECT ct.*, cm.*, cl.name subject, CONCAT(e.firstname, \' \', e.lastname) employee_name, CONCAT(c.firstname, \' \', c.lastname) customer_name, c.firstname
|
||||
@ -1109,7 +1111,7 @@ class AdminCustomerThreads extends AdminTab
|
||||
if ($thread->id_customer)
|
||||
{
|
||||
$customer = new Customer($thread->id_customer);
|
||||
$products = $customer->getBoughtProducts();
|
||||
//$products = $customer->getBoughtProducts();
|
||||
$orders = Order::getCustomerOrders($customer->id);
|
||||
|
||||
echo '<div style="float:left;width:700px">';
|
||||
@ -1154,32 +1156,32 @@ class AdminCustomerThreads extends AdminTab
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
if ($products AND sizeof($products))
|
||||
{
|
||||
echo '<div style="float:left;margin-right:20px">
|
||||
<h2>'.$this->l('Products').'</h2>
|
||||
<table cellspacing="0" cellpadding="0" class="table customerThread-table">
|
||||
<tr>
|
||||
<th class="center">'.$this->l('Date').'</th>
|
||||
<th class="center">'.$this->l('ID').'</th>
|
||||
<th class="center">'.$this->l('Name').'</th>
|
||||
<th class="center">'.$this->l('Quantity').'</th>
|
||||
<th class="center">'.$this->l('Actions').'</th>
|
||||
</tr>';
|
||||
$irow = 0;
|
||||
$tokenOrders = Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee));
|
||||
foreach ($products AS $product)
|
||||
echo '
|
||||
<tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminOrders&id_order='.$product['id_order'].'&vieworder&token='.$tokenOrders.'\'">
|
||||
<td>'.Tools::displayDate($product['date_add'], (int)($cookie->id_lang), true).'</td>
|
||||
<td>'.$product['product_id'].'</td>
|
||||
<td>'.$product['product_name'].'</td>
|
||||
<td align="right">'.$product['product_quantity'].'</td>
|
||||
<td align="center"><a href="?tab=AdminOrders&id_order='.$product['id_order'].'&vieworder&token='.$tokenOrders.'"><img src="../img/admin/details.gif" /></a></td>
|
||||
</tr>';
|
||||
echo '</table>
|
||||
</div>';
|
||||
}
|
||||
// if ($products AND sizeof($products))
|
||||
// {
|
||||
// echo '<div style="float:left;margin-right:20px">
|
||||
// <h2>'.$this->l('Products').'</h2>
|
||||
// <table cellspacing="0" cellpadding="0" class="table customerThread-table">
|
||||
// <tr>
|
||||
// <th class="center">'.$this->l('Date').'</th>
|
||||
// <th class="center">'.$this->l('ID').'</th>
|
||||
// <th class="center">'.$this->l('Name').'</th>
|
||||
// <th class="center">'.$this->l('Quantity').'</th>
|
||||
// <th class="center">'.$this->l('Actions').'</th>
|
||||
// </tr>';
|
||||
// $irow = 0;
|
||||
// $tokenOrders = Tools::getAdminToken('AdminOrders'.(int)(Tab::getIdFromClassName('AdminOrders')).(int)($cookie->id_employee));
|
||||
// foreach ($products AS $product)
|
||||
// echo '
|
||||
// <tr '.($irow++ % 2 ? 'class="alt_row"' : '').' style="cursor: pointer" onclick="document.location = \'?tab=AdminOrders&id_order='.$product['id_order'].'&vieworder&token='.$tokenOrders.'\'">
|
||||
// <td>'.Tools::displayDate($product['date_add'], (int)($cookie->id_lang), true).'</td>
|
||||
// <td>'.$product['product_id'].'</td>
|
||||
// <td>'.$product['product_name'].'</td>
|
||||
// <td align="right">'.$product['product_quantity'].'</td>
|
||||
// <td align="center"><a href="?tab=AdminOrders&id_order='.$product['id_order'].'&vieworder&token='.$tokenOrders.'"><img src="../img/admin/details.gif" /></a></td>
|
||||
// </tr>';
|
||||
// echo '</table>
|
||||
// </div>';
|
||||
// }
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
@ -3339,8 +3339,16 @@ span.anticon{
|
||||
}
|
||||
|
||||
/** CustomerThread **/
|
||||
form.form-subject-message{
|
||||
width: 320px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
form.form-forward-message{
|
||||
margin-bottom: 20px;
|
||||
width: 360px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
form.form-forward-message label{
|
||||
line-height: 26px;
|
||||
@ -3349,7 +3357,7 @@ form.form-forward-message label{
|
||||
}
|
||||
form.form-forward-message #message_forward {
|
||||
padding: 5px;
|
||||
width: 510px;
|
||||
width: 350px;
|
||||
text-align: right;
|
||||
}
|
||||
form.form-forward-message textarea {
|
||||
@ -3378,10 +3386,13 @@ form.form-forward-message .button:hover {
|
||||
form.form-forward-message .button:focus{
|
||||
background-color: rgba(86,84,133,0.6);
|
||||
}
|
||||
|
||||
.btn-action{
|
||||
text-align: center;
|
||||
}
|
||||
.btn-action-message{
|
||||
position:relative;
|
||||
float:left;
|
||||
display: inline-block;
|
||||
/*float:left;*/
|
||||
margin-bottom:10px;
|
||||
background: rgba(226,110,162,0.2);
|
||||
margin-right:5px;
|
||||
|
Loading…
Reference in New Issue
Block a user