public function display($file, $template, $cacheId = null, $compileId = null)
 {
     require_once dirname(__FILE__) . '../../../../modules/designerpreview/defines.inc.php';
     if (($overloaded = Module::_isTemplateOverloadedStatic(basename($file, '.php'), $template)) === null) {
         $result = Tools::displayError('No template found for module') . ' ' . basename($file, '.php');
     } else {
         $this->smarty->assign(array('module_dir' => __PS_BASE_URI__ . 'modules/' . basename($file, '.php') . '/', 'module_template_dir' => ($overloaded ? getThemeUrl() : __PS_BASE_URI__) . 'modules/' . basename($file, '.php') . '/', 'module_name' => $this->name));
         $smarty_subtemplate = $this->context->smarty->createTemplate($this->getTemplatePath($template), $cacheId, $compileId, $this->smarty);
         $result = $smarty_subtemplate->fetch();
     }
     return $result;
 }
Beispiel #2
0
/**
 * Get the common HTML header
 *
 * @return  string      The common HTML header
 */
function getCommonHtmlHeader()
{
    $html = '';
    // Theme
    $themeUrl = getThemeUrl();
    $html .= '<link rel="stylesheet" type="text/css" href="' . $themeUrl . '/screen.css" media="screen"/>';
    $html .= '<link rel="stylesheet" type="text/css" href="' . $themeUrl . '/print.css" media="print"/>';
    $html .= '<!--[if lt IE 9]>';
    $html .= '<link rel="stylesheet" type="text/css" href="' . $themeUrl . '/ie.css"/>';
    $html .= '<![endif]-->';
    // Head JS
    $html .= '<script type="text/javascript" src="' . JS_URL . '/head.min.js"></script>';
    return $html;
}
 public function display($file, $template, $cacheId = null, $compileId = null)
 {
     require_once dirname(__FILE__) . '../../../../modules/designerpreview/defines.inc.php';
     if (($overloaded = Module::_isTemplateOverloadedStatic(basename($file, '.php'), $template)) === null) {
         return Tools::displayError('No template found for module') . ' ' . basename($file, '.php');
     } else {
         $this->smarty->assign(array('module_dir' => __PS_BASE_URI__ . 'modules/' . basename($file, '.php') . '/', 'module_template_dir' => ($overloaded ? getThemeUrl() : __PS_BASE_URI__) . 'modules/' . basename($file, '.php') . '/', 'module_name' => $this->name));
         if ($cacheId !== null) {
             Tools::enableCache();
         }
         $result = $this->getCurrentSubTemplate($template, $cacheId, $compileId)->fetch();
         if ($cacheId !== null) {
             Tools::restoreCacheSettings();
         }
         $this->resetCurrentSubTemplate($template, $cacheId, $compileId);
         return $result;
     }
 }
Beispiel #4
0
        <script src="<?php 
echo getThemeUrl();
?>
/js/modernizr.js"></script>
        <script src="<?php 
echo getThemeUrl();
?>
/js/bootstrap-tour.js"></script>
        <script src="<?php 
echo getThemeUrl();
?>
/js/king-common.js"></script>
        <script src="<?php 
echo getThemeUrl();
?>
/js/deliswitch.js"></script>
        <script src="<?php 
echo getThemeUrl();
?>
/js/bootstrap-multiselect.js"></script>
        <script src="<?php 
echo getThemeUrl();
?>
/js/bootstrap-progressbar.js"></script>
        <script src="<?php 
echo getThemeUrl();
?>
/js/king-elements.js"></script>
    </body>
</html>
Beispiel #5
0
<img data-toggle="modal" data-target="#myModal" src="<?php 
echo getThemeUrl() . '/images/notice.png';
?>
">

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header" style="padding: 0;">
                <?php 
$ajaxUrl = createUrl('site/saveNotes');
echo CHtml::ajaxButton($text = 'Save', $url = $ajaxUrl, $ajaxOptions = array('type' => 'POST', 'beforeSend' => "\n                        function(request){\n                            var notes = \$('#notes').val();\n                        }  \n                        ", 'data' => 'js:{' . '"notes" : $("#notes").val(),' . '"model" :"' . 'model' . '"' . '}', 'dataType' => 'json', 'success' => 'function(html){ jQuery("#your_id").html(html); }'), $htmlOptions = array('class' => 'btn btn-primary notebtn pull-right', 'style' => 'margin: -7px 3px !important;', 'data-dismiss' => 'modal'));
?>

                <h4  class="text-center">Add Notes</h4>
            </div>
            <div class="modal-body" style="padding: 0;">
                <?php 
echo CHtml::activeTextArea($model, 'notes', array('class' => 'form-control', 'rows' => '9', 'cols' => '50', 'style' => "border:0px;", 'id' => 'notes'));
?>
            </div>
        </div>
    </div>
</div>





 public static function getSortedHeader($text)
 {
     $customer = new Customer();
     $data = $customer->attributeLabels();
     $result = isset($data[$text]) ? $data[$text] : null;
     $ipath = getThemeUrl() . '/images/';
     return $result . CHtml::link(CHtml::image($ipath . 'up-arrow.png', 'Up', array('width' => '20px')), createUrl('site/index', array('Customer_sort' => $text))) . CHtml::link(CHtml::image($ipath . 'down-arrow.png', 'Up', array('width' => '15px')), createUrl('site/index', array('Customer_sort' => $text . '.desc')));
 }