/**
  * Constructs a new connection form view
  * @param zibo\database\admin\form\ConnectionForm $form
  * @param string $title
  * @return null
  */
 public function __construct(ConnectionForm $form, $title)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('form', $form);
     $this->set('title', $title);
     $this->setPageTitle($title, true);
 }
예제 #2
0
 public function __construct($url, array $methods)
 {
     parent::__construct('xmlrpc/server');
     $this->set('serverUrl', $url);
     $this->set('serverMethods', $methods);
     $this->addStyle('web/styles/xmlrpc/server.css');
 }
예제 #3
0
 /**
  * Constructs the queue overview
  * @param zibo\queue\table\QueueTable $table The table with the overview
  * @return null
  */
 public function __construct(QueueTable $table)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('table', $table);
     $this->addJavascript(self::SCRIPT_TABLE);
     $this->addStyle(self::STYLE);
 }
예제 #4
0
 /**
  * Construct a new error report view
  * @param zibo\error\report\form\ReportForm $form
  * @param string $report
  * @return null
  */
 public function __construct(ReportForm $form, $report)
 {
     parent::__construct('error/report');
     $this->set('form', $form);
     $this->set('report', $report);
     $this->addStyle('web/styles/error/report.css');
 }
예제 #5
0
 /**
  * Constructs a new XML-RPC client view
  * @param zibo\xmlrpc\form\ClientForm $form The form of the client
  * @param zibo\library\xmlrpc\Request $request
  * @param zibo\library\xmlrpc\Response $response
  * @param string $responseString
  * @param float $time Time spent on the request in seconds
  * @return null
  */
 public function __construct(ClientForm $form, Request $request = null, Response $response = null, $responseString = null, $time = null)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('form', $form);
     $this->set('time', $time);
     $this->set('requestString', null);
     $this->set('responseString', null);
     if ($request) {
         $this->set('requestString', String::addLineNumbers(trim($request->getXmlString())));
     }
     if ($responseString && !$response) {
         $this->set('responseString', String::addLineNumbers(trim($responseString)));
     } elseif ($response) {
         $this->set('responseString', String::addLineNumbers(trim($response->getXmlString())));
         $errorCode = $response->getErrorCode();
         if ($errorCode) {
             $this->set('error', $errorCode . ': ' . $response->getErrorMessage());
         } else {
             $parser = new ParameterParser();
             $result = $parser->unparse($response->getValue(), true);
             $this->set('result', $result);
         }
     }
     $this->addStyle(self::STYLE);
 }
예제 #6
0
 /**
  * Constructs a model detail view
  * @param zibo\library\orm\model\Model $model
  * @return null
  */
 public function __construct(Model $model, ModelFieldTable $fieldTable, ModelFieldOrderForm $orderForm = null, $editModelAction = null, $addFieldsAction = null, $editFormatAction = null, $editIndexAction = null)
 {
     parent::__construct(self::TEMPLATE);
     $meta = $model->getMeta();
     $modelTable = $meta->getModelTable();
     $modelClass = get_class($model);
     $dataClass = $meta->getDataClassName();
     $indexTable = new SimpleModelIndexTable($modelTable);
     $formatTable = new SimpleDataFormatTable($modelTable);
     $this->set('modelTable', $modelTable);
     $this->set('modelClass', $modelClass);
     $this->set('dataClass', $dataClass);
     $this->set('fieldTable', $fieldTable);
     $this->set('formatTable', $formatTable);
     $this->set('indexTable', $indexTable);
     $this->set('orderForm', $orderForm);
     $this->set('editModelAction', $editModelAction);
     $this->set('addFieldsAction', $addFieldsAction);
     $this->set('editFormatAction', $editFormatAction);
     $this->set('editIndexAction', $editIndexAction);
     $this->addJavascript(JQueryModule::SCRIPT_JQUERY_UI);
     $this->addJavascript(self::SCRIPT_TABLE);
     $this->addJavascript(self::SCRIPT_BUILDER);
     $this->addInlineJavascript('ziboOrmInitializeModelDetail();');
     $this->addStyle(self::STYLE_BUILDER);
 }
