update
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../../../../../../');
|
||||
exit;
|
||||
@@ -0,0 +1,60 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
|
||||
{if !$message.id_employee}
|
||||
{assign var="type" value="customer"}
|
||||
{else}
|
||||
{assign var="type" value="employee"}
|
||||
{/if}
|
||||
|
||||
<div class="message-item{if $initial}-initial-body{/if}">
|
||||
{if !$initial}
|
||||
<div class="message-avatar">
|
||||
<div class="avatar-md">
|
||||
{if $type == 'customer'}
|
||||
<i class="icon-user icon-3x"></i>
|
||||
{else}
|
||||
{if isset($current_employee->firstname)}<img src="{$message.employee_image}" alt="{$current_employee->firstname|escape:'html':'UTF-8'}" />{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="message-body">
|
||||
{if !$initial}
|
||||
<h4 class="message-item-heading">
|
||||
<i class="icon-mail-reply text-muted"></i>
|
||||
{if $type == 'customer'}
|
||||
{$message.customer_name|escape:'html':'UTF-8'}
|
||||
{else}
|
||||
{$message.employee_name|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</h4>
|
||||
{/if}
|
||||
<span class="message-date"> <i class="icon-calendar"></i> - {dateFormat date=$message.date_add full=0} - <i class="icon-time"></i> {$message.date_add|substr:11:5}</span>
|
||||
{if isset($message.file_name)} <span class="message-product"> <i class="icon-link"></i> <a href="{$message.file_link|escape:'html':'UTF-8'}" target="_blank" rel="noopener noreferrer nofollow">{l s="Attachment" d='Admin.Catalog.Feature'}</a></span>{/if}
|
||||
{if isset($message.product_name)} <span class="message-attachment"> <i class="icon-book"></i> <a href="{$message.product_link|escape:'html':'UTF-8'}" target="_blank" rel="noopener noreferrer nofollow">{l s="Product" d='Admin.Global'} {$message.product_name|escape:'html':'UTF-8'} </a></span>{/if}
|
||||
<p class="message-item-text">{$message.message|escape:'html':'UTF-8'|nl2br}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,76 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
<form action="{$link->getAdminLink('AdminCustomerThreads', true, [], ['id_customer_thread' => $id_customer_thread|intval, 'viewcustomer_thread' => 1])|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">{l s="Forward this discussion" d='Admin.Orderscustomers.Feature'}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row row-margin-bottom">
|
||||
<label class="control-label col-lg-6">{l s='Forward this discussion to an employee:' d='Admin.Orderscustomers.Feature'}</label>
|
||||
<div class="col-lg-3">
|
||||
<select name="id_employee_forward">
|
||||
<option value="-1">{l s='-- Choose --' d='Admin.Actions'}</option>
|
||||
{foreach $employees as $employee}
|
||||
<option value="{$employee.id_employee}"> {Tools::substr($employee.firstname, 0, 1)}. {$employee.lastname}</option>
|
||||
{/foreach}
|
||||
<option value="0">{l s='Someone else' d='Admin.Orderscustomers.Feature'}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="message_forward_email" class="row row-margin-bottom" style="display:none">
|
||||
<label class="control-label col-lg-3">{l s='Email' d='Admin.Global'}</label>
|
||||
<div class="col-lg-3">
|
||||
<input type="email" name="email" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="message_forward" style="display:none;">
|
||||
<div class="row row-margin-bottom">
|
||||
<label class="control-label col-lg-3">{l s='Comment:' d='Admin.Orderscustomers.Feature'}</label>
|
||||
<div class="col-lg-7">
|
||||
<textarea name="message_forward" rows="6">{l s='You can add a comment here.' d='Admin.Orderscustomers.Help'}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{l s="Close"}</button>
|
||||
<button type="submit" class="btn btn-primary" name="submitForward" disabled="disabled"><i class="icon-mail-forward"></i> {l s="Forward" d='Admin.Orderscustomers.Feature'}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
$("select[name='id_employee_forward']").on('change', function() {
|
||||
if ($(this).val() != '-1')
|
||||
$("button[name='submitForward']").prop('disabled', false);
|
||||
else
|
||||
$("button[name='submitForward']").prop('disabled', 'disabled');
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,39 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
<article class="timeline-item{if isset($timeline_item.alt)} alt{/if}">
|
||||
<div class="timeline-caption">
|
||||
<div class="timeline-panel arrow arrow-{$timeline_item.arrow}">
|
||||
<span class="timeline-icon" style="background-color:{$timeline_item.background_color|escape:'html':'UTF-8'};">
|
||||
<i class="{$timeline_item.icon}"></i>
|
||||
</span>
|
||||
<span class="timeline-date"><i class="icon-calendar"></i> {dateFormat date=$timeline_item.date full=0} - <i class="icon-time"></i> {$timeline_item.date|substr:11:5}</span>
|
||||
{if isset($timeline_item.id_order)}<a class="badge" href="#">{l s="Order #" d='Admin.Orderscustomers.Feature'}{$timeline_item.id_order|intval}</a><br/>{/if}
|
||||
<span>{$timeline_item.content|nl2br}</span>
|
||||
{if isset($timeline_item.see_more_link)}
|
||||
<br/><br/><a href="{$timeline_item.see_more_link|escape:'html':'UTF-8'}" class="btn btn-default _blank">{l s="See more" d='Admin.Orderscustomers.Feature'}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,184 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
|
||||
{extends file="helpers/view/view.tpl"}
|
||||
{block name="override_tpl"}
|
||||
{include file="./modal.tpl" }
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-comments"></i>
|
||||
{l s="Thread" d='Admin.Orderscustomers.Feature'}: <span class="badge">#{$id_customer_thread|intval}</span>
|
||||
{if isset($next_thread) && $next_thread}
|
||||
<a class="btn btn-default pull-right" href="{$next_thread.href|escape:'html':'UTF-8'}">
|
||||
{$next_thread.name} <i class="icon-forward"></i>
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="well">
|
||||
<form action="{$link->getAdminLink('AdminCustomerThreads', true, [], ['id_customer_thread' => $id_customer_thread|intval, 'viewcustomer_thread' => 1])|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
{foreach $actions as $action}
|
||||
<button class="btn btn-default" name="{$action.name|escape:'html':'UTF-8'}" value="{$action.value|intval}">
|
||||
{if isset($action.icon)}<i class="{$action.icon|escape:'html':'UTF-8'}"></i>{/if}{$action.label}
|
||||
</button>
|
||||
{/foreach}
|
||||
<button class="btn btn-default" type="button" data-toggle="modal" data-target="#myModal">
|
||||
{l s="Forward this discussion to another employee" d='Admin.Orderscustomers.Feature'}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="message-item-initial media">
|
||||
<a href="{if isset($customer->id)}{$link->getAdminLink('AdminCustomers', true, [], ['id_customer' => $customer->id|intval, 'viewcustomer' => 1])|escape:'html':'UTF-8'}{else}#{/if}" class="avatar-lg pull-left"><i class="icon-user icon-3x"></i></a>
|
||||
<div class="media-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
{if isset($customer->firstname)}
|
||||
<h2>
|
||||
<a href="{$link->getAdminLink('AdminCustomers', true, [], ['id_customer' => $customer->id|intval, 'viewcustomer' => 1])|escape:'html':'UTF-8'}">
|
||||
{$customer->firstname|escape:'html':'UTF-8'} {$customer->lastname|escape:'html':'UTF-8'} <small>({$customer->email|escape:'html':'UTF-8'})</small>
|
||||
</a>
|
||||
</h2>
|
||||
{else}
|
||||
<h2>{$thread->email|escape:'html':'UTF-8'}</h2>
|
||||
{/if}
|
||||
{if isset($contact) && trim($contact) != ''}
|
||||
<span>{l s="To:" d='Admin.Orderscustomers.Feature'} </span><span class="badge">{$contact|escape:'html':'UTF-8'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{if isset($customer->firstname)}
|
||||
<div class="col-sm-6">
|
||||
<p>
|
||||
{if $count_ok}
|
||||
{l s='[1]%count%[/1] order(s) validated for a total amount of [2]%total%[/2]' html=true sprintf=['%count%' => $count_ok, '%total%' => $total_ok, '[1]' => '<span class="badge">', '[/1]' => '</span>', '[2]' => '<span class="badge badge-success">', '[/2]' => '</span>'] d='Admin.Orderscustomers.Feature'}
|
||||
{else}
|
||||
{l s="No orders validated for the moment" d='Admin.Orderscustomers.Feature'}
|
||||
{/if}
|
||||
</p>
|
||||
<p class="text-muted">{l s="Customer since: %s" sprintf=[{dateFormat date=$customer->date_add full=0}] d='Admin.Orderscustomers.Feature'}</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{if !$first_message.id_employee}
|
||||
{include file="./message.tpl" message=$first_message initial=true}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
{foreach $messages as $message}
|
||||
{include file="./message.tpl" message=$message initial=false}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<h3 id="reply-form-title">{l s="Your answer to" d='Admin.Orderscustomers.Feature'} {if isset($customer->firstname)}{$customer->firstname|escape:'html':'UTF-8'} {$customer->lastname|escape:'html':'UTF-8'} {else} {$thread->email}{/if}</h3>
|
||||
<form action="{$link->getAdminLink('AdminCustomerThreads', true, [], ['id_customer_thread' => $thread->id|intval, 'viewcustomer_thread' => 1])|escape:'html':'UTF-8'}" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||||
<div class="row">
|
||||
<div class="media">
|
||||
<div class="pull-left">
|
||||
<span class="avatar-md">{if isset($current_employee->firstname)}<img src="{$current_employee->getImage()}" alt="">{/if}</span>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<textarea id="reply_message" cols="30" rows="7" name="reply_message">{$PS_CUSTOMER_SERVICE_SIGNATURE|escape:'html':'UTF-8'}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<!--
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon-magic icon-2x"></i><br>
|
||||
{l s="Choose a template"}
|
||||
</button>
|
||||
-->
|
||||
<button class="btn btn-default pull-right" name="submitReply"><i class="process-icon-mail-reply"></i> {l s="Send"}</button>
|
||||
<input type="hidden" name="id_customer_thread" value="{$thread->id|intval}" />
|
||||
<input type="hidden" name="msg_email" value="{$thread->email}" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{if count($timeline_items)}
|
||||
<div class="panel" id="orders-and-messages-block">
|
||||
<h3>
|
||||
<i class="icon-clock-o"></i>
|
||||
{l s="Orders and messages timeline" d='Admin.Orderscustomers.Feature'}
|
||||
</h3>
|
||||
<div class="timeline">
|
||||
{foreach $timeline_items as $dates}
|
||||
{foreach from=$dates key=date item=timeline_item}
|
||||
{include file="controllers/customer_threads/helpers/view/timeline_item.tpl" timeline_item=$timeline_item}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
var timer;
|
||||
$(document).ready(function(){
|
||||
$('select[name=id_employee_forward]').change(function(){
|
||||
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);
|
||||
});
|
||||
$('textarea[name=message_forward]').click(function(){
|
||||
if($(this).val() == '{l s='You can add a comment here.'}')
|
||||
{
|
||||
$(this).val('');
|
||||
}
|
||||
});
|
||||
timer = setInterval("markAsRead()", 3000);
|
||||
});
|
||||
|
||||
function markAsRead()
|
||||
{
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax-tab.php',
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
controller: 'AdminCustomerThreads',
|
||||
action: 'markAsRead',
|
||||
token : '{$token|escape:'html':'UTF-8'}',
|
||||
id_thread: {$id_customer_thread}
|
||||
}
|
||||
});
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user