本文整理汇总了PHP中Helper_Admin类的典型用法代码示例。如果您正苦于以下问题:PHP Helper_Admin类的具体用法?PHP Helper_Admin怎么用?PHP Helper_Admin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Helper_Admin类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: addToolbar
protected function addToolbar($search)
{
$bar = JToolBar::getInstance('toolbar');
$canDo = Helper_Admin::getActions();
$separator = false;
$title = empty($search->title) ? 'List' : $search->title;
$user = JFactory::getUser();
require_once JPATH_COMPONENT . '/helpers/toolbar/link.php';
require_once JPATH_COMPONENT . '/helpers/toolbar/separator.php';
JToolBarHelper::title($title, 'stack');
if (!(is_object($search) && $search->id)) {
return;
}
$form = JCckDatabase::loadResult('SELECT live_value FROM #__cck_core_search_field WHERE fieldid = 1 AND searchid = ' . $search->id . ' AND stage = 0');
if ($canDo->get('core.create') || $canDo->get('core.edit')) {
$form = JCckDatabase::loadObject('SELECT id, name, location FROM #__cck_core_types WHERE name = "' . $form . '"');
if (is_object($form)) {
$canCreate = $user->authorise('core.create', 'com_cck.form.' . $form->id);
$creation = !$form->location || $form->location == 'admin' ? true : false;
} else {
$canCreate = false;
$creation = false;
}
if ($canCreate && $creation) {
$link = 'index.php?option=com_cck&view=form&type=' . $form->name . '&return_o=cck&return_v=list&return=' . base64_encode(JFactory::getURI());
$bar->prependButton('CckLink', 'new', JText::_('JTOOLBAR_NEW'), $link, '_self');
}
}
}
开发者ID:hamby,项目名称:SEBLOD,代码行数:29,代码来源:view.html.php
示例2: prepareToolbar
public function prepareToolbar()
{
Helper_Admin::addToolbar($this->vName, $this->vTitle, $this->state->get('filter.folder'));
if (JCck::on()) {
JHtmlSidebar::setAction('index.php?option=com_cck&view=templates');
}
}
开发者ID:densem-2013,项目名称:exikom,代码行数:7,代码来源:view.html.php
示例3: display
public function display($cachable = false, $urlparams = false)
{
$app = JFactory::getApplication();
$id = $app->input->getInt('id');
$layout = $app->input->get('layout', 'default');
$view = $app->input->get('view', $this->default_view);
// _setUIX
$this->_setUIX($view, $layout);
if (!($view == 'box' || $view == 'form' || $view == 'list')) {
require_once JPATH_COMPONENT . '/helpers/helper_admin.php';
require_once JPATH_COMPONENT . '/helpers/helper_folder.php';
if (!($layout == 'edit' || $layout == 'edit2')) {
if (!(JCck::on() && $view == $this->default_view)) {
Helper_Admin::addSubmenu($this->default_view, $view);
}
}
if ($view == 'template' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.template', $id) || $view == 'type' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.type', $id) || $view == 'field' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.field', $id) || $view == 'search' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.search', $id) || $view == 'folder' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.folder', $id) || $view == 'site' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.site', $id) || $view == 'version' && $layout == 'edit' && !$this->checkEditId(CCK_COM . '.edit.version', $id)) {
// $this->setError( JText::sprintf( 'JLIB_APPLICATION_ERROR_UNHELD_ID', $id ) );
// $this->setMessage( $this->getError(), 'error' );
// $this->setRedirect( JRoute::_( CCK_LINK.'&view='.$view.'s', false ) );
// return false;
}
}
parent::display();
return $this;
}
开发者ID:olafzieger,项目名称:joomla3.x-seblod-test,代码行数:26,代码来源:controller.php
示例4: prepareToolbar
protected function prepareToolbar()
{
$canDo = Helper_Admin::getActions();
if (JCck::on()) {
JToolBarHelper::title(CCK_LABEL, 'cck-seblod');
} else {
JToolBarHelper::title(' ', 'seblod.png');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences(CCK_ADDON, 560, 840, 'JTOOLBAR_OPTIONS');
}
Helper_Admin::addToolbarSupportButton();
}
开发者ID:densem-2013,项目名称:exikom,代码行数:13,代码来源:view.php
示例5: prepareDisplay
function prepareDisplay()
{
$app = JFactory::getApplication();
$model = $this->getModel();
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->option = $app->input->get('option', '');
Helper_Session::loadExtensionLang($this->item->extension);
Helper_Session::loadExtensionLang($this->item->type);
// Check Errors
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->isNew = @$this->item->id > 0 ? 0 : 1;
Helper_Admin::addToolbarEdit($this->vName, _C8_TEXT, array('isNew' => $this->isNew, 'folder' => 0, 'checked_out' => ''));
}
开发者ID:codigoaberto,项目名称:SEBLOD,代码行数:17,代码来源:view.html.php
示例6: prepareToolbar
public function prepareToolbar()
{
$canDo = Helper_Admin::getActions();
$this->extension = $this->state->get('filter.extension');
if ($this->extension == 'extension') {
JToolBarHelper::title(JText::_('COM_CCK_SESSION_MANAGER'), Helper_Admin::getIcon($this->vName));
return;
}
Helper_Session::loadExtensionLang($this->extension);
JToolBarHelper::title(JText::_('COM_CCK_SESSION_MANAGER') . ' - ' . JText::_($this->extension), Helper_Admin::getIcon($this->vName));
if ($canDo->get('core.delete')) {
JToolBarHelper::custom($this->vName . 's' . '.delete', 'delete', 'delete', 'JTOOLBAR_DELETE', true);
}
require_once JPATH_ADMINISTRATOR . '/components/com_cck/helpers/toolbar/link.php';
JToolBar::getInstance('toolbar')->appendButton('CckLink', 'cck-extension', JText::_($this->extension), JRoute::_('index.php?option=' . $this->extension), '_self');
$this->sidebar = '';
}
开发者ID:hamby,项目名称:SEBLOD,代码行数:17,代码来源:view.html.php
示例7: prepareDisplay
function prepareDisplay()
{
$app = JFactory::getApplication();
$model = $this->getModel();
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->option = $app->input->get('option', '');
$this->state = $this->get('State');
// Check Errors
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->isNew = @$this->item->id > 0 ? 0 : 1;
$type = $this->item->e_type ? $this->item->e_type : 'type';
$this->item->title = JCckDatabase::loadResult('SELECT title FROM #__cck_core_' . $type . 's WHERE id = ' . (int) $this->item->e_id);
Helper_Admin::addToolbarEdit($this->vName, _C6_TEXT, array('isNew' => $this->isNew, 'folder' => 0, 'checked_out' => $this->item->checked_out));
}
开发者ID:densem-2013,项目名称:exikom,代码行数:18,代码来源:view.html.php
示例8: prepareDisplay
function prepareDisplay()
{
$app = JFactory::getApplication();
$model = $this->getModel();
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->option = $app->input->get('option', '');
$this->state = $this->get('State');
// Check Errors
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->isNew = @$this->item->id > 0 ? 0 : 1;
$this->item->folder = Helper_Admin::getSelected($this->vName, 'folder', $this->item->folder, 1);
$this->item->published = Helper_Admin::getSelected($this->vName, 'state', $this->isNew ? $this->state->get('ajax.state') : $this->item->published, 1);
$this->item->type = Helper_Admin::getSelected($this->vName, 'type', $app->input->getString('ajax_type', $this->state->get('ajax.type', $this->item->type)), 'text');
Helper_Admin::addToolbarEdit($this->vName, _C3_TEXT, array('isNew' => $this->isNew, 'folder' => $this->state->get('filter.folder'), 'checked_out' => $this->item->checked_out));
}
开发者ID:hamby,项目名称:SEBLOD,代码行数:19,代码来源:view.raw.php
示例9: prepareDisplay
function prepareDisplay()
{
$app = JFactory::getApplication();
$model = $this->getModel();
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->option = $app->input->get('option', '');
$this->state = $this->get('State');
// Check Errors
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->isNew = @$this->item->id > 0 ? 0 : 1;
$this->item->published = Helper_Admin::getSelected($this->vName, 'state', $this->item->published, 1);
$this->item->type = $this->state->get('type', '2,7');
$this->item->fields = JCck::getConfig_Param('multisite_options', array());
$this->item->options = $this->item->options ? JCckDev::fromJSON($this->item->options) : array();
Helper_Admin::addToolbarEdit($this->vName, _C5_TEXT, array('isNew' => $this->isNew, 'folder' => 0, 'checked_out' => $this->item->checked_out));
}
开发者ID:hamby,项目名称:SEBLOD,代码行数:20,代码来源:view.html.php
示例10: defined
<?php
/**
* @version SEBLOD 3.x Core ~ $Id: new.php sebastienheraud $
* @package SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url http://www.seblod.com
* @editor Octopoos - www.octopoos.com
* @copyright Copyright (C) 2013 SEBLOD. All Rights Reserved.
* @license GNU General Public License version 2 or later; see _LICENSE.php
**/
defined('_JEXEC') or die;
$elem = JText::_('COM_CCK_' . _C2_TEXT);
Helper_Include::addDependencies($this->getName(), $this->getLayout());
$options = array();
$options[] = JHtml::_('select.option', 0, '- ' . JText::_('COM_CCK_NONE') . ' -', 'value', 'text');
$options2 = Helper_Admin::getFolderOptions(false, false, true, true, '', true);
if (count($options2)) {
$options = array_merge($options, $options2);
}
$lists['featured'] = JHtml::_('select.genericlist', $options, 'featured', 'class="inputbox" size="1"', 'value', 'text', 10, 'featured');
$doc = JFactory::getDocument();
$js = '
(function ($){
JCck.Dev = {
submit: function() {
var skeleton_id = $("#featured").val();
var tpl_a = $("#tpl_admin").val();
var tpl_s = $("#tpl_site").val();
var tpl_c = $("#tpl_content").val();
var tpl_i = $("#tpl_intro").val();
var url = "index.php?option=com_cck&task=type.add&skeleton_id="+skeleton_id+"&tpl_a="+tpl_a+"&tpl_s="+tpl_s+"&tpl_c="+tpl_c+"&tpl_i="+tpl_i;
开发者ID:olafzieger,项目名称:joomla3.x-seblod-test,代码行数:31,代码来源:new.php
示例11:
<?php
if ($uix == 'compact') {
echo '<div class="fltlft">';
Helper_Admin::addIcon(CCK_COM, _C2_LINK, _C2_NAME, JText::_('COM_CCK_' . _C2_TEXT . '_MANAGER' . '_BR'));
Helper_Admin::addIcon(CCK_COM, _C0_LINK, _C0_NAME, JText::_('COM_CCK_' . _C0_TEXT . '_MANAGER' . '_BR'));
echo '</div>';
} else {
echo '<div class="fltlft">';
Helper_Admin::addIcon(CCK_COM, _C2_LINK, _C2_NAME, JText::_('COM_CCK_' . _C2_TEXT . '_MANAGER' . '_BR'));
Helper_Admin::addIcon(CCK_COM, _C3_LINK, _C3_NAME, JText::_(_C3_TEXT . '_MANAGER' . '_BR'));
Helper_Admin::addIcon(CCK_COM, _C4_LINK, _C4_NAME, JText::_('COM_CCK_' . _C4_TEXT . '_MANAGER' . '_BR'));
Helper_Admin::addIcon(CCK_COM, _C1_LINK, _C1_NAME, JText::_(_C1_TEXT . '_MANAGER' . '_BR'));
echo '</div><div class="clr"></div>' . '<div class="fltlft">';
Helper_Admin::addIcon(CCK_COM, 'spacer', 'spacer', 'spacer', 24);
Helper_Admin::addIcon(CCK_COM, _C0_LINK, _C0_NAME, JText::_('COM_CCK_' . _C0_TEXT . '_MANAGER' . '_BR'), 24, 'left');
Helper_Admin::addIcon(CCK_COM, _C5_LINK, _C5_NAME, JText::_(_C5_TEXT . '_MANAGER' . '_BR'), 24, 'right');
echo '</div>';
}
?>
</div>
<?php
if ($uix == 'compact') {
echo JCckDevAccordion::open('cckOptions', 'collapse1', JText::_('COM_CCK_PANE_NANO'));
?>
<div class="<?php
echo $this->css['items'];
?>
">
<ul class="adminformlist">
<li>
<span class="variation_value" style="font-size:12px; font-style:italic; text-align:center;"><?php
开发者ID:densem-2013,项目名称:exikom,代码行数:31,代码来源:default.php
示例12: clearACL
public function clearACL($pks)
{
require_once JPATH_COMPONENT . '/helpers/helper_admin.php';
if (count($pks)) {
return Helper_Admin::initACL(array('table' => 'folder', 'name' => 'folder', 'rules' => '{"core.create":[],"core.delete":[],"core.edit":[],"core.edit.state":[],"core.edit.own":[]}'), $pks);
}
return false;
}
开发者ID:hamby,项目名称:SEBLOD,代码行数:8,代码来源:folder.php
示例13: getParams
public static function getParams($element, $master, $client)
{
$data = array();
$data['_'] = array('add' => JText::_('COM_CCK_ADD'), 'configure' => JText::_('COM_CCK_CONFIGURE'), 'edit' => JText::_('COM_CCK_EDIT'), 'optional' => JText::_('COM_CCK_OPTIONAL'), 'required' => JText::_('COM_CCK_REQUIRED'));
if ($element == 'type') {
if ($master == 'content') {
$data['link'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_NONE'))), Helper_Admin::getPluginOptions('field_link', 'cck_', false, false, true));
$data['typo'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_NONE'))), Helper_Admin::getPluginOptions('field_typo', 'cck_', false, false, true));
$data['markup'] = array(JHtml::_('select.option', '', JText::_('COM_CCK_DEFAULT')), JHtml::_('select.option', 'none', JText::_('COM_CCK_NONE')));
$data['access'] = JCckDatabase::loadObjectList('SELECT a.id AS value, a.title AS text FROM #__viewlevels AS a GROUP BY a.id ORDER BY title ASC');
$data['restriction'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_NONE'))), Helper_Admin::getPluginOptions('field_restriction', 'cck_', false, false, true));
} else {
$data['client'] = $client;
$data['variation'] = array(JHtml::_('select.option', 'hidden', JText::_('COM_CCK_HIDDEN')), JHtml::_('select.option', 'value', JText::_('COM_CCK_VALUE')), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_FORM')), JHtml::_('select.option', '', JText::_('COM_CCK_DEFAULT')), JHtml::_('select.option', 'disabled', JText::_('COM_CCK_FORM_DISABLED')), JHtml::_('select.option', '</OPTGROUP>', ''));
$data['live'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_DEFAULT'))), Helper_Admin::getPluginOptions('field_live', 'cck_', false, false, true));
$data['stage'] = array(JHtml::_('select.option', 0, JText::_('COM_CCK_STAGE_FINAL')), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_STAGE_TEMP')), JHtml::_('select.option', 1, JText::_('COM_CCK_STAGE_1ST')), JHtml::_('select.option', 2, JText::_('COM_CCK_STAGE_2ND')), JHtml::_('select.option', 3, JText::_('COM_CCK_STAGE_3RD')), JHtml::_('select.option', 4, JText::_('COM_CCK_STAGE_4TH')), JHtml::_('select.option', 5, JText::_('COM_CCK_STAGE_5TH')), JHtml::_('select.option', '</OPTGROUP>', ''));
$data['markup'] = array(JHtml::_('select.option', '', JText::_('COM_CCK_DEFAULT')), JHtml::_('select.option', 'none', JText::_('COM_CCK_NONE')));
$data['access'] = JCckDatabase::loadObjectList('SELECT a.id AS value, a.title AS text FROM #__viewlevels AS a GROUP BY a.id ORDER BY title ASC');
$data['validation'] = true;
$data['restriction'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_NONE'))), Helper_Admin::getPluginOptions('field_restriction', 'cck_', false, false, true));
}
} else {
if ($master == 'order') {
$data['match_mode'] = array(JHtml::_('select.option', 'ASC', JText::_('COM_CCK_ASCENDING')), JHtml::_('select.option', 'DESC', JText::_('COM_CCK_DESCENDING')), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_CUSTOM')), JHtml::_('select.option', 'FIELD', JText::_('COM_CCK_VALUES')), JHtml::_('select.option', '</OPTGROUP>', ''));
} elseif ($master == 'content') {
$data['link'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_NONE'))), Helper_Admin::getPluginOptions('field_link', 'cck_', false, false, true));
$data['typo'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_NONE'))), Helper_Admin::getPluginOptions('field_typo', 'cck_', false, false, true));
$data['markup'] = array(JHtml::_('select.option', '', JText::_('COM_CCK_DEFAULT')), JHtml::_('select.option', 'none', JText::_('COM_CCK_NONE')));
$data['access'] = JCckDatabase::loadObjectList('SELECT a.id AS value, a.title AS text FROM #__viewlevels AS a GROUP BY a.id ORDER BY title ASC');
$data['restriction'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_NONE'))), Helper_Admin::getPluginOptions('field_restriction', 'cck_', false, false, true));
} else {
$data['client'] = $client;
$data['variation'] = array(JHtml::_('select.option', 'hidden', JText::_('COM_CCK_HIDDEN')), JHtml::_('select.option', 'value', JText::_('COM_CCK_VALUE')), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_FORM')), JHtml::_('select.option', '', JText::_('COM_CCK_DEFAULT')), JHtml::_('select.option', 'form_filter', JText::_('COM_CCK_FORM_FILTER')), JHtml::_('select.option', 'disabled', JText::_('COM_CCK_FORM_DISABLED')), JHtml::_('select.option', '</OPTGROUP>', ''));
$data['match_mode'] = array(JHtml::_('select.option', 'none', JText::_('COM_CCK_NONE')), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_MATCH_GROUP_BASIC')), JHtml::_('select.option', 'alpha', JText::_('COM_CCK_MATCH_BEGINNING_WITH')), JHtml::_('select.option', 'empty', JText::_('COM_CCK_MATCH_EMPTY')), JHtml::_('select.option', 'zeta', JText::_('COM_CCK_MATCH_ENDING_WITH')), JHtml::_('select.option', 'exact', JText::_('COM_CCK_MATCH_EXACT_PHRASE')), JHtml::_('select.option', '', JText::_('COM_CCK_MATCH_DEFAULT_PHRASE')), JHtml::_('select.option', '</OPTGROUP>', ''), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_MATCH_GROUP_DATE_AND_TIME')), JHtml::_('select.option', 'date_past_only', JText::_('COM_CCK_MATCH_DATE_PAST_ONLY')), JHtml::_('select.option', 'date_past', JText::_('COM_CCK_MATCH_DATE_PAST')), JHtml::_('select.option', 'date_future', JText::_('COM_CCK_MATCH_DATE_FUTURE')), JHtml::_('select.option', 'date_future_only', JText::_('COM_CCK_MATCH_DATE_FUTURE_ONLY')), JHtml::_('select.option', '</OPTGROUP>', ''), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_MATCH_GROUP_EXCLUSION')), JHtml::_('select.option', 'not_alpha', JText::_('COM_CCK_MATCH_NOT_BEGINNING_WITH')), JHtml::_('select.option', 'not_empty', JText::_('COM_CCK_MATCH_NOT_EMPTY')), JHtml::_('select.option', 'not_zeta', JText::_('COM_CCK_MATCH_NOT_ENDING_WITH')), JHtml::_('select.option', 'not_equal', JText::_('COM_CCK_MATCH_NOT_EQUAL')), JHtml::_('select.option', 'not_null', JText::_('COM_CCK_MATCH_NOT_NULL')), JHtml::_('select.option', 'not_any_exact', JText::_('COM_CCK_MATCH_NOT_ANY_WORDS_EXACT')), JHtml::_('select.option', 'not_like', JText::_('COM_CCK_MATCH_NOT_LIKE')), JHtml::_('select.option', '</OPTGROUP>', ''), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_MATCH_GROUP_GEO_DISTANCE')), JHtml::_('select.option', 'radius_higher', JText::_('COM_CCK_MATCH_RADIUS_HIGHER')), JHtml::_('select.option', 'radius_lower', JText::_('COM_CCK_MATCH_RADIUS_LOWER')), JHtml::_('select.option', '</OPTGROUP>', ''), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_MATCH_GROUP_NULL')), JHtml::_('select.option', 'is_null', JText::_('COM_CCK_MATCH_IS_NULL')), JHtml::_('select.option', 'is_not_null', JText::_('COM_CCK_MATCH_IS_NOT_NULL')), JHtml::_('select.option', '</OPTGROUP>', ''), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_MATCH_GROUP_NUMERIC')), JHtml::_('select.option', 'num_higher_only', JText::_('COM_CCK_MATCH_NUMERIC_HIGHER_ONLY')), JHtml::_('select.option', 'num_higher', JText::_('COM_CCK_MATCH_NUMERIC_HIGHER')), JHtml::_('select.option', 'num_lower', JText::_('COM_CCK_MATCH_NUMERIC_LOWER')), JHtml::_('select.option', 'num_lower_only', JText::_('COM_CCK_MATCH_NUMERIC_LOWER_ONLY')), JHtml::_('select.option', '</OPTGROUP>', ''), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_MATCH_GROUP_WORDS')), JHtml::_('select.option', 'any', JText::_('COM_CCK_MATCH_ANY_WORDS')), JHtml::_('select.option', 'any_exact', JText::_('COM_CCK_MATCH_ANY_WORDS_EXACT')), JHtml::_('select.option', 'each', JText::_('COM_CCK_MATCH_EACH_WORD')), JHtml::_('select.option', 'each_exact', JText::_('COM_CCK_MATCH_EACH_WORD_EXACT')), JHtml::_('select.option', 'nested_exact', JText::_('COM_CCK_MATCH_NESTED_EXACT')), JHtml::_('select.option', '</OPTGROUP>', ''));
$data['live'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_DEFAULT')), JHtml::_('select.option', 'stage', JText::_('COM_CCK_STAGE'))), Helper_Admin::getPluginOptions('field_live', 'cck_', false, false, true));
$data['stage'] = array(JHtml::_('select.option', 0, JText::_('COM_CCK_STAGE_FINAL')), JHtml::_('select.option', '<OPTGROUP>', JText::_('COM_CCK_STAGE_TEMP')), JHtml::_('select.option', 1, JText::_('COM_CCK_STAGE_1ST')), JHtml::_('select.option', 2, JText::_('COM_CCK_STAGE_2ND')), JHtml::_('select.option', 3, JText::_('COM_CCK_STAGE_3RD')), JHtml::_('select.option', 4, JText::_('COM_CCK_STAGE_4TH')), JHtml::_('select.option', 5, JText::_('COM_CCK_STAGE_5TH')), JHtml::_('select.option', '</OPTGROUP>', ''));
$data['markup'] = array(JHtml::_('select.option', '', JText::_('COM_CCK_DEFAULT')), JHtml::_('select.option', 'none', JText::_('COM_CCK_NONE')));
$data['access'] = JCckDatabase::loadObjectList('SELECT a.id AS value, a.title AS text FROM #__viewlevels AS a GROUP BY a.id ORDER BY title ASC');
$data['validation'] = true;
$data['restriction'] = array_merge(array(JHtml::_('select.option', '', JText::_('COM_CCK_NONE'))), Helper_Admin::getPluginOptions('field_restriction', 'cck_', false, false, true));
}
}
return $data;
}
开发者ID:pierre-H,项目名称:SEBLOD,代码行数:44,代码来源:helper_workshop.php
示例14: prepareDisplay_Ajax
function prepareDisplay_Ajax()
{
// Fields
if ($this->item->cck_type != '' && !$this->item->skip) {
$pos = isset($this->style->positions[0]->value) ? $this->style->positions[0]->value : 'mainbody';
$this->fields = Helper_Workshop::getFields('search', $this->item, 'a.name = "cck"', false, false, $pos);
$this->fields[$pos][0]->variation = 'hidden';
$this->fields[$pos][0]->match_mode = 'exact';
$this->fields[$pos][0]->live_value = $this->item->cck_type;
$this->fieldsAv = Helper_Workshop::getFieldsAv('search', $this->item, '', 'a.name != "cck"');
} else {
$this->fields = Helper_Workshop::getFields('search', $this->item);
$this->fieldsAv = Helper_Workshop::getFieldsAv('search', $this->item, '');
}
$this->type_fields = JCckDatabase::loadObjectList('SELECT fieldid, GROUP_CONCAT(DISTINCT typeid separator " c-") AS cc FROM #__cck_core_type_field group by fieldid', 'fieldid');
// Positions
$positions = Helper_Workshop::getPositions('search', $this->item);
if (is_object($this->style) && count($this->style->positions)) {
$this->positions = array();
foreach ($this->style->positions as $p) {
if ($p->value) {
$this->positions[$p->value] = new stdClass();
$this->positions[$p->value]->title = $p->text;
$this->positions[$p->value]->name = $p->value;
$this->positions[$p->value]->disable = false;
$this->positions[$p->value]->legend = @$positions[$p->value]->legend;
$this->positions[$p->value]->variation = @$positions[$p->value]->variation;
$this->positions[$p->value]->variation_options = @$positions[$p->value]->variation_options;
$this->positions[$p->value]->width = @$positions[$p->value]->width;
$this->positions[$p->value]->height = @$positions[$p->value]->height;
$this->positions[$p->value]->css = @$positions[$p->value]->css;
}
}
} else {
$this->positions = array('mainbody' => (object) array('title' => '(mainbody)', 'name' => 'mainbody', 'disable' => false, 'legend' => '', 'variation' => '', 'variation_options' => '', 'width' => '', 'height' => ''));
}
$this->positions_nb = count($this->positions);
$this->variations = Helper_Workshop::getPositionVariations($this->item->template);
// Filters
$max_width = JCck::on() ? '' : ' style="max-width:180px;"';
$default_f = $this->item->id > 0 ? $this->item->folder : '';
$options = Helper_Admin::getPluginOptions('field', 'cck_', true, false, true);
$this->lists['af_t'] = JHtml::_('select.genericlist', $options, 'filter_type', 'class="inputbox filter" size="1" prefix="t-"' . $max_width, 'value', 'text', '', 'filter1');
$options = Helper_Admin::getAlphaOptions(true);
$this->lists['af_a'] = JHtml::_('select.genericlist', $options, 'filter_alpha', 'class="inputbox filter" size="1" prefix="a-"', 'value', 'text', '', 'filter3');
$options = Helper_Admin::getTypeOptions(true, false);
$this->lists['af_c'] = JHtml::_('select.genericlist', $options, 'filter_type', 'class="inputbox filter" size="1" prefix="c-"' . $max_width, 'value', 'text', '', 'filter4');
$options = Helper_Admin::getFolderOptions(true, true, false, true, 'field');
$this->lists['af_f'] = JHtml::_('select.genericlist', $options, 'filter_folder', 'class="inputbox filter" size="1" prefix="f-"' . $max_width, 'value', 'text', $default_f, 'filter2');
}
开发者ID:pctechnikch,项目名称:SEBLOD,代码行数:50,代码来源:view.raw.php
示例15: array
<?php
echo JCckDev::renderForm('core_dev_select', '', $config, array('label' => 'Required', 'selectlabel' => '', 'options' => 'No=||Yes=required||Yes GroupRequired=grouprequired', 'storage_field' => 'required'));
echo JCckDev::renderForm('core_dev_text', '', $config, array('label' => 'Alert', 'storage_field' => 'required_alert'));
echo JCckDev::renderBlank('<input type="hidden" id="blank_li" value="" />');
echo JCckDev::renderForm('core_dev_text', '', $config, array('label' => 'Group', 'required' => 'required', 'storage_field' => 'required2'));
?>
</ul>
</div>
<div class="seblod">
<?php
echo JCckDev::renderLegend(JText::_('COM_CCK_VALIDATION'));
?>
<div id="loading" class="loading"></div>
<ul class="adminformlist adminformlist-2cols">
<?php
$options = Helper_Admin::getPluginOptions('field_validation', 'cck_', false, true, true, array('required'));
$validation = JHtml::_('select.genericlist', $options, 'validation', 'class="inputbox select" style="max-width:175px;"', 'value', 'text', $name, 'validation');
?>
<li><label><?php
echo JText::_('COM_CCK_VALIDATION');
?>
</label><?php
echo $validation;
?>
</li>
<?php
echo JCckDev::renderForm('core_validation_alert', '', $config);
?>
</ul>
<ul id="layer" class="adminformlist adminformlist-2cols">
<?php
开发者ID:hamby,项目名称:SEBLOD,代码行数:31,代码来源:validation.php
示例16: foreach
<tbody>
<?php
foreach ($this->items as $i => $item) {
$checkedOut = !($item->checked_out == $userId || $item->checked_out == 0);
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0;
$canChange = $user->authorise('core.edit.state', CCK_COM . '.folder.' . $item->id) && $canCheckin;
$canEdit = $user->authorise('core.edit', CCK_COM . '.folder.' . $item->id);
$canEditOwn = '';
$last = $item->id == 1 ? ' last' : '';
$link = JRoute::_('index.php?option=' . $this->option . '&task=folder.edit&id=' . $item->id);
$linkTemplate = JRoute::_('index.php?option=' . $this->option . '&view=' . _C1_NAME . '&folder_id=' . $item->id);
$linkType = JRoute::_('index.php?option=' . $this->option . '&view=' . _C2_NAME . '&folder_id=' . $item->id);
$linkField = JRoute::_('index.php?option=' . $this->option . '&view=' . _C3_NAME . '&folder_id=' . $item->id);
$linkSearch = JRoute::_('index.php?option=' . $this->option . '&view=' . _C4_NAME . '&folder_id=' . $item->id);
$linkFilter = JRoute::_('index.php?option=' . $this->option . '&view=' . $this->getName() . '&folder_id=' . $item->id);
Helper_Admin::addFolderClass($css, $item->id, $item->color, $item->colorchar, '60');
?>
<tr class="row<?php
echo $i % 2;
echo $last;
?>
" height="64px;">
<td class="center hidden-phone"><?php
Helper_Display::quickSlideTo('pagination-bottom', $i + 1);
?>
</td>
<td class="center hidden-phone"><?php
echo JHtml::_('grid.id', $i, $item->id);
?>
</td>
<td>
开发者ID:hamby,项目名称:SEBLOD,代码行数:31,代码来源:default_compact.php
示例17: prepareDisplay_Ajax
function prepareDisplay_Ajax()
{
$featured = $this->state->get('skeleton_id', 0);
// Fields
$objects = '';
$pos = isset($this->style->positions[0]->value) ? $this->style->positions[0]->value : 'mainbody';
$this->fields = Helper_Workshop::getFields('type', $this->item, 'a.folder = ' . (int) $featured, false, false, $pos);
$this->fieldsAv = Helper_Workshop::getFieldsAv('type', $this->item, $objects, 'a.folder != ' . (int) $featured);
$this->type_fields = JCckDatabase::loadObjectList('SELECT fieldid, GROUP_CONCAT(DISTINCT typeid separator " c-") AS cc FROM #__cck_core_type_field group by fieldid', 'fieldid');
// Positions
$positions = Helper_Workshop::getPositions('type', $this->item);
if (count($this->style->positions)) {
$this->positions = array();
foreach ($this->style->positions as $p) {
if ($p->value) {
$this->positions[$p->value] = new stdClass();
$this->positions[$p->value]->title = $p->text;
$this->positions[$p->value]->name = $p->value;
$this->positions[$p->value]->disable = false;
$this->positions[$p->value]->legend = @$positions[$p->value]->legend;
$this->positions[$p->value]->variation = @$positions[$p->value]->variation;
$this->positions[$p->value]->variation_options = @$positions[$p->value]->variation_options;
$this->positions[$p->value]->width = @$positions[$p->value]->width;
$this->positions[$p->value]->height = @$positions[$p->value]->height;
}
}
}
$this->positions_nb = count($this->positions);
$this->variations = Helper_Workshop::getPositionVariations($this->style->template);
// Filters
$max_width = JCck::on() ? '' : ' style="max-width:180px;"';
$default_f = $this->item->id > 0 ? $this->item->folder : '';
$options = Helper_Admin::getPluginOptions('field', 'cck_', true, false, true);
$this->lists['af_t'] = JHtml::_('select.genericlist', $options, 'filter_type', 'class="inputbox filter input-medium" prefix="t-"' . $max_width, 'value', 'text', '', 'filter1');
$options = Helper_Admin::getAlphaOptions(true);
$this->lists['af_a'] = JHtml::_('select.genericlist', $options, 'filter_alpha', 'class="inputbox filter input-medium" prefix="a-"', 'value', 'text', '', 'filter3');
$options = Helper_Admin::getTypeOptions(true, false);
$this->lists['af_c'] = JHtml::_('select.genericlist', $options, 'filter_type', 'class="inputbox filter input-medium" prefix="c-"' . $max_width, 'value', 'text', '', 'filter4');
$options = Helper_Admin::getFolderOptions(true, true, false, true, 'field');
$this->lists['af_f'] = JHtml::_('select.genericlist', $options, 'filter_folder', 'class="inputbox filter input-medium" prefix="f-"' . $max_width, 'value', 'text', $default_f, 'filter2');
}
开发者ID:codigoaberto,项目名称:SEBLOD,代码行数:41,代码来源:view.raw.php
示例18: prepareDisplay
function prepareDisplay()
{
$app = JFactory::getApplication();
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->option = $app->input->get('option', '');
$this->state = $this->get('State');
// Check Errors
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
if (@$this->item->id > 0) {
$this->isNew = 0;
$this->panel_class = 'closed';
$this->panel_style = 'display:none; ';
$name = $this->item->name;
$app->setUserState(CCK_COM . '.edit.type.client', NULL);
} else {
$this->isNew = 1;
$this->panel_class = 'open';
$this->panel_style = '';
$name = '';
$featured = $this->state->get('skeleton_id', 0);
if ($featured == 11) {
$this->item->storage_location = 'joomla_category';
} elseif ($featured == 13) {
$this->item->storage_location = 'joomla_user';
} elseif ($featured == 14) {
$this->item->storage_location = 'joomla_user_group';
}
}
$this->item->folder = Helper_Admin::getSelected($this->vName, 'folder', $this->item->folder, 1);
$this->item->published = Helper_Admin::getSelected($this->vName, 'state', $this->item->published, 1);
$this->item->client = $this->isNew ? 'admin' : $this->state->get('client', $app->input->cookie->getString('cck_type' . $name . '_client', 'admin'));
$this->item->master = $this->item->client == 'content' || $this->item->client == 'intro' ? 'content' : 'form';
$this->item->layer = $app->input->getString('layer', 'fields');
$P = 'template_' . $this->item->client;
$this->style = Helper_Workshop::getTemplateStyle($this->vName, $this->item->{$P}, $this->state->get('tpl.' . $this->item->client, 'seb_one'));
$this->item->template = $this->style->template;
$this->insidebox = Helper_Admin::addInsidebox($this->isNew);
Helper_Admin::addToolbarEdit($this->vName, 'COM_CCK_' . _C2_TEXT, array('isNew' => $this->isNew, 'folder' => $this->state->get('filter.folder'), 'checked_out' => $this->item->checked_out), array('template' => $this->style->template));
}
开发者ID:olafzieger,项目名称:joomla3.x-seblod-test,代码行数:43,代码来源:view.html.php
示例19: prepareDisplay
function prepareDisplay()
{
$app = JFactory::getApplication();
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->option = $app->input->get('option', '');
$this->state = $this->get('State');
// Check Errors
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->item->cck_type = $this->state->get('content_type', '');
$this->item->skip = $this->state->get('skip');
if (@$this->item->id > 0) {
$this->isNew = 0;
$this->panel_class = 'closed';
$this->panel_style = 'display:none; ';
$name = $this->item->name;
$app->setUserState(CCK_COM . '.edit.search.client', NULL);
} else {
$this->isNew = 1;
$this->panel_class = 'open';
$this->panel_style = '';
$name = '';
if ($this->item->cck_type != '') {
$this->item->storage_location = JCckDatabase::loadResult('SELECT storage_location FROM #__cck_core_types WHERE name = "' . $this->item->cck_type . '"');
if ($this->item->storage_location == 'none') {
$this->item->storage_location = '';
}
}
$this->tpl_list = $this->state->get('tpl.list');
}
$this->item->folder = Helper_Admin::getSelected($this->vName, 'folder', $this->item->folder, 1);
$this->item->published = Helper_Admin::getSelected($this->vName, 'state', $this->item->published, 1);
if ($this->item->skip != '') {
$this->item->client = $this->item->skip;
$this->item->master = $this->item->client == 'list' || $this->item->client == 'item' ? 'content' : ($this->item->client == 'order' ? 'order' : 'search');
$this->item->layer = $app->input->getString('layer', 'fields');
$P = 'template_' . $this->item->client;
$force_template = $this->item->client == 'list' ? $this->state->get('tpl.list') : Helper_Workshop::getDefaultTemplate();
} else {
$this-
|
请发表评论