예제 #7
0
 /**
  * Construct this view
  * @param joppa\model\Node $node the node which is to be rendered
  * @param string $title title of the site (optional)
  * @return null
  */
 public function __construct(Node $node, $title = null)
 {
     $theme = $node->getTheme();
     $template = $theme->getTemplate();
     parent::__construct(null, $template);
     $resourceHandler = new ThemedResourceHandler($theme->getName());
     $this->setResourceHandler($resourceHandler);
     $style = $theme->getStyle();
     if ($style) {
         $this->addStyle($style);
     }
     if ($title) {
         $this->setTitle($title);
         $this->setPageTitle($node->name);
     } else {
         $this->setTitle($node->name);
     }
     $localeSuffix = '.' . $node->dataLocale;
     $metaDescription = $node->settings->get(NodeSettingModel::SETTING_META_DESCRIPTION . $localeSuffix);
     if ($metaDescription) {
         $this->addMeta(new Meta(Meta::DESCRIPTION, $metaDescription));
     }
     $metaKeywords = $node->settings->get(NodeSettingModel::SETTING_META_KEYWORDS . $localeSuffix);
     if ($metaKeywords) {
         $this->addMeta(new Meta(Meta::KEYWORDS, $metaKeywords));
     }
     $this->node = $node;
 }
예제 #8
0
 public function __construct(ModelTable $table)
 {
     parent::__construct('orm/builder/index');
     $this->set('table', $table);
     $this->addJavascript(self::SCRIPT_TABLE);
     $this->addStyle(self::STYLE_BUILDER);
 }
예제 #9
0
 /**
  * Constructs the queue detail view
  * @param zibo\queue\model\data\QueueData $data
  * @param string $statusUrl
  * @return null
  */
 public function __construct(QueueData $data, $backUrl, $statusUrl)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('data', $data);
     $this->set('backUrl', $backUrl);
     $this->addJavascript(self::SCRIPT_TABLE);
     $this->addStyle(self::STYLE);
 }
예제 #10
0
 /**
  * Constructs a new security view
  * @param zibo\admin\table\SecurityTable $table
  * @return null
  */
 public function __construct(SecurityTable $table)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('table', $table);
     $this->addStyle(self::STYLE_SECURITY);
     $this->addJavascript(self::SCRIPT_SECURITY);
     $this->addInlineJavascript('ziboAdminInitializeSecurity();');
 }
예제 #11
0
 /**
  * Constructs a new view for the model wizard
  * @param zibo\core\View $wizardView
  * @return null
  */
 public function __construct(View $wizardView = null)
 {
     parent::__construct(self::TEMPLATE);
     if ($wizardView) {
         $this->setSubview('wizard', $wizardView);
     }
     $this->addStyle(self::STYLE_WIZARD);
     $this->addJavascript(self::SCRIPT_WIZARD);
 }
예제 #12
0
 /**
  * Constructs a new terminal view
  * @param zibo\terminal\form\TerminalForm $form The form of the terminal
  * @param string $path The current path
  * @return null
  */
 public function __construct(TerminalForm $form, $path)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('form', $form);
     $this->set('path', $path);
     $this->addStyle(self::STYLE);
     $this->addJavascript(self::SCRIPT);
     $this->addInlineJavascript('zibo.terminal.init();');
 }
예제 #13
0
 /**
  * Constructs a new locales view
  * @param string $sortAction URL where the dnd of the locales will point to
  * @param array $locales Array with Locale objects
  * @return null
  */
 public function __construct($sortAction, array $locales)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('locales', $locales);
     $this->addStyle(self::STYLE_LOCALES);
     $this->addJavascript(self::SCRIPT_LOCALES);
     $this->addJavascript(Module::SCRIPT_JQUERY_UI);
     $this->addInlineJavascript('ziboAdminInitializeLocales("' . $sortAction . '");');
 }
예제 #14
0
 /**
  * Constructs a new log view
  * @return null
  */
 public function __construct($log, $urlBack)
 {
     parent::__construct(self::TEMPLATE);
     $table = new LogChangeTable($log->changes);
     $this->set('log', $log);
     $this->set('table', $table);
     $this->set('urlBack', $urlBack);
     $this->addStyle(ScaffoldLogView::STYLE);
 }
