示例#1
0
 /**
  * Display the template list.
  *
  * @return void
  */
 private function templates()
 {
     $input = JFactory::getApplication()->input;
     $profiling = false;
     if ($profiling) {
         //            jimport('joomla.error.profiler');
         $this->profiler = JProfiler::getInstance('EasyCreator');
     }
     $this->task = $input->get('task');
     $this->ecr_project = $input->get('ecr_project');
     $this->path = ECRPATH_EXTENSIONTEMPLATES;
     $this->file_path = $input->getPath('file_path');
     $this->file_name = $input->getPath('file_name');
     $this->com_type = $input->get('com_type');
     $this->template = $input->get('template');
     $this->comTypes = EcrProjectHelper::getProjectTypes();
     $cache = JFactory::getCache();
     $cache->setCaching(1);
     if ($profiling) {
         $this->profiler->mark('start get templates');
     }
     $this->templates = EcrProjectTemplateHelper::getTemplateList();
     if ($profiling) {
         $this->profiler->mark('end get cached templates');
     }
     if ($profiling) {
         echo '<pre>' . print_r($this->profiler->getBuffer(), true) . '</pre>';
     }
     $this->setLayout('templates');
 }
示例#2
0
 /**
  * Standard display method.
  *
  * @param null|string $tpl The name of the template file to parse;
  *
  * @return mixed|void
  */
 public function display($tpl = null)
 {
     $input = JFactory::getApplication()->input;
     $task = $input->get('task');
     $this->builder = new EcrProjectBuilder();
     ecrLoadMedia('wizard');
     $params = JComponentHelper::getParams('com_easycreator');
     $this->templateList = EcrProjectTemplateHelper::getTemplateList();
     $tplType = $input->get('tpl_type');
     $tplFolder = $input->get('tpl_name');
     $desc = isset($this->templateList[$tplType][$tplFolder]) ? $this->templateList[$tplType][$tplFolder]->description : '';
     $project = EcrProjectHelper::newProject('empty');
     $project->type = $input->get('tpl_type');
     $project->tplName = $input->get('tpl_name');
     $project->version = $input->getString('version', '1.0');
     $project->description = $input->getString('description', $desc);
     $project->listPostfix = $input->get('list_postfix', 'List');
     $project->JCompat = $input->getString('jcompat');
     //-- Sanitize project name
     $project->name = $input->get('com_name');
     $disallows = array('_');
     $project->name = str_replace($disallows, '', $project->name);
     //-- Credits
     $s = $input->getString('author');
     $project->author = $s ? $s : $params->get('cred_author');
     $s = $input->getString('authorEmail');
     $project->authorEmail = $s ? $s : $params->get('cred_author_email');
     $s = $input->getString('authorUrl');
     $project->authorUrl = $s ? $s : $params->get('cred_author_url');
     $s = $input->getString('license');
     $project->license = $s ? $s : $params->get('cred_license');
     $s = $input->getString('copyright');
     $project->copyright = $s ? $s : $params->get('cred_copyright');
     $this->project = $project;
     if ($task && method_exists($this, $task)) {
         $this->{$task}();
     }
     parent::display($tpl);
     EcrHtml::formEnd();
 }
示例#3
0
<?php

defined('_JEXEC') || die('=;)');
/**
 * @package    EasyCreator
 * @subpackage Views
 * @author     Nikolai Plath
 * @author     Created on 14-Oct-2009
 * @license    GNU/GPL, see JROOT/LICENSE.php
 */
$templateList = EcrProjectTemplateHelper::getTemplateList();
echo EcrHelp::help(jgettext('Select the templates to export'), EcrHelp::ALL, 'ecrBigInfo');
?>

<h1><?php 
echo jgettext('Export templates');
?>
</h1>

<div class="btn btn-success btn-large" onclick="submitbutton('do_export');">
    <i class="img icon16-ecr_save"></i>
    <?php 
echo jgettext('Export');
?>
</div>

<div style="clear: both;"></div>

<?php 
foreach ($templateList as $group => $templates) {
    echo '<div class="ecr_floatbox">';