當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FabrikHelperHTML::tableList方法代碼示例

本文整理匯總了PHP中FabrikHelperHTML::tableList方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::tableList方法的具體用法?PHP FabrikHelperHTML::tableList怎麽用?PHP FabrikHelperHTML::tableList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FabrikHelperHTML的用法示例。


在下文中一共展示了FabrikHelperHTML::tableList方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display


//.........這裏部分代碼省略.........
     if (!class_exists('JSite')) {
         require_once JPATH_ROOT . '/includes/application.php';
     }
     $app = JFactory::getApplication();
     $package = $app->getUserState('com_fabrik.package', 'fabrik');
     $this->setTitle($w, $params, $model);
     // Deprecated (keep in case people use them in old templates)
     $this->table = new stdClass();
     $this->table->label = FabrikString::translate($w->parseMessageForPlaceHolder($item->label, $_REQUEST));
     $this->table->intro = $params->get('show_into', 1) == 0 ? '' : FabrikString::translate($w->parseMessageForPlaceHolder($item->introduction));
     $this->table->outro = $params->get('show_outro', 1) == 0 ? '' : FabrikString::translate($w->parseMessageForPlaceHolder($params->get('outro')));
     $this->table->id = $item->id;
     $this->table->renderid = $model->getRenderContext();
     $this->table->db_table_name = $item->db_table_name;
     // End deprecated
     $this->list = $this->table;
     $this->list->class = $model->htmlClass();
     $this->group_by = $item->group_by;
     $this->form = new stdClass();
     $this->form->id = $item->form_id;
     $this->renderContext = $model->getRenderContext();
     $this->formid = 'listform_' . $this->renderContext;
     $form = $model->getFormModel();
     $this->table->action = $model->getTableAction();
     $this->showCSV = $model->canCSVExport();
     $this->showCSVImport = $model->canCSVImport();
     $this->toggleCols = $model->toggleCols();
     $this->showToggleCols = (bool) $params->get('toggle_cols', false);
     $this->canGroupBy = $model->canGroupBy();
     $this->navigation = $nav;
     $this->nav = $input->getInt('fabrik_show_nav', $params->get('show-table-nav', 1)) ? $nav->getListFooter($this->renderContext, $model->getTmpl()) : '';
     $this->nav = '<div class="fabrikNav">' . $this->nav . '</div>';
     $this->fabrik_userid = $user->get('id');
     $this->canDelete = $model->deletePossible() ? true : false;
     $this->limitLength = $model->limitLength;
     $this->ajax = $model->isAjax();
     // 3.0 observed in list.js & html moved into fabrik_actions rollover
     $this->showPDF = $params->get('pdf', $fbConfig->get('list_pdf', false));
     if ($this->showPDF) {
         FabrikWorker::canPdf();
     }
     $this->emptyLink = $model->canEmpty() ? '#' : '';
     $this->csvImportLink = $this->showCSVImport ? JRoute::_('index.php?option=com_' . $package . '&view=import&filetype=csv&listid=' . $item->id) : '';
     $this->showAdd = $model->canAdd();
     if ($this->showAdd) {
         if ($params->get('show-table-add', 1)) {
             $this->addRecordLink = $model->getAddRecordLink();
         } else {
             $this->showAdd = false;
         }
     }
     $this->addLabel = $model->addLabel();
     $this->showRSS = $params->get('rss', 0) == 0 ? 0 : 1;
     if ($this->showRSS) {
         $this->rssLink = $model->getRSSFeedLink();
         if ($this->rssLink != '') {
             $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
             $document->addHeadLink($this->rssLink, 'alternate', 'rel', $attribs);
         }
     }
     if ($app->isAdmin()) {
         // Admin always uses com_fabrik option
         $this->pdfLink = JRoute::_('index.php?option=com_fabrik&task=list.view&listid=' . $item->id . '&format=pdf&tmpl=component');
     } else {
         $pdfLink = 'index.php?option=com_' . $package . '&view=list&format=pdf&listid=' . $item->id;
         if (!$this->nodata) {
             // If some data is shown then ensure that menu links reset filters (combined with require filters) doesn't produce an empty data set for the pdf
             $pdfLink .= '&resetfilters=0';
         }
         $this->pdfLink = JRoute::_($pdfLink);
     }
     list($this->headings, $groupHeadings, $this->headingClass, $this->cellClass) = $model->getHeadings();
     $this->groupByHeadings = $model->getGroupByHeadings();
     $this->filter_action = $model->getFilterAction();
     JDEBUG ? $profiler->mark('fabrik getfilters start') : null;
     $this->filters = $model->getFilters('listform_' . $this->renderContext);
     $fKeys = array_keys($this->filters);
     $this->bootShowFilters = count($fKeys) === 1 && $fKeys[0] === 'all' ? false : true;
     $this->clearFliterLink = $model->getClearButton();
     JDEBUG ? $profiler->mark('fabrik getfilters end') : null;
     $this->filterMode = (int) $params->get('show-table-filters');
     $this->toggleFilters = $this->filterMode == 2 || $this->filterMode == 4;
     $this->showFilters = $model->getShowFilters();
     $this->filterCols = (int) $params->get('list_filter_cols', '1');
     $this->showClearFilters = $this->showFilters || $params->get('advanced-filter') ? true : false;
     $this->emptyDataMessage = $model->getEmptyDataMsg();
     $this->groupheadings = $groupHeadings;
     $this->calculations = $this->_getCalculations($this->headings);
     $this->isGrouped = !($model->getGroupBy() == '');
     $this->colCount = count($this->headings);
     $this->hasButtons = $model->getHasButtons();
     $this->grouptemplates = $model->groupTemplates;
     $this->params = $params;
     $this->loadTemplateBottom();
     $this->getManagementJS($this->rows);
     // Get dropdown list of other tables for quick nav in admin
     $this->tablePicker = $app->isAdmin() && $app->input->get('format') !== 'pdf' ? FabrikHelperHTML::tableList($this->table->id) : '';
     $this->buttons();
     $this->pluginTopButtons = $model->getPluginTopButtons();
 }
