Exemplo n.º 1
0
 /**
  * Displays the submenu.
  *
  * @param string $task The actual task
  *
  * @return string html
  */
 private function displayBar($task)
 {
     $subtasks = array(array('title' => jgettext('Building'), 'description' => jgettext('Shows options for building your project like credits, files and folders to copy, languages and admin menu.'), 'icon' => 'ecr_config', 'task' => 'stuffer'), array('title' => jgettext('Files'), 'description' => jgettext('Shows all the files belonging to your project'), 'icon' => 'directory', 'task' => 'files'));
     if ('cliapp' != $this->project->type && 'webapp' != $this->project->type) {
         $subtasks[] = array('title' => jgettext('Installing'), 'description' => jgettext('Create and modify install and uninstall files for your project.'), 'icon' => 'installfolder', 'task' => 'install');
         $subtasks[] = array('title' => jgettext('Parameters'), 'description' => jgettext('Modify your project parameters stored in XML files.'), 'icon' => 'ecr_params', 'task' => 'projectparams');
         $subtasks[] = array('title' => jgettext('DataDesigner'), 'description' => jgettext('Automated source code and db creation for your project.'), 'icon' => 'ecr_db', 'task' => 'tables');
     }
     $subtasks[] = array('title' => jgettext('Remove Project'), 'description' => jgettext('This will your delete your project.'), 'icon' => 'delete', 'task' => 'projectdelete');
     $rightTasks = array();
     if ($task == 'stuffer') {
         if (version_compare(ECR_JVERSION, '3') >= 0) {
             ecrStylesheet('stuffer3');
             $icon = ECR_TBAR_ICONS ? '<i class="img icon16-ecr_save"></i>' : '';
             $btn = '<a class="btn' . ECR_TBAR_SIZE . ' btn-success" href="javascript:;"' . ' onclick="submitStuffer(\'save_config\', this);">' . $icon . jgettext('Save') . '</a>';
             JToolbar::getInstance('toolbar')->appendButton('Custom', $btn);
         } else {
             //-- @Joomla!-compat 2.5
             $rightTasks[] = array('title' => jgettext('Save'), 'description' => jgettext('Save the configuration'), 'icon' => 'save', 'task' => 'save_config');
         }
     }
     return EcrHtmlMenu::sub($subtasks, $rightTasks);
 }
Exemplo n.º 2
0
 /**
  * Display the bar View.
  *
  * @param string $task The actual task
  *
  * @todo move
  *
  * @return string
  */
 private function displayBarG11n($task)
 {
     $this->sel_language = JFactory::getApplication()->input->get('sel_language');
     $subTasks = array(array('title' => jgettext('Status'), 'description' => jgettext('Displays the status of your language files including cache.'), 'icon' => 'apply', 'task' => 'languages'), array('title' => jgettext('g11n'), 'description' => jgettext('Utility to create and update your language files.'), 'icon' => 'ecr_language', 'task' => 'g11nUpdate'));
     return EcrHtmlMenu::sub($subTasks);
 }
Exemplo n.º 3
0
 /**
  * Displays the submenu.
  *
  * @return string html
  */
 private function displayBar()
 {
     $subTasks = array(array('title' => jgettext('Templates'), 'description' => jgettext('Manage EasyCreator Extension Templates'), 'icon' => 'directory', 'task' => 'templates'), array('title' => jgettext('Install'), 'description' => jgettext('Installs EasyCreator Extension Templates'), 'icon' => 'import', 'task' => 'tplinstall'), array('title' => jgettext('Export'), 'description' => jgettext('Exports EasyCreator Extension Templates'), 'icon' => 'export', 'task' => 'export'), array('title' => jgettext('Archive'), 'description' => jgettext('View archived versions of your extension.'), 'icon' => 'ecr_archive', 'task' => 'tplarchive'));
     return EcrHtmlMenu::sub($subTasks);
 }
Exemplo n.º 4
0
 /**
  * Displays the submenu.
  *
  * @return string html
  */
 private function displayBar()
 {
     $subTasks = array(array('title' => jgettext('Package'), 'description' => jgettext('Automatically create a package of your extension.'), 'icon' => 'package', 'task' => array('ziper')), array('title' => jgettext('Archive'), 'description' => jgettext('View archived versions of your extension.'), 'icon' => 'ecr_archive', 'task' => 'archive'));
     return EcrHtmlMenu::sub($subTasks);
 }
