HEX
Server: Apache
System: Linux srv13.cpanelhost.cl 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
User: cca63905 (4205)
PHP: 7.3.20
Disabled: NONE
Upload Files
File: //proc/self/cwd/nueva/modules/roja45quotationsprofree/views/templates/hook/displayBackOfficeTop.tpl
{*
* 2016 ROJA45
* All rights reserved.
*
* DISCLAIMER
*
* Changing this file will render any support provided by us null and void.
*
*  @author 			Roja45
*  @copyright  		2016 Roja45
*  @license          /license.txt
*}

<li id="roja45quotationspro_notif" class="dropdown" data-type="quotation" style="display:none;">
    <a href="{$roja45quotationspro_controller|escape:'html':'UTF-8'}&ajax=1&action=updateQuotationRequestCounter" class="dropdown-toggle notifs" data-toggle="dropdown">
        <i class="icon-calculator"></i>
        {if $new_requests > 0}
        <span id="roja45quotationspro_notif_number_wrapper" class="notifs_badge">
		    <span id="roja45quotationspro_notif_value">{$new_requests|escape:'html':'UTF-8'}</span>
		</span>
        {/if}
    </a>
    <div class="dropdown-menu notifs_dropdown">
        <section id="roja45quotationspro_notif_wrapper" class="notifs_panel">
            {if $new_requests > 0}
            <div class="notifs_panel_header">
                <h3>{l s='Unresponded Requests' mod='roja45quotationsprofree'}</h3>
            </div>
            <div id="list_roja45quotationspro_notif" class="list_notif" {if $new_requests == 0}style="display:none;"{/if}>
                {foreach $quotations as $quotation}
                <a href="{$roja45quotationspro_controller|escape:'html':'UTF-8'}&id_roja45_quotation={$quotation->id_roja45_quotation|escape:'htmlall':'UTF-8'}&viewroja45_quotationspro">
                    <div style="text-decoration: none;padding: 5px;border-bottom: solid 1px #ccc;display:block;">
                        <table style="width:100%;">
                            <tbody>
                                <tr>
                                    <td style="test-align: left"><p>{l s='Customer name' mod='roja45quotationsprofree'}</p></td>
                                    <td style="test-align: right"><p><strong>{$quotation->firstname|escape:'html':'UTF-8'}&nbsp;{$quotation->lastname|escape:'html':'UTF-8'}</strong></p></td>
                                </tr>
                                <tr>
                                    <td><p>{l s='Customer email' mod='roja45quotationsprofree'}</p></td>
                                    <td><p><strong>{$quotation->email|escape:'html':'UTF-8'}</strong></p></td>
                                </tr>
                                <tr>
                                    <td><p>{l s='Received' mod='roja45quotationsprofree'}</p></td>
                                    <td><p><strong>{$quotation->received|escape:'html':'UTF-8'}</strong></p></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </a>
                {/foreach}
            </div>
            {else}
            <div id="list_roja45quotationspro_notif_no_msg" class="list_notif" {if $new_requests > 0}style="display:none;"{/if}>
                <span class="no_notifs">{l s='No new requests have been received on your shop.' mod='roja45quotationsprofree'}</span>
            </div>
            {/if}
            <div class="notifs_panel_footer">
                <a href="{$roja45quotationspro_controller|escape:'html':'UTF-8'}">{l s='Show all requests' mod='roja45quotationsprofree'}</a>
            </div>
        </section>
    </div>
    <script>
        $(document).ready(function() {
            $('#roja45quotationspro_notif').appendTo('#header_notifs_icon_wrapper');
            $('#roja45quotationspro_notif').show();
            $('#roja45quotationspro_notif .notifs').click(function(){
                var wrapper_id = $(this).parent().attr("id");
                var url = $(this).attr('href');
                $.ajax({
                    url: url,
                    type: 'get',
                    dataType: 'json',
                    beforeSend: function () {
                    },
                    success: function (data) {
                        if (data && data.result == 'success') {
                            $("#" + wrapper_id + "_value").html(data.unresponded.length);
                            if (data.unresponded.length==0) {
                                $("#" + wrapper_id + "_number_wrapper").hide();
                            } else {
                                $("#" + wrapper_id + "_number_wrapper").show();
                            }
                        } else if (data && data.result == 'error') {
                            //displayErrorMsg('Error');
                        } else {
                            //displayErrorMsg('Error');
                        }
                    },
                    error: function (data) {
                        //displayErrorMsg('Error');
                    },
                    complete: function (data) {
                    }
                });
            });
        });
    </script>
</li>