開發者ID:ppantilla,項目名稱:bbninja,代碼行數:101,代碼來源:view.base.php

示例2: display


//.........這裏部分代碼省略.........
			$params->set('show-title', JRequest::getInt('show-title', 1));
		}

		if (!$this->isMambot) {
			$document->setTitle($w->parseMessageForPlaceHolder($params->get('page_title'), $_REQUEST));
		}
		/** depreciated (keep incase ppl use them in old tmpls**/
		$this->table 					= new stdClass();
		$this->table->label 	= $w->parseMessageForPlaceHolder($item->label, $_REQUEST);
		$this->table->intro 	= $w->parseMessageForPlaceHolder($item->introduction);
		$this->table->id			= $item->id;
		$this->table->db_table_name = $item->db_table_name;
		/** end **/
		$this->assign('list', $this->table);
		$this->group_by	= $item->group_by;
		$this->form = new stdClass();
		$this->form->id = $item->id;
		$this->formid = 'listform_'.$item->id;
		$form = $model->getFormModel();
		$this->table->action = $this->get('TableAction');
		$this->showCSV 				= $model->canCSVExport();
		$this->showCSVImport	= $model->canCSVImport();
		$this->assignRef('navigation', $nav);
		$this->nav = JRequest::getInt('fabrik_show_nav', $params->get('show-table-nav', 1)) ? $nav->getListFooter($item->id, $this->get('tmpl')) : '';
		$this->nav = '<div class="fabrikNav">'.$this->nav.'</div>';
		$this->fabrik_userid = $user->get('id');
		$this->canDelete = $model->deletePossible() ? true : false;
		$tmpl = $this->get('tmpl');
		// 3.0 observed in list.js & html moved into fabrik_actions rollover
		$this->showPDF = $params->get('pdf', 0);
		if ($this->showPDF) {
			$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params);
		}
		$this->emptyLink = $model->canEmpty() ? '#' : '';
		$this->csvImportLink = $this->showCSVImport ? JRoute::_("index.php?option=com_fabrik&view=import&filetype=csv&listid=" . $item->id) : '';
		$this->showAdd = $model->canAdd();
		if ($this->showAdd) {
			if ($params->get('show-table-add', 1)) {
				$this->assign('addRecordLink', $this->get('AddRecordLink'));
			}
			else {
				$this->showAdd = false;
			}
		}

		$this->showRSS = $params->get('rss', 0) == 0 ? 0 : 1;
		if ($this->showRSS) {
			$this->rssLink = $model->getRSSFeedLink();
			if ($this->rssLink != '') {
				$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
				$document->addHeadLink($this->rssLink, 'alternate', 'rel', $attribs);
			}
		}
		list($this->headings, $groupHeadings, $this->headingClass, $this->cellClass) = $this->get('Headings');
		$this->assignRef('groupByHeadings', $this->get('GroupByHeadings'));
		$this->filter_action = $this->get('FilterAction');
		JDEBUG ? $_PROFILER->mark('fabrik getfilters start') : null;
		$this->filters = $model->getFilters('listform_'. $item->id);
		$this->assign('clearFliterLink', $this->get('clearButton'));
		JDEBUG ? $_PROFILER->mark('fabrik getfilters end') : null;
		//$form->getGroupsHiarachy();
		$this->assign('showFilters', (count($this->filters) > 0 && $params->get('show-table-filters', 1) !== 0) && JRequest::getVar('showfilters', 1) == 1 ?  1 : 0);

		$this->assign('emptyDataMessage', $this->get('EmptyDataMsg'));
		$this->assignRef('groupheadings', $groupHeadings);
		$this->assignRef('calculations', $this->_getCalculations($this->headings));
		$this->assign('isGrouped', !($this->get('groupBy') == ''));
		$this->assign('colCount', count($this->headings));
		$this->assignRef('grouptemplates', $model->grouptemplates);
		$this->assignRef('params', $params);
		$this->_loadTemplateBottom();
		$this->getManagementJS($this->rows);

		// get dropdown list of other tables for quick nav in admin
		$this->tablePicker = $app->isAdmin() ? FabrikHelperHTML::tableList($this->table->id) : '';

		// 3.0 buttons now rendered in fabrik_action <ul>
		//$this->pluginButtons = $model->getPluginButtons();

		//force front end templates
		$this->_basePath = COM_FABRIK_FRONTEND.DS.'views';

		$this->addTemplatePath($this->_basePath.DS.$this->_name.DS.'tmpl'.DS.$tmpl);
		$this->addTemplatePath(JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html'.DS.'com_fabrik'.DS.'list'.DS.$tmpl);

		$text = $this->loadTemplate();
		if ($params->get('process-jplugins')) {
			$opt = JRequest::getVar('option');
			JRequest::setVar('option', 'com_content');
			jimport('joomla.html.html.content');
			$text .= '{emailcloak=off}';
			$text = JHTML::_('content.prepare', $text);
			$text = preg_replace('/\{emailcloak\=off\}/', '', $text);
			JRequest::setVar('option', $opt);
		}

		JDEBUG ? $_PROFILER->mark('end fabrik display') : null;
		// $$$ rob 09/06/2011 no need for isMambot test? should use ob_start() in module / plugin to capture the output
		echo $text;
	}
