protected function renderContent() { $nextPageUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/checkSystem/'); $content = '<div class="MetadataView">'; $content .= '<table><tr><td>'; $content .= Zurmo::t('InstallModule', 'Welcome to Zurmo. Before getting started, we need some information ' . 'on the database. You will need to know the following items before proceeding:', LabelUtil::getZurmoLabelParam()); $content .= '<br/>'; $content .= '<br/>'; $content .= '<ul>'; $content .= '<li>' . Zurmo::t('InstallModule', 'Database host') . '</li>'; $content .= '<li>' . Zurmo::t('InstallModule', 'Database admin username') . '</li>'; $content .= '<li>' . Zurmo::t('InstallModule', 'Database admin password') . '</li>'; $content .= '<li>' . Zurmo::t('InstallModule', 'Database name') . '</li>'; $content .= '<li>' . Zurmo::t('InstallModule', 'Database username') . '</li>'; $content .= '<li>' . Zurmo::t('InstallModule', 'Database password') . '</li>'; $content .= '<li>' . Zurmo::t('InstallModule', 'Memcache host') . '</li>'; $content .= '<li>' . Zurmo::t('InstallModule', 'Memcache port number') . '</li>'; $content .= '</ul>'; $content .= Zurmo::t('InstallModule', 'In all likelihood, these items were supplied to you by your Web Host. ' . 'If you do not have this information, then you will need to contact ' . 'them before you can continue. If you\'re all ready...'); $content .= '<br/><br/>'; $content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('InstallModule', 'Click to start')), $nextPageUrl, array('class' => 'default-btn')); $content .= '</td></tr></table>'; $content .= '</div>'; return $content; }
protected function renderContent() { $imagePath = Yii::app()->themeManager->baseUrl . '/default/images/ajax-loader.gif'; $progressBarImageContent = ZurmoHtml::image($imagePath, 'Progress Bar'); $cs = Yii::app()->getClientScript(); $cs->registerScriptFile($cs->getCoreScriptUrl() . '/jquery.min.js', CClientScript::POS_END); $demoDataUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/installDemoData/'); $loginUrl = Yii::app()->createUrl('zurmo/default'); $content = '<div class="MetadataView">'; $content .= '<table><tr><td>'; $content .= '<div id="demo-data-table" style="display:none;">'; $content .= '<table><tr><td>'; $content .= Zurmo::t('InstallModule', 'The next step is to install the demo data.'); $content .= '<br/><br/>'; $content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('InstallModule', 'Click Here to install the demo data')), $demoDataUrl, array('class' => 'default-btn')); $content .= '</td></tr></table>'; $content .= '</div>'; $content .= '<div id="complete-table" style="display:none;">'; $content .= '<table><tr><td>'; $content .= Zurmo::t('InstallModule', 'Congratulations! The installation of Zurmo is complete.', LabelUtil::getZurmoLabelParam()); $content .= '<br/>'; $content .= '<br/>'; $content .= Zurmo::t('InstallModule', 'Click below to go to the login page. The username is <b>super</b>'); $content .= '<br/><br/>'; $content .= ZurmoHtml::link(ZurmoHtml::wrapLabel(Zurmo::t('ZurmoModule', 'Sign in')), $loginUrl, array('class' => 'z-button')); $content .= '</td></tr></table>'; $content .= '</div>'; $content .= '<div id="progress-table">'; $content .= '<table><tr><td class="progress-bar">'; $content .= Zurmo::t('InstallModule', 'Installation in progress. Please wait.'); $content .= '<br/>'; $content .= $progressBarImageContent; $content .= '<br/>'; $content .= '</td></tr></table>'; $content .= '</div>'; $content .= Zurmo::t('InstallModule', 'Installation Output:'); $content .= '<div id="logging-table">'; $content .= '</div>'; $content .= '</td></tr></table>'; $content .= '</div>'; return $content; }
protected function renderContent() { $cs = Yii::app()->getClientScript(); $cs->registerScriptFile($cs->getCoreScriptUrl() . '/jquery.min.js', CClientScript::POS_END); $zurmoUpgradeStepOneUrl = Yii::app()->createUrl($this->moduleId . '/' . $this->controllerId . '/stepOne/'); $content = '<div class="MetadataView">'; $content .= '<table><tr><td>'; $content .= '<div id="upgrade-step-two">'; $content .= '<table><tr><td>'; $content .= Zurmo::t('InstallModule', 'This is the Zurmo upgrade process. Please backup all files and the database before you continue.', LabelUtil::getZurmoLabelParam()); $content .= '<br/>'; $content .= Zurmo::t('InstallModule', 'Copy upgrade file to app/protected/runtime/upgrade folder and start upgrade process.'); $content .= '<br/><br/>'; $content .= ZurmoHtml::link(Zurmo::t('InstallModule', 'Click here to start upgrade'), $zurmoUpgradeStepOneUrl); $content .= '</td></tr></table>'; $content .= '</div>'; $content .= '</td></tr></table>'; $content .= '</div>'; return $content; }
public static function getDefaultMetadata() { $metadata = array('global' => array('panels' => array(array('rows' => array(array('cells' => array(array('elements' => array(array('attributeName' => 'databaseHostname', 'type' => 'Text', 'description' => Zurmo::t('InstallModule', 'Can either be a domain ' . 'name or an IP address.')))))), array('cells' => array(array('elements' => array(array('attributeName' => 'databasePort', 'type' => 'Text', 'description' => Zurmo::t('InstallModule', 'Database port.')))))), array('cells' => array(array('elements' => array(array('attributeName' => 'databaseAdminUsername', 'type' => 'Text', 'description' => Zurmo::t('InstallModule', 'Leave this blank unless you ' . 'would like to create the user and database for Zurmo to run in.', LabelUtil::getZurmoLabelParam())))))), array('cells' => array(array('elements' => array(array('attributeName' => 'databaseAdminPassword', 'type' => 'Password', 'description' => Zurmo::t('InstallModule', 'Leave this blank unless you ' . 'would like to create the user and database for Zurmo to run in.', LabelUtil::getZurmoLabelParam())))))), array('cells' => array(array('elements' => array(array('attributeName' => 'databaseName', 'type' => 'Text', 'description' => Zurmo::t('InstallModule', 'The name of the database you ' . 'want to run Zurmo in.', LabelUtil::getZurmoLabelParam())))))), array('cells' => array(array('elements' => array(array('attributeName' => 'removeExistingData', 'type' => 'CheckBox', 'description' => Zurmo::t('InstallModule', 'WARNING! - If the database ' . 'already exists the data will be completely removed. ' . 'This must be checked if you are specifying an existing database.')))))), array('cells' => array(array('elements' => array(array('attributeName' => 'databaseUsername', 'type' => 'Text', 'description' => Zurmo::t('InstallModule', 'User who can connect ' . 'to the database.')))))), array('cells' => array(array('elements' => array(array('attributeName' => 'databasePassword', 'type' => 'Password', 'description' => Zurmo::t('InstallModule', 'User`s password.')))))), array('cells' => array(array('elements' => array(array('attributeName' => 'superUserPassword', 'type' => 'Text', 'description' => Zurmo::t('InstallModule', 'Zurmo administrative password. ' . 'The username is `super`. You can change this later.', LabelUtil::getZurmoLabelParam())))))), array('cells' => array(array('elements' => array(array('attributeName' => 'memcacheHostname', 'type' => 'MemcacheText', 'description' => Zurmo::t('InstallModule', 'Memcache host name. Default ' . 'is 127.0.0.1')))))), array('cells' => array(array('elements' => array(array('attributeName' => 'memcachePortNumber', 'type' => 'MemcacheText', 'description' => Zurmo::t('InstallModule', 'Memcache port number. Default ' . 'is 11211')))))), array('cells' => array(array('elements' => array(array('attributeName' => 'installDemoData', 'type' => 'CheckBox', 'description' => Zurmo::t('InstallModule', 'Install demo data.')))))), array('cells' => array(array('elements' => array(array('attributeName' => 'hostInfo', 'type' => 'Text', 'description' => Zurmo::t('InstallModule', 'Host name where Zurmo will be installed.', LabelUtil::getZurmoLabelParam())))))), array('cells' => array(array('elements' => array(array('attributeName' => 'scriptUrl', 'type' => 'Text', 'description' => Zurmo::t('InstallModule', 'The relative path where ' . 'Zurmo will be installed.', LabelUtil::getZurmoLabelParam())))))), array('cells' => array(array('elements' => array(array('attributeName' => 'submitCrashToSentry', 'type' => 'CheckBox', 'description' => Zurmo::t('InstallModule', 'Automatically submit crash reports to Sentry.'))))))))))); return $metadata; }
/** * Module translation parameters are used by Zurmo::t as the third parameter to define the module labels. These * parameter values resolve any custom module label names that have been specified in the module metadata. * @return array of key/value module label pairings. * Caches results to improve performance. */ public function getAllModuleLabelsAsTranslationParameters() { try { $moduleLabelTranslationParameters = GeneralCache::getEntry('moduleLabelTranslationParameters' . Yii::app()->language); return $moduleLabelTranslationParameters; } catch (NotFoundException $e) { $modules = Module::getModuleObjects(); $params = LabelUtil::getZurmoLabelParam(); foreach ($modules as $module) { $params[get_class($module) . 'SingularLabel'] = $module::getModuleLabelByTypeAndLanguage('Singular', Yii::app()->language); $params[get_class($module) . 'SingularLowerCaseLabel'] = $module::getModuleLabelByTypeAndLanguage('SingularLowerCase', Yii::app()->language); $params[get_class($module) . 'PluralLabel'] = $module::getModuleLabelByTypeAndLanguage('Plural', Yii::app()->language); $params[get_class($module) . 'PluralLowerCaseLabel'] = $module::getModuleLabelByTypeAndLanguage('PluralLowerCase', Yii::app()->language); } GeneralCache::cacheEntry('moduleLabelTranslationParameters' . Yii::app()->language, $params); return $params; } }
protected function getSubtitle() { return Zurmo::t('InstallModule', 'Zurmo Installation', LabelUtil::getZurmoLabelParam()); }