예제 #15
0
 /**
  * Construct a new base view
  * @param zibo\core\View $managerView
  * @param string $managerName
  * @return null
  */
 public function __construct(View $managerView = null, $managerName = null)
 {
     parent::__construct(self::TEMPLATE);
     $sidebar = $this->getSidebar();
     $sidebar->addPanel(new SidebarView($managerName));
     if ($managerView) {
         $this->setSubview('manager', $managerView);
     }
 }
예제 #16
0
 /**
  * Constructs a new modules view
  * @param zibo\admin\form\ModuleInstallForm $form
  * @param zibo\admin\table\ModulesTable $table
  * @return null
  */
 public function __construct(ModuleInstallForm $form, ModulesTable $table)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('table', $table);
     $this->sidebar->addPanel(new FormView($form));
     $this->addStyle(self::STYLE_MODULES);
     $this->addJavascript(self::SCRIPT_MODULES);
     $this->addJavascript(self::SCRIPT_TABLE);
     $this->addInlineJavascript('ziboAdminInitializeModules();');
 }
예제 #17
0
 /**
  * Constructs a new cron view
  * @param zibo\cron\table\CronJobTable $table Table with an overview of the cron jobs
  * @param zibo\cron\form\CronProcessForm $form Form to start or stop the cron process
  * @param string $command Command to start the cron process manually
  * @param boolean $isRunning Flag to see if the cron is currently running
  * @return null
  */
 public function __construct(CronJobTable $table, CronProcessForm $form, $command, $isRunning)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('table', $table);
     $this->set('form', $form);
     $this->set('command', $command);
     $this->set('isRunning', $isRunning);
     $this->setPageTitle(Module::TRANSLATION_CRON, true);
     $this->addJavascript(self::SCRIPT_TABLE);
 }
예제 #18
0
 /**
  * Constructs a new export view
  * @return null
  */
 public function __construct()
 {
     parent::__construct(null, self::TEMPLATE);
     $this->addStyle(self::STYLE_EXPORT);
     $this->removeStyle(self::STYLE_BASE);
     $this->addInlineJavascript("window.print();");
     $this->headers = array();
     $this->rows = array();
     $this->zebraIndex = 0;
 }
예제 #19
0
 /**
  * Construct a new scaffold index view
  * @param boolean $isLocalized Flag to set whether the data is localized
  * @param zibo\library\html\table\Table $table Table with the model data
  * @param string $title Title for the page
  * @param array $actions Array with the URL for the action as key and the label as value
  * @return null
  */
 public function __construct(ModelMeta $meta, Table $table, $title, array $actions = null)
 {
     parent::__construct(self::TEMPLATE);
     $this->isLocalized = $meta->isLocalized();
     $this->set('table', $table);
     $this->set('title', $title);
     $this->set('actions', $actions);
     $this->setPageTitle($title);
     $this->addJavascript(self::SCRIPT_TABLE);
 }
예제 #20
0
 /**
  * Constructs a new connections view
  * @param zibo\database\admin\table\ConnectionTable $table
  * @param array $protocols
  * @param string $urlAdd
  * @param zibo\database\admin\form\ConnectionDefaultForm $defaultConnectionForm
  * @return null
  */
 public function __construct(ConnectionTable $table, array $protocols, $urlAdd = null, ConnectionDefaultForm $defaultConnectionForm = null)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('table', $table);
     $this->set('formDefault', $defaultConnectionForm);
     $this->set('protocols', $protocols);
     $this->set('urlAdd', $urlAdd);
     $this->addStyle(self::STYLE);
     $this->addJavascript(self::SCRIPT_TABLE);
 }
예제 #21
0
 public function __construct(SpiderForm $form, $statusUrl = null, $reportUrl = null)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('form', $form);
     $this->addStyle(Module::STYLE_JQUERY_UI);
     $this->addStyle('web/styles/spider/spider.css');
     $this->addJavascript(Module::SCRIPT_JQUERY_UI);
     $this->addJavascript('web/scripts/spider/spider.js');
     $this->addInlineJavascript('ziboSpiderInitialize("' . $statusUrl . '", "' . $reportUrl . '");');
 }