開發者ID:Jobar87,項目名稱:fabrik,代碼行數:101,代碼來源:view.html.php

示例3: display


//.........這裏部分代碼省略.........
			echo JText::_('COM_FABRIK_LIST_NOT_PUBLISHED');
			return false;
		}

		if (!$model->canView()) {
			echo JText::_('JERROR_ALERTNOAUTHOR');
			return false;
		}

		$this->table 					= new stdClass();
		$this->table->label 	= $w->parseMessageForPlaceHolder($table->label, $_REQUEST);
		$this->table->intro 	= $w->parseMessageForPlaceHolder($table->introduction);
		$this->table->id			= $table->id;
		$this->group_by				= $table->group_by;
		$this->formid = 'listform_' . $table->id;
		$page = $model->isAjax() ? "index.php?format=raw" : "index.php?";
		$this->table->action 	=  $page . str_replace('&', '&amp;', JRequest::getVar('QUERY_STRING', 'index.php?option=com_fabrik', 'server'));

		if ($model->isAjax()) {
			$this->table->action .= '&format=raw';
			$this->table->action = str_replace("task=package", "task=viewTable", $this->table->action);
			//$this->table->action 	= JRoute::_($this->table->action);
		}
		$this->table->action 	= JRoute::_($this->table->action);

		$this->showCSV 				= $model->canCSVExport();
		$this->showCSVImport	= $model->canCSVImport();
		$this->nav 						= $params->get('show-table-nav', 1) ? $nav->getListFooter($model->getId(), $this->get('tmpl')) : '';
		$this->fabrik_userid 	= $user->get('id');
		$this->canDelete 			= $model->canDelete() ? true : false;
		$this->deleteButton 	= $model->canDelete() ?  "<input class='button' type='button' onclick=\"$jsdelete\" value='" . JText::_('COM_FABRIK_DELETE') . "' name='delete'/>" : '';

		$this->showPDF = false;
		$this->pdfLink = false;

		$this->emptyLink = $model->canEmpty() ? '#' : '';
		$this->csvImportLink = $this->showCSVImport ? JRoute::_("index.php?option=com_fabrik&view=import&filetype=csv&listid=" . $table->id) : '';
		$this->showAdd = $model->canAdd();
		if ($this->showAdd) {
			if ($params->get('show-table-add', 1)) {
				$this->assign('addRecordLink', $this->get('AddRecordLink'));
			}
			else {
				$this->showAdd = false;
			}
		}
		$this->showRSS = $params->get('rss', 0) == 0 ?  0 : 1;

		if ($this->showRSS) {
			$this->rssLink = $model->getRSSFeedLink();
			if ($this->rssLink != '') {
				$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
				if (method_exists($document, 'addHeadLink')) {
					$document->addHeadLink($this->rssLink, 'alternate', 'rel', $attribs);
				}
			}
		}
		list($this->headings, $groupHeadings, $this->headingClass, $this->cellClass) = $this->get('Headings');

		$this->filter_action = $model->getFilterAction();
		$modelFilters = $model->makeFilters('list_'. $model->getId());
		$this->assign('clearFliterLink', $this->get('clearButton'));
		JDEBUG ? $_PROFILER->mark('fabrik getfilters end') : null;
		$form->getGroupsHiarachy();
		$this->assign('showFilters', (count($this->filters) > 0 && $params->get('show-table-filters', 1)) && JRequest::getVar('showfilters', 1) == 1 ?  1 : 0);

		$this->assign('requiredFiltersFound', $this->get('RequiredFiltersFound'));
		$this->assign('emptyDataMessage', $this->get('EmptyDataMsg'));
		$this->calculations 	= $this->_getCalculations($this->headings);

		$this->assign('isGrouped', $table->group_by);
		$this->assign('colCount', count($this->headings));
		$this->assignRef('grouptemplates', $model->grouptemplates);
		$this->assignRef('params', $params);
		$this->assignRef('groupheadings', $groupHeadings);
		$this->_loadTemplateBottom();

		$this->getManagementJS( $this->rows);

		// get dropdown list of other tables for quick nav in admin
		$this->tablePicker = ($app->isAdmin()) ? FabrikHelperHTML::tableList($this->table->id) : '';

		$this->pluginButtons = $model->getPluginButtons();

		//force front end templates
		$this->_basePath = COM_FABRIK_FRONTEND . DS . 'views';

		$tmpl = $params->get('pdf_template');
		if ($tmpl == -1) {
			$tmpl = JRequest::getVar('layout', $table->template);
		}

		$this->addTemplatePath($this->_basePath.DS.$this->_name.DS.'tmpl'.DS.$tmpl);
		$this->addTemplatePath(JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'html'.DS.'com_fabrik'.DS.'list'.DS.$tmpl);
		//ensure we don't have an incorrect version of mootools loaded

		$this->fixForPDF();

		parent::display();
	}
