当前位置: 首页>>代码示例>>PHP>>正文


PHP FabrikWorker::j3方法代码示例

本文整理汇总了PHP中FabrikWorker::j3方法的典型用法代码示例。如果您正苦于以下问题:PHP FabrikWorker::j3方法的具体用法?PHP FabrikWorker::j3怎么用?PHP FabrikWorker::j3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FabrikWorker的用法示例。


在下文中一共展示了FabrikWorker::j3方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 /**
  * Display
  *
  * @param   string  $tmpl  Template
  *
  * @return  void
  */
 public function display($tmpl = 'default')
 {
     $srcs = FabrikHelperHTML::framework();
     $app = JFactory::getApplication();
     $input = $app->input;
     FabrikHelperHTML::script($srcs);
     $model = $this->getModel();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model->setId($input->get('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0))));
     $visualization = $model->getVisualization();
     $params = $model->getParams();
     $pluginManager = JModelLegacy::getInstance('Pluginmanager', 'FabrikFEModel');
     $plugin = $pluginManager->getPlugIn($visualization->plugin, 'visualization');
     $plugin->setRow($visualization);
     if ($visualization->published == 0) {
         return JError::raiseWarning(500, FText::_('COM_FABRIK_SORRY_THIS_VISUALIZATION_IS_UNPUBLISHED'));
     }
     // Plugin is basically a model
     $pluginTask = $input->get('plugintask', 'render', 'request');
     // @FIXME cant set params directly like this, but I think plugin model setParams() is not right
     $plugin->params = $params;
     $tmpl = $plugin->getParams()->get('calendar_layout', $tmpl);
     $plugin->{$pluginTask}($this);
     $this->plugin = $plugin;
     $viewName = $this->getName();
     $jTmplFolder = FabrikWorker::j3() ? 'tmpl' : 'tmpl25';
     $this->addTemplatePath($this->_basePath . '/plugins/' . $this->_name . '/' . $plugin->_name . '/' . $jTmplFolder . '/' . $tmpl);
     $root = $app->isAdmin() ? JPATH_ADMINISTRATOR : JPATH_SITE;
     $this->addTemplatePath($root . '/templates/' . $app->getTemplate() . '/html/com_fabrik/visualization/' . $plugin->_name . '/' . $tmpl);
     $ab_css_file = JPATH_SITE . '/plugins/fabrik_visualization/' . $plugin->_name . '/tmpl/' . $tmpl . '/template.css';
     if (JFile::exists($ab_css_file)) {
         JHTML::stylesheet('template.css', 'plugins/fabrik_visualization/' . $plugin->_name . '/tmpl/' . $tmpl . '/', true);
     }
     echo parent::display();
 }
开发者ID:ankaau,项目名称:GathBandhan,代码行数:42,代码来源:view.html.php

示例2: render

 /**
  * Draws the html form element
  *
  * @param   array  $data           To pre-populate element with
  * @param   int    $repeatCounter  Repeat group counter
  *
  * @return  string	elements html
  */
 public function render($data, $repeatCounter = 0)
 {
     $params = $this->getParams();
     $tmp = $this->_getOptions($data, $repeatCounter, true);
     $layoutName = FabrikWorker::j3() ? 'form' : 'form-25';
     $layout = $this->getLayout($layoutName);
     $layoutData = new stdClass();
     $layoutData->id = $this->getHTMLId($repeatCounter);
     $layoutData->labels = array();
     $layoutData->name = $this->getHTMLName($repeatCounter);
     $layoutData->fieldType = $params->get('fieldType', 'textarea');
     $layoutData->editable = $this->isEditable();
     $layoutData->rowid = $this->getFormModel()->getRowId();
     $layoutData->primaryKey = $this->getGroupModel()->isJoin() ? $this->getJoinedGroupPkVal($repeatCounter) : $layoutData->rowid;
     $layoutData->rows = $tmp;
     $layoutData->model = $this;
     $layoutData->labels = array();
     /*
     foreach ($tmp as $row)
     {
     	$layoutData->labels[] = $this->getDisplayLabel($row);
     }
     */
     return $layout->render($layoutData);
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:33,代码来源:notes.php

示例3: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 public function display($tpl = 'default')
 {
     $model = $this->getModel();
     $j3 = FabrikWorker::j3();
     $app = JFactory::getApplication();
     $input = $app->input;
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $id = $input->get('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0)));
     $model->setId($id);
     if (!$model->canView()) {
         echo FText::_('JERROR_ALERTNOAUTHOR');
         return false;
     }
     $this->id = $id;
     $this->row = $this->get('Visualization');
     $this->rows = $this->get('Rows');
     $this->containerId = $this->get('ContainerId');
     $this->calName = $this->get('VizName');
     $this->params = $model->getParams();
     $tpl = $j3 ? 'bootstrap' : $tpl;
     $this->_setPath('template', JPATH_SITE . '/plugins/fabrik_visualization/approvals/views/approvals/tmpl/' . $tpl);
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/approvals/views/approvals/tmpl/' . $tpl . '/template.css');
     $ref = $model->getJSRenderContext();
     $js = "var {$ref} = new fbVisApprovals('approvals_" . $id . "');\n";
     $js .= "Fabrik.addBlock('" . $ref . "', {$ref});\n";
     $js .= $model->getFilterJs();
     $srcs = FabrikHelperHTML::framework();
     $srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
     $srcs['Approvals'] = 'plugins/fabrik_visualization/approvals/approvals.js';
     FabrikHelperHTML::iniRequireJs($model->getShim());
     FabrikHelperHTML::script($srcs, $js);
     $text = $this->loadTemplate();
     FabrikHelperHTML::runContentPlugins($text);
     echo $text;
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:42,代码来源:view.html.php

示例4: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 public function display($tpl = 'default')
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $j3 = FabrikWorker::j3();
     $srcs = FabrikHelperHTML::framework();
     $model = $this->getModel();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model->setId($input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0))));
     $this->row = $model->getVisualization();
     if (!$model->canView()) {
         echo FText::_('JERROR_ALERTNOAUTHOR');
         return false;
     }
     $this->js = $this->get('JS');
     $viewName = $this->getName();
     $params = $model->getParams();
     $this->params = $params;
     $pluginManager = JModelLegacy::getInstance('Pluginmanager', 'FabrikFEModel');
     $plugin = $pluginManager->getPlugIn('slideshow', 'visualization');
     $this->showFilters = $model->showFilters();
     $this->filters = $this->get('Filters');
     $this->filterFormURL = $this->get('FilterFormURL');
     $this->params = $model->getParams();
     $this->containerId = $this->get('ContainerId');
     $srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
     if ($this->get('RequiredFiltersFound')) {
         $srcs['Slideshow2'] = 'components/com_fabrik/libs/slideshow2/js/slideshow.js';
         $mode = $params->get('slideshow_viz_type', 1);
         switch ($mode) {
             case 1:
                 break;
             case 2:
                 $srcs['Kenburns'] = 'components/com_fabrik/libs/slideshow2/js/slideshow.kenburns.js';
                 break;
             case 3:
                 $srcs['Push'] = 'components/com_fabrik/libs/slideshow2/js/slideshow.push.js';
                 break;
             case 4:
                 $srcs['Fold'] = 'components/com_fabrik/libs/slideshow2/js/slideshow.fold.js';
                 break;
             default:
                 break;
         }
         JHTML::stylesheet('components/com_fabrik/libs/slideshow2/css/slideshow.css');
         $srcs['SlideShow'] = 'plugins/fabrik_visualization/slideshow/slideshow.js';
     }
     FabrikHelperHTML::slimbox();
     FabrikHelperHTML::iniRequireJs($model->getShim());
     FabrikHelperHTML::script($srcs, $this->js);
     //FabrikHelperHTML::slimbox();
     $tpl = $j3 ? 'bootstrap' : 'default';
     $tpl = $params->get('slideshow_viz_layout', $tpl);
     $tmplpath = $model->pathBase . 'slideshow/views/slideshow/tmpl/' . $tpl;
     $this->_setPath('template', $tmplpath);
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/slideshow/views/slideshow/tmpl/' . $tpl . '/template.css');
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/slideshow/views/slideshow/tmpl/' . $tpl . '/custom.css');
     echo parent::display();
 }
开发者ID:glauberm,项目名称:cinevi,代码行数:66,代码来源:view.html.php

示例5: getImageName

 /**
  * Get button image
  *
  * @since   3.1b
  *
  * @return   string  image
  */
 protected function getImageName()
 {
     $img = parent::getImageName();
     if (FabrikWorker::j3() && $img === 'php.png') {
         $img = 'lightning';
     }
     return $img;
 }
开发者ID:glauberm,项目名称:cinevi,代码行数:15,代码来源:php.php

示例6: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  */
 protected function getInput()
 {
     JText::script('COM_FABRIK_SUBOPTS_VALUES_ERROR');
     $default = new stdClass();
     $default->sub_values = array();
     $default->sub_labels = array();
     $default->sub_initial_selection = array();
     $opts = $this->value == '' ? $default : JArrayHelper::toObject($this->value);
     $j3 = FabrikWorker::j3();
     if ($j3) {
         $delButton = '<div class="btn-group">';
         $delButton .= '<a class="btn btn-success" href="#" data-button="addSuboption"><i class="icon-plus"></i> </a>';
         $delButton .= '<a class="btn btn-danger" href="#" data-button="deleteSuboption"><i class="icon-minus"></i> </a>';
         $delButton .= '</div>';
     } else {
         $delButton = '<a class="removeButton" href="#"><i class="icon-minus"></i> ' . FText::_('COM_FABRIK_DELETE') . '</a>';
     }
     if (is_array($opts)) {
         $opts['delButton'] = $delButton;
     } else {
         $opts->delButton = $delButton;
     }
     $opts->id = $this->id;
     $opts->j3 = $j3;
     $opts->defaultMax = (int) $this->getAttribute('default_max', 0);
     $opts = json_encode($opts);
     $script[] = "window.addEvent('domready', function () {";
     $script[] = "\tnew Suboptions('{$this->name}', {$opts});";
     $script[] = "});";
     FabrikHelperHTML::script('administrator/components/com_fabrik/models/fields/suboptions.js', implode("\n", $script));
     $html = array();
     if (!$j3) {
         $html[] = '<div style="float:left;width:100%">';
     }
     $html[] = '<table class="table table-striped" style="width: 100%" id="' . $this->id . '">';
     $html[] = '<thead>';
     $html[] = '<tr style="text-align:left">';
     $html[] = '<th style="width: 5%"></th>';
     $html[] = '<th style="width: 30%">' . FText::_('COM_FABRIK_VALUE') . '</th>';
     $html[] = '<th style="width: 30%">' . FText::_('COM_FABRIK_LABEL') . '</th>';
     $html[] = '<th style="width: 10%">' . FText::_('COM_FABRIK_DEFAULT') . '</th>';
     if ($j3) {
         $html[] = '<th style="width: 20%"><a class="btn btn-success" href="#" data-button="addSuboption"><i class="icon-plus"></i> </a></th>';
     }
     $html[] = '</tr>';
     $html[] = '</thead>';
     $html[] = '<tbody></tbody>';
     $html[] = '</table>';
     if (!$j3) {
         $html[] = '<ul id="sub_subElementBody" class="subelements">';
         $html[] = '<li></li>';
         $html[] = '</ul>';
         $html[] = '<a class="addButton" href="#" id="addSuboption"><i class="icon-plus"></i> ' . FText::_('COM_FABRIK_ADD') . '</a></div>';
     }
     FabrikHelperHTML::framework();
     FabrikHelperHTML::iniRequireJS();
     return implode("\n", $html);
 }
开发者ID:LGBGit,项目名称:tierno,代码行数:63,代码来源:suboptions.php

示例7: tagify

 /**
  * Tagify a string
  *
  * @param   string  $data  Tagify
  *
  * @return  string	Tagified string
  */
 protected function tagify($data)
 {
     $name = $this->getFullName(true, false);
     $params = $this->getParams();
     $listModel = $this->getlistModel();
     $filters = $listModel->getFilterArray();
     $fkeys = JArrayHelper::getValue($filters, 'key', array());
     $data = explode(",", strip_tags($data));
     $tags = array();
     $url = $params->get('textarea_tagifyurl');
     if ($url == '') {
         $url = $_SERVER['REQUEST_URI'];
         $bits = explode('?', $url);
         $root = JArrayHelper::getValue($bits, 0, '', 'string');
         $bits = JArrayHelper::getValue($bits, 1, '', 'string');
         $bits = explode("&", $bits);
         $fullName = $this->getFullName(true, false);
         for ($b = count($bits) - 1; $b >= 0; $b--) {
             $parts = explode("=", $bits[$b]);
             if (count($parts) > 1) {
                 $key = FabrikString::ltrimword(FabrikString::safeColNameToArrayKey($parts[0]), '&');
                 if ($key == $fullName) {
                     unset($bits[$b]);
                 }
                 if ($key == $fullName . '[value]') {
                     unset($bits[$b]);
                 }
                 if ($key == $fullName . '[condition]') {
                     unset($bits[$b]);
                 }
             }
         }
     }
     $url = $root . '?' . implode('&', $bits);
     // $$$ rob 24/02/2011 remove duplicates from tags
     $data = array_unique($data);
     $img = FabrikWorker::j3() ? 'bookmark.png' : 'tag.png';
     $icon = FabrikHelperHTML::image($img, 'form', @$this->tmpl, array('alt' => 'tag'));
     foreach ($data as $d) {
         $d = trim($d);
         if ($d != '') {
             if (trim($params->get('textarea_tagifyurl')) == '') {
                 $qs = strstr($url, '?');
                 if (substr($url, -1) === '?') {
                     $thisurl = $url . $name . '[value]=' . $d;
                 } else {
                     $thisurl = strstr($url, '?') ? $url . '&' . $name . '[value]=' . urlencode($d) : $url . '?' . $name . '[value]=' . urlencode($d);
                 }
                 $thisurl .= '&' . $name . '[condition]=CONTAINS';
                 $thisurl .= '&resetfilters=1';
             } else {
                 $thisurl = str_replace('{tag}', urlencode($d), $url);
             }
             $tags[] = '<a href="' . $thisurl . '" class="fabrikTag">' . $icon . $d . '</a>';
         }
     }
     return implode(' ', $tags);
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:65,代码来源:textarea.php

示例8: getOptions

 /**
  * Method to get the field options.
  *
  * @return  array  The field option objects.
  */
 protected function getOptions()
 {
     $view = $this->element['view'] ? $this->element['view'] : 'list';
     if (FabrikWorker::j3()) {
         $this->element['directory'] = $this->directory = '/components/com_fabrik/views/' . $view . '/tmpl/';
     } else {
         $this->element['directory'] = '/components/com_fabrik/views/' . $view . '/tmpl25/';
     }
     return parent::getOptions();
 }
开发者ID:LGBGit,项目名称:tierno,代码行数:15,代码来源:fabriktemplate.php

示例9: display

 /**
  * Still a wip access the view of subscribed notifications with url:
  * http://localhost/fabrik30x/index.php?option=com_fabrik&task=cron.display&id=3
  *
  * deletion not routing right yet
  *
  * @param   string  $tpl  Template
  *
  * @return  void
  */
 public function display($tpl = 'default')
 {
     $model = $this->getModel();
     $model->loadLang();
     $this->rows = $model->getUserNotifications();
     $this->id = $model->getId();
     $j3 = FabrikWorker::j3();
     $viewName = $this->getName();
     $tpl = $j3 ? 'bootstrap' : 'default';
     $tmplpath = JPATH_ROOT . '/plugins/fabrik_cron/notification/views/notification/tmpl/' . $tpl;
     $this->_setPath('template', $tmplpath);
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_cron/notification/views/notification/tmpl/' . $tpl . '/template.css');
     echo parent::display();
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:24,代码来源:view.html.php

示例10: display

 /**
  * Execute and display a template script.
  *
  * @param   string $tpl The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 public function display($tpl = 'default')
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $j3 = FabrikWorker::j3();
     $srcs = FabrikHelperHTML::framework();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model = $this->getModel();
     $id = $input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0)));
     $model->setId($id);
     $row = $model->getVisualization();
     if (!$model->canView()) {
         echo FText::_('JERROR_ALERTNOAUTHOR');
         return false;
     }
     $js = $model->render();
     $this->containerId = $this->get('ContainerId');
     $this->row = $row;
     $this->showFilters = $input->getInt('showfilters', 1) === 1 ? 1 : 0;
     $this->filters = $model->getFilters();
     $this->advancedSearch = $model->getAdvancedSearchLink();
     $this->filterFormURL = $model->getFilterFormURL();
     $params = $model->getParams();
     $this->params = $params;
     $this->width = $params->get('timeline_width', '700');
     $this->height = $params->get('timeline_height', '300');
     $tpl = $j3 ? 'bootstrap' : 'default';
     $tpl = $params->get('timeline_layout', $tpl);
     $tmplpath = '/plugins/fabrik_visualization/timeline/views/timeline/tmpl/' . $tpl;
     $this->_setPath('template', JPATH_ROOT . $tmplpath);
     JHTML::stylesheet('media/com_fabrik/css/list.css');
     FabrikHelperHTML::stylesheetFromPath($tmplpath . '/template.css');
     $srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
     $srcs['Timeline'] = 'plugins/fabrik_visualization/timeline/timeline.js';
     $srcs['AdvancedSearch'] = 'media/com_fabrik/js/advanced-search.js';
     $js .= $model->getFilterJs();
     FabrikHelperHTML::iniRequireJs($model->getShim());
     FabrikHelperHTML::script($srcs, $js);
     JText::script('COM_FABRIK_ADVANCED_SEARCH');
     JText::script('COM_FABRIK_LOADING');
     $opts = array('alt' => 'calendar', 'class' => 'calendarbutton', 'id' => 'timelineDatePicker_cal_img');
     $img = FabrikHelperHTML::image('calendar.png', 'form', @$this->tmpl, $opts);
     $this->datePicker = '<input type="text" name="timelineDatePicker" id="timelineDatePicker" value="" />' . $img;
     // Check and add a general fabrik custom css file overrides template css and generic table css
     FabrikHelperHTML::stylesheetFromPath('media/com_fabrik/css/custom.css');
     // Check and add a specific biz  template css file overrides template css generic table css and generic custom css
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/timeline/views/timeline/tmpl/' . $tpl . '/custom.css');
     return parent::display();
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:56,代码来源:view.html.php

示例11: render

 /**
  * Render the plugins fields
  *
  * @return string
  */
 public function render()
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $pluginManager = JModelLegacy::getInstance('Pluginmanager', 'FabrikFEModel');
     $plugin = $pluginManager->getPlugIn($this->getState('plugin'), $this->getState('type'));
     $feModel = $this->getPluginModel();
     $plugin->getJForm()->model = $feModel;
     $data = $this->getData();
     $input->set('view', $this->getState('type'));
     $mode = FabrikWorker::j3() ? 'nav-tabs' : '';
     $str = $plugin->onRenderAdminSettings($data, $this->getState('c'), $mode);
     $input->set('view', 'plugin');
     return $str;
 }
开发者ID:LGBGit,项目名称:tierno,代码行数:20,代码来源:plugin.php

示例12: tagify

 /**
  * Tagify a string
  *
  * @param   string  $data  Tagify
  *
  * @return  string	Tagified string
  */
 protected function tagify($data)
 {
     $name = $this->getFullName(true, false);
     $params = $this->getParams();
     $data = explode(',', strip_tags($data));
     $url = $params->get('textarea_tagifyurl');
     $listId = $this->getListModel()->getId();
     if ($url == '') {
         if ($this->app->isAdmin()) {
             $url = 'index.php?option=com_fabrik&amp;task=list.view&amp;listid=' . $listId;
         } else {
             $url = 'index.php?option=com_' . $this->package . '&view=list&listid=' . $listId;
         }
     }
     // $$$ rob 24/02/2011 remove duplicates from tags
     // $$$ hugh - strip spaces first, account for "foo,bar, baz, foo"
     $data = array_map('trim', $data);
     $data = array_unique($data);
     $img = FabrikWorker::j3() ? 'bookmark.png' : 'tag.png';
     $icon = FabrikHelperHTML::image($img, 'form', @$this->tmpl, array('alt' => 'tag'));
     $tmplData = new stdClass();
     $tmplData->tags = array();
     foreach ($data as $d) {
         $d = trim($d);
         if ($d != '') {
             if (trim($params->get('textarea_tagifyurl')) == '') {
                 if (substr($url, -1) === '?') {
                     $thisurl = $url . $name . '[value]=' . $d;
                 } else {
                     $thisurl = strstr($url, '?') ? $url . '&' . $name . '[value]=' . urlencode($d) : $url . '?' . $name . '[value]=' . urlencode($d);
                 }
                 $thisurl .= '&' . $name . '[condition]=CONTAINS';
                 $thisurl .= '&resetfilters=1';
             } else {
                 $thisurl = str_replace('{tag}', urlencode($d), $url);
             }
             $o = new stdClass();
             $o->url = $thisurl;
             $o->icon = $icon;
             $o->label = $d;
             $tmplData->tags[] = $o;
         }
     }
     $layout = $this->getLayout('tags');
     return $layout->render($tmplData);
 }
开发者ID:LGBGit,项目名称:tierno,代码行数:53,代码来源:textarea.php

示例13: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 public function display($tpl = 'default')
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $srcs = FabrikHelperHTML::framework();
     $srcs['FbListFilter'] = 'media/com_fabrik/js/listfilter.js';
     $srcs['AdvancedSearch'] = 'media/com_fabrik/js/advanced-search.js';
     $model = $this->getModel();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model->setId($input->getInt('id', $usersConfig->get('visualizationid', $input->getInt('visualizationid', 0))));
     $this->row = $model->getVisualization();
     if (!$model->canView()) {
         echo FText::_('JERROR_ALERTNOAUTHOR');
         return false;
     }
     if ($this->row->published == 0) {
         JError::raiseWarning(500, FText::_('JERROR_ALERTNOAUTHOR'));
         return '';
     }
     $this->requiredFiltersFound = $this->get('RequiredFiltersFound');
     if ($this->requiredFiltersFound) {
         $this->chart = $this->get('Chart');
     }
     $params = $model->getParams();
     $this->params = $params;
     $viewName = $this->getName();
     $pluginManager = FabrikWorker::getPluginManager();
     $plugin = $pluginManager->getPlugIn('fusion_gantt_chart', 'visualization');
     $this->containerId = $this->get('ContainerId');
     $this->filters = $this->get('Filters');
     $this->showFilters = $model->showFilters();
     $this->filterFormURL = $this->get('FilterFormURL');
     $tpl = FabrikWorker::j3() ? 'bootstrap' : 'default';
     $tpl = $params->get('fusion_gantt_chart_layout', $tpl);
     $tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/fusion_gantt_chart/views/fusion_gantt_chart/tmpl/' . $tpl;
     $this->_setPath('template', $tmplpath);
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/fusion_gantt_chart/views/fusion_gantt_chart/tmpl/' . $tpl . '/template.css');
     // Assign something to Fabrik.blocks to ensure we can clear filters
     $ref = $model->getJSRenderContext();
     $js = "{$ref} = {};";
     $js .= "\n" . "Fabrik.addBlock('{$ref}', {$ref});";
     $js .= $model->getFilterJs();
     FabrikHelperHTML::iniRequireJs($model->getShim());
     FabrikHelperHTML::script($srcs, $js);
     echo parent::display();
 }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:53,代码来源:view.html.php

示例14: getBottomContent

    /**
     * Sets up HTML to be injected into the form's bottom
     *
     * @return void
     */
    public function getBottomContent()
    {
        /** @var FabrikFEModelForm $formModel */
        $formModel = $this->getModel();
        if (!$this->show()) {
            $this->data = '';
            return;
        }
        $j3 = FabrikWorker::j3();
        $input = $this->app->input;
        $formId = $formModel->getForm()->id;
        $mode = JString::strtolower($input->get('view', 'form'));
        $this->ids = $this->getNavIds();
        $linkStartPrev = $this->ids->index == 0 ? ' disabled' : '';
        $linkNextEnd = $this->ids->index == $this->ids->lastKey ? ' disabled' : '';
        if ($this->app->isAdmin()) {
            $url = 'index.php?option=com_fabrik&task=' . $mode . '.view&formid=' . $formId . '&rowid=';
        } else {
            $url = 'index.php?option=com_' . $this->package . '&view=' . $mode . '&formid=' . $formId . '&rowid=';
        }
        $links = array();
        $links['first'] = JRoute::_($url . $this->ids->first);
        $links['first-active'] = $linkStartPrev;
        $links['last-active'] = $linkNextEnd;
        $links['prev'] = JRoute::_($url . $this->ids->prev);
        $links['next'] = JRoute::_($url . $this->ids->next);
        $links['last'] = JRoute::_($url . $this->ids->last);
        if ($j3) {
            $layout = new JLayoutFile('plugins.fabrik_form.paginate.layouts.default_paginate', JPATH_SITE);
            $this->data = $layout->render($links);
        } else {
            $firstLink = $linkStartPrev ? '<span>&lt;&lt;</span>' . FText::_('COM_FABRIK_START') : '<a href="' . $links['first'] . '" class="pagenav paginateFirst ' . $linkStartPrev . '"><span>&lt;&lt;</span>' . FText::_('COM_FABRIK_START') . '</a>';
            $prevLink = $linkStartPrev ? '<span>&lt;</span>' . FText::_('COM_FABRIK_PREV') : '<a href="' . $links['prev'] . '" class="pagenav paginatePrevious ' . $linkStartPrev . '"><span>&lt;</span>' . FText::_('COM_FABRIK_PREV') . '</a>';
            $nextLink = $linkNextEnd ? FText::_('COM_FABRIK_NEXT') . '<span>&gt;</span>' : '<a href="' . $links['next'] . '" class="pagenav paginateNext' . $linkNextEnd . '">' . FText::_('COM_FABRIK_NEXT') . '<span>&gt;</span></a>';
            $endLink = $linkNextEnd ? FText::_('COM_FABRIK_END') . '<span>&gt;&gt;</span>' : '<a href="' . $links['last'] . '" class="pagenav paginateLast' . $linkNextEnd . '">' . FText::_('COM_FABRIK_END') . '<span>&gt;&gt;</span></a>';
            $this->data = '<ul id="fabrik-from-pagination" class="pagination">
					<li>' . $firstLink . '</li>
					<li>' . $prevLink . '</li>
					<li>' . $nextLink . '</li>
					<li>' . $endLink . '</li>
			</ul>';
        }
        FabrikHelperHTML::stylesheet('plugins/fabrik_form/paginate/paginate.css');
    }
开发者ID:jfquestiaux,项目名称:fabrik,代码行数:49,代码来源:paginate.php

示例15: display

 /**
  * Display the view
  *
  * @param   string  $tpl  template
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     $srcs = FabrikHelperHTML::framework();
     FabrikHelperHTML::script($srcs);
     $db = FabrikWorker::getDbo(true);
     $query = $db->getQuery(true);
     $query->select('*')->from('#__{package}_log')->where('message_type != ""')->order('timedate_created DESC');
     $db->setQuery($query, 0, 10);
     $this->logs = $db->loadObjectList();
     $this->feed = $this->get('RSSFeed');
     $this->addToolbar();
     FabrikAdminHelper::addSubmenu('home');
     FabrikAdminHelper::setViewLayout($this);
     if (FabrikWorker::j3()) {
         $this->sidebar = JHtmlSidebar::render();
     }
     FabrikHelperHTML::iniRequireJS();
     parent::display($tpl);
 }
开发者ID:glauberm,项目名称:cinevi,代码行数:26,代码来源:view.html.php


注:本文中的FabrikWorker::j3方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。