PHP Classes

File: view/melis-cms-page-analytics/melis-cms-page-analytics-tool/tool-content-container-analytics-tab-content.phtml

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis PHP CMS Analytics by Page   view/melis-cms-page-analytics/melis-cms-page-analytics-tool/tool-content-container-analytics-tab-content.phtml   Download  
File: view/melis-cms-page-analytics/melis-cms-page-analytics-tool/tool-content-container-analytics-tab-content.phtml
Role: Example script
Content type: text/plain
Description: Example script
Class: Melis PHP CMS Analytics by Page
Melis CMS module to provide page access statistics
Author: By
Last change:
Date: 1 year ago
Size: 1,610 bytes
 

Contents

Class file image Download
<?php
$id
= '';
if (!empty(
$this->zoneconfig['conf']['id']))
   
$id = ' id="' . $this->zoneconfig['conf']['id'] . '"';

$form = $this->form;
$form->setAttributes([
   
'id' => 'select_page_analytic_form_analytics_content',
   
'name' => 'select_page_analytic_form_analytics_content'
]);
//Analytics Tab Content
if ($this->hasAccess): ?>
<div <?= $id; ?> data-melisKey="<?= $this->melisKey; ?>" class="meliscms_center_tabs tab-pane clearfix">
        <?= $this->form()->openTag($form); ?>
<div class="form-group">
            <?= $this->formRow($form->get('pad_site_id')->setAttributes([
               
'id' => 'analytics-content-side-id',
               
'class' => 'form-control',
            ])->
setValue($this->siteId)); ?>
</div>
        <?= $this->form()->closeTag(); ?>
<?= $this->errMsg ? "<h4 id='id_melis_cms_page_analytics_loaded_flag'>" . $this->errMsg . "</h4>" : $this->display; ?>

        <script type="text/javascript">
            (function () {
                // Disable empty option
                $body.find('select#analytics-content-side-id option:first-child').attr('disabled', 'true');
                if (pageAnalyticsSiteSelect) {
                    var $firstSite = $body.find('select#analytics-content-side-id option:nth-child(2)');
                    if ($firstSite.length) {
                        $body.find('select#analytics-content-side-id').val($firstSite.val()).trigger('change');
                        pageAnalyticsSiteSelect = false;
                    }
                }
            })();
        </script>
    </div>
<?php endif; ?>