예제 #22
0
 /**
  * Construct the main dashboard view
  * @param array $widgets
  * @param string $returnAction
  * @param string $saveAction
  * @return null
  */
 public function __construct(array $widgets, $returnAction, $saveAction)
 {
     parent::__construct('dashboard/widget.add');
     $translator = I18n::getInstance()->getTranslator();
     $saveMessage = $translator->translate('dashboard.message.added');
     $this->set('returnAction', $returnAction);
     $this->set('widgets', $widgets);
     $this->addStyle(Module::STYLE_DASHBOARD);
     $this->addJavascript(Module::SCRIPT_DASHBOARD);
     $this->addInlineJavascript('dashboardSaveAction = "' . $saveAction . '";');
     $this->addInlineJavascript('dashboardSaveMessage = "' . $saveMessage . '";');
 }
예제 #23
0
 /**
  * Constructs a new security view
  * @param zibo\admin\table\SecurityTable $table
  * @return null
  */
 public function __construct(ProfileForm $form)
 {
     parent::__construct(self::TEMPLATE);
     $subviewNames = array();
     $subviews = $form->getHookViews();
     foreach ($subviews as $index => $subview) {
         $subviewName = 'profileHook' . $index;
         $subviewNames[] = $subviewName;
         $this->setSubview($subviewName, $subview);
     }
     $this->set('form', $form);
     $this->set('subviewNames', $subviewNames);
 }
예제 #24
0
 /**
  * Construct the base API view
  * @param string $template template for the engine
  * @param zibo\api\form\SearchForm $form the search form
  * @param array $namespaces array with the current namespaces
  * @param string $namespaceAction URL to the detail of a namespace
  * @param array $classes array with the current classes
  * @param string $classAction URL to the detail of a class
  * @param string $currentNamespace name of the current namespace
  * @param string $currentClass name of the current class
  * @return null
  */
 public function __construct($template, SearchForm $searchForm, array $namespaces, $namespaceAction, array $classes = null, $classAction = null, $currentNamespace = null, $currentClass = null)
 {
     parent::__construct($template);
     $sidebarView = new SidebarView($searchForm, $namespaces, $namespaceAction, $classes, $classAction, $currentNamespace, $currentClass);
     $this->sidebar->addPanel($sidebarView);
     $this->set('namespaces', $namespaces);
     $this->set('namespaceAction', $namespaceAction);
     $this->set('currentNamespace', $currentNamespace);
     $this->set('classes', $classes);
     $this->set('classAction', $classAction);
     $this->set('currentClass', $currentClass);
     $this->addStyle(self::STYLE_API);
 }
예제 #25
0
 /**
  * Constructs a new scaffold form view
  * @param zibo\library\orm\model\meta\ModelMeta $meta Meta of the model
  * @param zibo\library\html\form\Form $form Form of the data
  * @param string $title Title for the view
  * @param mixed $data Data object set to the form
  * @param string $localizeAction URL to change the content locale
  * @param string $template Provide to override the default template
  * @return null
  */
 public function __construct(ModelMeta $meta, Form $form, $title, $data = null, $localizeAction = null, $template = null)
 {
     if (!$template) {
         $template = self::TEMPLATE;
     }
     parent::__construct($template);
     $this->isLocalized = $meta->isLocalized();
     $this->set('title', $title);
     $this->set('data', $data);
     $this->setPageTitle($title);
     $this->setForm($form);
     $this->setLocalizeSubview($meta, $data, $localizeAction);
     $this->setLogSubview($meta, $data);
 }
예제 #26
0
 public function __construct(Dashboard $dashboard, $orderAction, $minimizeMaximizeAction, $closeAction, $propertiesAction = null, $addAction = null)
 {
     $this->dashboard = $dashboard;
     $this->propertiesAction = $propertiesAction;
     parent::__construct('dashboard/dashboard');
     $this->set('addAction', $addAction);
     $this->addJavascript(JQueryModule::SCRIPT_JQUERY_UI);
     $this->addJavascript(Module::SCRIPT_DASHBOARD);
     $this->addInlineJavascript('dashboardCloseAction = "' . $closeAction . '";');
     $this->addInlineJavascript('dashboardMinimizeMaximizeAction = "' . $minimizeMaximizeAction . '";');
     $this->addInlineJavascript('dashboardOrderAction = "' . $orderAction . '";');
     $this->addInlineJavascript('dashboardInitialize();');
     $this->addStyle(JQueryModule::STYLE_JQUERY_UI);
     $this->addStyle(Module::STYLE_DASHBOARD);
 }
