PHP Classes

File: view/melis-cms-prospects/melis-cms-prospects-theme-items/tool-content.phtml

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis CMS Prospects   view/melis-cms-prospects/melis-cms-prospects-theme-items/tool-content.phtml   Download  
File: view/melis-cms-prospects/melis-cms-prospects-theme-items/tool-content.phtml
Role: Example script
Content type: text/plain
Description: Example script
Class: Melis CMS Prospects
Melis CMS module to track business prospects
Author: By
Last change:
Date: 2 years ago
Size: 2,020 bytes
 

Contents

Class file image Download
<?php
$id
= '';
$themeId = isset($this->theme->pros_theme_id) ? (int) $this->theme->pros_theme_id : null;
if (!empty(
$this->zoneconfig['conf']['id']))
   
$id = $themeId . '_' . $this->zoneconfig['conf']['id'];
?>

<div id="<?= $id; ?>" data-melisKey="<?= $this->melisKey; ?>" data-themeId="<?= $themeId; ?>">
    <div class="spacing-x2 innerAll">
        <?php
       
/*
         * This functions prepares the TABLE element in HTML. ID and class associative array attribute will be placed in table like
         * <table id="tableToolProspect" class="table table-bordered table-condensed table-striped table-primary table-vertical-center checkboxs js-table-sortable">
         */
       
$this->melisGenericTable()->setTable(array(
           
'id' => $this->theme->pros_theme_id.'_tableToolProspectsThemeItems',
           
'class' => 'table table-striped table-primary dt-responsive nowrap',
           
'cellspacing' => '0',
           
'width' => '100%'
       
));
       
/**
         * This process retrieves the value inside the View Model that is being generated from app.tools.php `columns` attribute
         * @reference please see app.tools.php
         */
       
$columns = array();
       
$columnStyle = array();
        foreach(
$this->tableColumns as $columnText)
        {
           
$columns[] = $columnText['text'];

        }

       
// this process inserts all the array columns into the table.
        // the 'center' value indicates where your column texts are positioned.
       
$this->melisGenericTable()->setColumns($columns);

        echo
$this->melisGenericTable()->renderTable();
       
?>
<!-- // END TABLE -->


        <script type="text/javascript">
            // this script cannot be separated to this file since all table configuration and initialization are done here
            // render table to DataTable plugin
            $(document).ready(function() {
                <?= $this->getToolDataTableConfig; ?>
});
        </script>
    </div>
</div>