開發者ID:Jobar87,項目名稱:fabrik,代碼行數:101,代碼來源:view.pdf.php

示例4: display


//.........這裏部分代碼省略.........
             $params->set('page_title', '');
             $params->set('show_page_title', 0);
         } else {
             $params->set('page_title', $menu_params->get('page_title'));
             $params->set('show_page_title', $menu_params->get('show_page_title', 0));
         }
     } else {
         $params->set('show_page_title', JRequest::getInt('show_page_title', 0));
         $params->set('page_title', JRequest::getVar('title', ''));
         $params->set('show-title', JRequest::getInt('show-title', 1));
     }
     if (!$this->_isMambot) {
         $document->setTitle($w->parseMessageForPlaceHolder($params->get('page_title'), $_REQUEST));
     }
     $this->table = new stdClass();
     $this->table->label = $w->parseMessageForPlaceHolder($table->label, $_REQUEST);
     $this->table->intro = $w->parseMessageForPlaceHolder($table->introduction);
     $this->table->id = $table->id;
     $this->table->db_table_name = $table->db_table_name;
     $this->group_by = $table->group_by;
     $this->form = new stdClass();
     $this->form->id = $table->form_id;
     $this->formid = 'tableform_' . $table->id;
     $form =& $model->getForm();
     FabrikHelperHTML::tips('.hasTip', array(), "\$('" . $this->formid . "')");
     $this->table->action = $this->get('TableAction');
     $this->showCSV = $model->canCSVExport();
     $this->showCSVImport = $model->canCSVImport();
     $this->assignRef('navigation', $nav);
     $this->nav = JRequest::getInt('fabrik_show_nav', $params->get('show-table-nav', 1)) ? $nav->getListFooter($model->_id, $this->getTmpl()) : '';
     $this->nav = '<div class="fabrikNav">' . $this->nav . '</div>';
     $this->fabrik_userid = $user->get('id');
     $this->canDelete = $model->deletePossible() ? true : false;
     $jsdelete = "oPackage.submitfabrikTable({$table->id}, 'delete')";
     $this->deleteButton = $model->deletePossible() ? "<input class=\"button\" type=\"button\" onclick=\"{$jsdelete}\" value=\"" . JText::_('DELETE') . "\" name=\"delete\"/>" : '';
     $this->showPDF = $params->get('pdf', 0);
     if ($this->showPDF) {
         $this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params);
     }
     $this->emptyButton = $model->canEmpty() ? "<input class=\"button\" type=\"button\" value=\"" . JText::_('EMPTY') . "\" name=\"doempty\"/>" : "";
     $this->csvImportLink = $this->showCSVImport ? JRoute::_("index.php?option=com_fabrik&c=import&view=import&filetype=csv&tableid=" . $table->id) : '';
     $this->showAdd = $model->canAdd();
     if ($this->showAdd) {
         if ($params->get('show-table-add', 1)) {
             $this->assign('addRecordLink', $this->get('AddRecordLink'));
             $this->assign('addRecordLabel', $this->get('AddRecordLabel'));
         } else {
             $this->showAdd = false;
         }
     }
     $this->assign('addRecordId', "table_" . $model->_id . "_addRecord");
     $this->showRSS = $params->get('rss', 0) == 0 ? 0 : 1;
     if ($this->showRSS) {
         $this->rssLink = $model->getRSSFeedLink();
         if ($this->rssLink != '') {
             $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
             $document->addHeadLink($this->rssLink, 'alternate', 'rel', $attribs);
         }
     }
     list($this->headings, $groupHeadings, $this->headingClass, $this->cellClass) = $this->get('Headings');
     $this->filter_action = $model->getFilterAction();
     JDEBUG ? $_PROFILER->mark('fabrik getfilters start') : null;
     $this->filters =& $model->getFilters('tableform_' . $model->_id, 'table');
     $this->assign('clearFliterLink', $this->get('clearButton'));
     JDEBUG ? $_PROFILER->mark('fabrik getfilters end') : null;
     $form->getGroupsHiarachy();
     $this->assign('showFilters', count($this->filters) > 0 && $params->get('show-table-filters', 1) && JRequest::getVar('showfilters', 1) == 1 ? 1 : 0);
     $this->assign('emptyDataMessage', $this->get('EmptyDataMsg'));
     $this->assignRef('groupheadings', $groupHeadings);
     $this->assignRef('calculations', $this->_getCalculations($this->headings));
     $this->assign('isGrouped', $table->group_by);
     $this->assign('colCount', count($this->headings));
     $this->assignRef('grouptemplates', $model->grouptemplates);
     $this->assignRef('params', $params);
     $this->_loadTemplateBottom();
     $this->getManagementJS($this->rows);
     // get dropdown list of other tables for quick nav in admin
     $this->tablePicker = $app->isAdmin() ? FabrikHelperHTML::tableList($this->table->id) : '';
     $this->pluginButtons = $model->getPluginButtons();
     //force front end templates
     $this->_basePath = COM_FABRIK_FRONTEND . DS . 'views';
     $tmpl = $this->getTmpl();
     $this->_setPath('template', $this->_basePath . DS . $this->_name . DS . 'tmpl' . DS . $tmpl);
     $this->setLayout('default');
     // kludge for convincing J! to look for the right files in loadTemplate()
     $text = $this->loadTemplate();
     if ($params->get('process-jplugins')) {
         $opt = JRequest::getVar('option');
         JRequest::setVar('option', 'com_content');
         jimport('joomla.html.html.content');
         $text .= '{emailcloak=off}';
         $text = JHTML::_('content.prepare', $text);
         $text = preg_replace('/\\{emailcloak\\=off\\}/', '', $text);
         JRequest::setVar('option', $opt);
     }
     FabrikHelperHTML::cleanMootools();
     JDEBUG ? $_PROFILER->mark('end fabrik display') : null;
     // $$$ rob 09/06/2011 no need for isMambot test? should use ob_start() in module / plugin to capture the output
     echo $text;
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:101,代碼來源:view.html.php