예제 #27
0
 /**
  * Construct this view
  * @param joppa\form\backend\SiteSelectForm $siteSelectForm
  * @param joppa\model\Site $site the current site (optional)
  * @param joppa\model\Node $node the current node (optional)
  * @param string $template template file to include as content (optional)
  */
 public function __construct(SiteSelectForm $siteSelectForm, Site $site = null, Node $node = null, $template = null)
 {
     parent::__construct('joppa/backend/index');
     $this->set('_templateContent', $template);
     if ($site) {
         $this->setTitle($site->node->name);
     }
     $sidebar = $this->getSidebar();
     $sidebar->addPanel(new SidebarView($siteSelectForm, $site, $node));
     $this->addJavascript(JQuery::SCRIPT_JQUERY_UI);
     $this->addJavascript(JQueryContextMenu::SCRIPT_JQUERY_CONTEXT_MENU);
     $this->addJavascript(self::SCRIPT_JOPPA);
     $this->addInlineJavascript('joppaInitializeActionMenus();');
     $this->addStyle(JQuery::STYLE_JQUERY_UI);
     $this->addStyle(JQueryContextMenu::STYLE_JQUERY_CONTEXT_MENU);
     $this->addStyle(self::STYLE);
 }
예제 #28
0
 /**
  * Constructs a new system view
  * @param array $ziboConfiguration The complete Zibo configuration
  * @param array $baseUrl The base URL of the installation
  * @param array $routes Array with Route objects
  * @param zibo\library\SoftwareDetector $softwareDetector Instance of a software detector
  * @param integer $numVistors Number of visitors
  * @param integer $numUsers Number of users
  * @param integer $numGuests Number of guests
  * @param array $currentUsers The names of the current users
  * @return null
  */
 public function __construct(array $ziboConfiguration, $baseUrl, array $routes, SoftwareDetector $softwareDetector, $numVisitors, $numUsers, $numGuests, $currentUsers)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('ziboConfiguration', $ziboConfiguration);
     $this->set('ziboVersion', Zibo::VERSION);
     $this->set('phpVersion', phpversion());
     $this->set('baseUrl', $baseUrl);
     $this->set('routes', $routes);
     $this->set('osName', $softwareDetector->getOperatingSystemName());
     $this->set('osVersion', $softwareDetector->getOperatingSystemVersion());
     $this->set('browserName', $softwareDetector->getBrowserName());
     $this->set('browserVersion', $softwareDetector->getBrowserVersion());
     $this->set('userAgent', $softwareDetector->getUserAgent());
     $this->set('ip', $_SERVER['REMOTE_ADDR']);
     $this->set('numVisitors', $numVisitors);
     $this->set('numUsers', $numUsers);
     $this->set('numGuests', $numGuests);
     $this->set('currentUsers', $currentUsers);
     $this->addStyle(self::STYLE_SYSTEM);
     $this->addJavascript(self::SCRIPT_SYSTEM);
     $this->addInlineJavascript('ziboAdminInitializeSystem();');
 }
예제 #29
0
 /**
  * Constructs a new switch user view
  * @param zibo\user\form\UserSwitchForm $form
  * @return null
  */
 public function __construct(UserSwitchForm $form)
 {
     parent::__construct(self::TEMPLATE);
     $this->set('form', $form);
     $this->addInlineJavascript('$("#formUserSwitchUsername").focus();');
 }
 /**
  * Constructs a new abstract repository view
  * @param string $template The template for the view
  * @return null
  */
 public function __construct($template)
 {
     parent::__construct($template);
     $this->addStyle(self::STYLE);
     $this->addJavascript(self::SCRIPT_TABLE);
 }