Exemplo n.º 5
0
// Add CSS
ecrStylesheet('default', 'toolbar', 'icon');
// Add JavaScript
ecrScript('global_vars', 'easycreator');
JFactory::getDocument()->addScriptDeclaration("var ECR_VERSION = '" . ECR_VERSION . "';" . NL);
JFactory::getDocument()->addScriptDeclaration("var ECR_JVERSION = '" . ECR_JVERSION . "';" . NL);
$prevErrorReporting = error_reporting(-1);
try {
    $controller = EcrEasycreator::getController();
    $input = JFactory::getApplication()->input;
    if ('component' == $input->get('tmpl')) {
        // Perform the Request task only - raw view
        $controller->execute($input->get('task'));
    } else {
        // Display the menu
        EcrHtmlMenu::main();
        // Perform the Request task
        $controller->execute($input->get('task'));
        if (ECR_DEV_MODE && ECR_DEBUG_LANG && class_exists('g11n')) {
            g11n::debugPrintTranslateds(true);
            g11n::debugPrintTranslateds();
        }
        // Display the footer
        EcrHtml::footer();
        JDEBUG ? JProfiler::getInstance('Application')->mark('com_easycreator finished') : null;
    }
    // Restore error_reporting
    error_reporting($prevErrorReporting);
    // Redirect if set by the controller
    // We don't do this very often =;)
    $controller->redirect();
Exemplo n.º 6
0
 /**
  * Displays the submenu.
  *
  * @return string html
  */
 private function displayBar()
 {
     $subTasks = array(array('title' => jgettext('CodeSniffer'), 'description' => jgettext('Use CodeSniffer to assure coding standards.'), 'icon' => 'eye', 'task' => 'phpcs'), array('title' => jgettext('Duplicated Code'), 'description' => jgettext('Searches your code for duplicates.'), 'icon' => 'eye', 'task' => 'phpcpd'), array('title' => jgettext('PHPUnit Tests'), 'description' => jgettext('Generates and executes PHPUnit Tests.'), 'icon' => 'eye', 'task' => 'phpunit'), array('title' => jgettext('Selenium Tests'), 'description' => jgettext('Generates and executes Selenium Tests.'), 'icon' => 'eye', 'task' => 'selenium'), array('title' => jgettext('PHPDocumentor'), 'description' => jgettext('Create automatic documentation for your project with PHPDocumentor.'), 'icon' => 'eye', 'task' => 'phpdoc'), array('title' => jgettext('PHPLOC'), 'description' => jgettext('Count the lines of code you have written.'), 'icon' => 'eye', 'task' => 'phploc'), array('title' => jgettext('Statistics'), 'description' => jgettext('Shows some statistics about your project.'), 'icon' => 'chart', 'task' => 'stats'), array('title' => jgettext('Statistics2'), 'description' => jgettext('Shows some statistics about your project.'), 'icon' => 'chart', 'task' => 'stats2'), array('title' => jgettext('Reflection'), 'description' => jgettext('Displays information about your project (experimental).'), 'icon' => 'icon', 'task' => 'reflection'));
     if ('cliapp' == $this->project->type) {
         $subTasks[] = array('title' => jgettext('CLI Runner'), 'description' => jgettext('Runs a CLI Application'), 'icon' => 'icon', 'task' => 'runcli');
     }
     if ('webapp' == $this->project->type) {
         $subTasks[] = array('title' => jgettext('Web Runner'), 'description' => jgettext('Runs a Web Application'), 'icon' => 'icon', 'task' => 'runwap');
     }
     return EcrHtmlMenu::sub($subTasks);
 }
Exemplo n.º 7
0
 /**
  * Displays the submenu.
  *
  * @return string html
  */
 private function displayBar()
 {
     $subTasks = array(array('title' => jgettext('Files'), 'description' => jgettext('Deploy the project files to your server.'), 'icon' => 'deploy', 'task' => array('deploy', 'files')), array('title' => jgettext('Package'), 'description' => jgettext('Deploy you package to a server.'), 'icon' => 'package', 'task' => 'package'), array('title' => jgettext('Update server'), 'description' => jgettext('Manage your update server.'), 'icon' => 'package', 'task' => 'updateserver'));
     return EcrHtmlMenu::sub($subTasks);
 }