示例5: display


//.........這裏部分代碼省略.........
     $this->assign('requiredFiltersFound', $this->get('RequiredFiltersFound'));
     $this->assign('advancedSearch', $this->get('AdvancedSearchLink'));
     $this->nodata = empty($this->rows) || count($this->rows) == 1 && empty($firstRow) || !$this->requiredFiltersFound ? true : false;
     $this->tableStyle = $this->nodata ? 'display:none' : '';
     $this->emptyStyle = $this->nodata ? '' : 'display:none';
     $params = $model->getParams();
     if (!$model->canPublish()) {
         echo JText::_('COM_FABRIK_LIST_NOT_PUBLISHED');
         return false;
     }
     if (!$model->canView()) {
         echo JText::_('JERROR_ALERTNOAUTHOR');
         return false;
     }
     if (!class_exists('JSite')) {
         require_once JPATH_ROOT . '/includes/application.php';
     }
     $app = JFactory::getApplication();
     $this->setTitle($w, $params, $model);
     /** depreciated (keep incase ppl use them in old tmpls**/
     $this->table = new stdClass();
     $this->table->label = $w->parseMessageForPlaceHolder($item->label, $_REQUEST);
     $this->table->intro = $w->parseMessageForPlaceHolder($item->introduction);
     $this->table->outro = $w->parseMessageForPlaceHolder($params->get('outro'));
     $this->table->id = $item->id;
     $this->table->renderid = $this->get('RenderContext');
     $this->table->db_table_name = $item->db_table_name;
     /** end **/
     $this->assign('list', $this->table);
     $this->group_by = $item->group_by;
     $this->form = new stdClass();
     $this->form->id = $item->form_id;
     $this->assign('renderContext', $this->get('RenderContext'));
     $this->formid = 'listform_' . $this->renderContext;
     $form = $model->getFormModel();
     $this->table->action = $this->get('TableAction');
     $this->showCSV = $model->canCSVExport();
     $this->showCSVImport = $model->canCSVImport();
     $this->canGroupBy = $model->canGroupBy();
     $this->assignRef('navigation', $nav);
     $this->nav = JRequest::getInt('fabrik_show_nav', $params->get('show-table-nav', 1)) ? $nav->getListFooter($this->renderContext, $this->get('tmpl')) : '';
     $this->nav = '<div class="fabrikNav">' . $this->nav . '</div>';
     $this->fabrik_userid = $user->get('id');
     $this->canDelete = $model->deletePossible() ? true : false;
     // 3.0 observed in list.js & html moved into fabrik_actions rollover
     $canPdf = FabrikWorker::canPdf();
     $this->showPDF = $params->get('pdf', $fbConfig->get('list_pdf', false));
     if (!$canPdf && $this->showPDF) {
         JError::raiseNotice(500, JText::_('COM_FABRIK_NOTICE_DOMPDF_NOT_FOUND'));
     }
     $this->emptyLink = $model->canEmpty() ? '#' : '';
     $this->csvImportLink = $this->showCSVImport ? JRoute::_("index.php?option=com_fabrik&view=import&filetype=csv&listid=" . $item->id) : '';
     $this->showAdd = $model->canAdd();
     if ($this->showAdd) {
         if ($params->get('show-table-add', 1)) {
             $this->assign('addRecordLink', $this->get('AddRecordLink'));
         } else {
             $this->showAdd = false;
         }
     }
     $this->assign('addLabel', $params->get('addlabel', JText::_('COM_FABRIK_ADD')));
     $this->showRSS = $params->get('rss', 0) == 0 ? 0 : 1;
     if ($this->showRSS) {
         $this->rssLink = $model->getRSSFeedLink();
         if ($this->rssLink != '') {
             $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
             $document->addHeadLink($this->rssLink, 'alternate', 'rel', $attribs);
         }
     }
     if ($app->isAdmin()) {
         $this->pdfLink = JRoute::_('index.php?option=com_fabrik&task=list.view&listid=' . $item->id . '&format=pdf&tmpl=component');
     } else {
         $this->pdfLink = JRoute::_('index.php?option=com_fabrik&view=list&format=pdf&listid=' . $item->id);
     }
     list($this->headings, $groupHeadings, $this->headingClass, $this->cellClass) = $this->get('Headings');
     $this->assign('groupByHeadings', $this->get('GroupByHeadings'));
     $this->filter_action = $this->get('FilterAction');
     JDEBUG ? $profiler->mark('fabrik getfilters start') : null;
     $this->filters = $model->getFilters('listform_' . $this->renderContext);
     $this->assign('clearFliterLink', $this->get('clearButton'));
     JDEBUG ? $profiler->mark('fabrik getfilters end') : null;
     $this->assign('filterMode', (int) $params->get('show-table-filters'));
     $this->assign('toggleFilters', $this->filterMode == 2 || $this->filterMode == 4);
     $this->assign('showFilters', $this->get('showFilters'));
     $this->showClearFilters = $this->showFilters || $params->get('advanced-filter') ? true : false;
     $this->assign('emptyDataMessage', $this->get('EmptyDataMsg'));
     $this->assignRef('groupheadings', $groupHeadings);
     $this->calculations = $this->_getCalculations($this->headings, $model->actionMethod());
     $this->assign('isGrouped', !($this->get('groupBy') == ''));
     $this->assign('colCount', count($this->headings));
     $this->assign('hasButtons', $this->get('hasButtons'));
     $this->assignRef('grouptemplates', $model->groupTemplates);
     $this->assignRef('params', $params);
     $this->loadTemplateBottom();
     $this->getManagementJS($this->rows);
     // Get dropdown list of other tables for quick nav in admin
     $this->tablePicker = $app->isAdmin() && $app->input->get('format') !== 'pdf' ? FabrikHelperHTML::tableList($this->table->id) : '';
     $this->buttons();
     $this->assign('pluginTopButtons', $this->get('PluginTopButtons'));
 }
開發者ID:rogeriocc,項目名稱:fabrik,代碼行數:101,代碼來源:view.base.php


注:本文中的FabrikHelperHTML::tableList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。