コード例 #1
0
ファイル: html.php プロジェクト: janssit/www.gincoprojects.be
 public function display($tpl = null)
 {
     $prefix = $this->getClassName('prefix');
     //Set the main stylesheet for the component
     KViewHelper::_('stylesheet', $prefix . '.css', 'media/com_' . $prefix . '/css/');
     parent::display($tpl);
 }
コード例 #2
0
ファイル: list.php プロジェクト: janssit/www.reliancelaw.be
 /**
  * Build the select list for access level
  */
 public static function accesslevel($row)
 {
     $db = KFactory::get('lib.joomla.database');
     $query = 'SELECT id AS value, name AS text' . ' FROM #__groups' . ' ORDER BY id';
     $db->setQuery($query);
     $groups = $db->loadObjectList();
     $access = KViewHelper::_('select.genericlist', $groups, 'access', 'class="inputbox" size="3"', 'value', 'text', intval($row->access), '', 1);
     return $access;
 }
コード例 #3
0
 public static function combobox($selected, $select, $table, $project_id)
 {
     $db = KFactory::get('lib.joomla.database');
     $query = 'SELECT DISTINCT ' . $select . ' FROM ' . $table . ' WHERE immotoa_project_id = ' . $project_id;
     $db->select($query);
     $items = $db->loadObjectList($select);
     // build the HTML list
     return KViewHelper::_('select.genericlist', $items, $select, 'type="comboBox" style="width:110px;"', $select, $select, $selected);
 }
コード例 #4
0
ファイル: load.php プロジェクト: janssit/www.casaiberico.be
 /**
  * Load ext-base.js
  */
 public static function base()
 {
     // Only load once
     if (isset(self::$_loaded['ext-base'])) {
         return;
     }
     // Include blank image
     self::_blank();
     KViewHelper::script('ext-base.js', self::getUri() . 'adapter/ext/', false);
     self::$_loaded['ext-base'] = true;
 }
コード例 #5
0
ファイル: extjs.php プロジェクト: janssit/www.casaiberico.be
 public function onAfterInitialise()
 {
     if (!defined('KOOWA')) {
         JError::raiseNotice('The Ext JS plugin requires the Koowa plugin to be installed and enabled. Make sure the Koowa plugin is listed first.');
         return;
     }
     // Add our own html helpers
     KViewHelper::addIncludePath(dirname(__FILE__) . DS . 'extjs' . DS . 'helpers');
     /**
      * plg_extjs is active
      */
     define('EXTJS', 1);
 }
コード例 #6
0
ファイル: node.php プロジェクト: janssit/www.reliancelaw.be
 public static function link($title, $table_name, $id, $iso_code, $tooltip = true, $icon = true)
 {
     KViewHelper::_('behavior.tooltip');
     KViewHelper::_('behavior.modal');
     // Create edit links to items
     $links = KFactory::get('admin::com.nooku.model.editlinks')->getLinks();
     if (array_key_exists($table_name, $links)) {
         $tooltip = $tooltip ? ' class="editlinktip hasTip" title="' . JText::_('Edit') . " {$table_name} ({$iso_code})::{$title}" . '"' : '';
         $class = $icon ? ' class="editlink"' : '';
         $link = JRoute::_('index.php?option=com_nooku&view=node&task=edit&type=' . $table_name . '&id=' . $id . '&lang=' . $iso_code);
         $result = "<span {$tooltip}>" . '<a href="' . $link . '" "' . $class . '">' . $title . '</a>' . '</span>';
     } else {
         $result = "<span>" . $title . '</span>';
     }
     return $result;
 }
コード例 #7
0
ファイル: nooku.php プロジェクト: janssit/www.reliancelaw.be
 /**
  * Handle the onDisplay event for the button
  *
  * @return object A JObject containing the button settings
  */
 function onDisplay($name)
 {
     if (!KFactory::get('admin::com.nooku.model.permissions')->canTranslate() || KInput::get('option', array('post', 'get'), 'cmd') != 'com_content' || KInput::get('task', array('post', 'get'), 'cmd') != 'edit') {
         return new JObject();
     }
     KViewHelper::_('behavior.modal');
     $doc = KFactory::get('lib.joomla.document');
     $css = ' .button2-left .translate { ' . ' 	background:transparent url( ' . Nooku::getURL('media') . 'images/button_translate.png) no-repeat scroll 100% 0pt;' . ' } ';
     $doc->addStyleDeclaration($css);
     $cid = KInput::get('cid', array('post', 'get'), 'array.ints');
     $cid = (int) $cid[0];
     if ($cid === 0) {
         $cid = KInput::get('id', array('post', 'get'), 'string', 'int');
     }
     $button = new JObject();
     $button->set('modal', true);
     $button->set('link', 'index.php?option=com_nooku&amp;view=translate&amp;tmpl=component&amp;id=' . $cid . '&amp;editor=' . $name);
     $button->set('text', JText::_('Translate'));
     $button->set('name', 'translate');
     $button->set('options', "{handler: 'iframe', size: {x: 900, y: 600}}");
     return $button;
 }
コード例 #8
0
 public function fetchElement($name, $value, &$node, $control_name)
 {
     $db = KFactory::get('lib.joomla.database');
     KViewHelper::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_nooku' . DS . 'helpers');
     return KViewHelper::_('nooku.select.languages', $value, $control_name . '[' . $name . ']', array('class' => 'inputbox', 'size' => '1'), null, false);
 }
コード例 #9
0
ファイル: grid.php プロジェクト: janssit/www.gincoprojects.be
 protected static function _checkedOut(&$row, $overlib = 1)
 {
     $hover = '';
     if ($overlib) {
         $text = addslashes(htmlspecialchars($row->editor));
         $date = KViewHelper::_('date', $row->checked_out_time, '%A, %d %B %Y');
         $time = KViewHelper::_('date', $row->checked_out_time, '%H:%M');
         $hover = '<span class="editlinktip hasTip" title="' . JText::_('Checked Out') . '::' . $text . '<br />' . $date . '<br />' . $time . '">';
     }
     $checked = $hover . '<img src="images/checked_out.png"/></span>';
     return $checked;
 }
コード例 #10
0
 /**
  * Write a <script></script> element
  *
  * @access	public
  * @param	string 	The name of the script file
  * @param	string 	The relative or absolute path of the script file
  * @param	boolean If true, the mootools library will be loaded
  */
 public static function script($filename, $path = 'media/plg_koowa/js/', $mootools = true)
 {
     // Include mootools framework
     if ($mootools) {
         KViewHelper::_('behavior.mootools');
     }
     if (strpos($path, 'http') !== 0 && $path[0] != '/') {
         $path = JURI::root(true) . '/' . $path;
     }
     $document = KFactory::get('lib.joomla.document');
     $document->addScript($path . $filename);
     return;
 }
コード例 #11
0
ファイル: select.php プロジェクト: janssit/www.reliancelaw.be
 public static function langpacks($selected = null)
 {
     $list = KFactory::get('admin::com.nooku.model.langpacks')->getList();
     $unused = KFactory::get('admin::com.nooku.model.langpacks')->getUnused();
     $empty = new stdClass();
     $empty->name = '- ' . JText::_('Select a language pack') . ' -';
     $empty->iso_code = '';
     $custom = new stdClass();
     $custom->name = JText::_('Custom');
     $custom->iso_code = 'custom';
     $install = new stdClass();
     $install->name = JText::_('Install a language pack...');
     $install->iso_code = 'install';
     if (empty($selected)) {
         // new item
         $disabled = null;
         $selected = '';
         $arr = $unused;
     } else {
         // existing record
         $disabled = 'disabled="disabled"';
         $selected = in_array($selected, array_keys($list)) ? $selected : 'custom';
         $arr = $list;
     }
     array_unshift($arr, $empty);
     array_push($arr, $custom);
     array_push($arr, $install);
     $html = KViewHelper::_('select.genericlist', $arr, 'langpack', $disabled, 'iso_code', 'name', $selected);
     return $html;
 }
コード例 #12
0
 public static function calendar()
 {
     $document = KFactory::get('lib.joomla.document');
     KViewHelper::stylesheet('calendar-jos.css', 'media/system/css/', array(' title' => JText::_('green'), ' media' => 'all'));
     KViewHelper::script('calendar.js', 'media/system/js/');
     KViewHelper::script('calendar-setup.js', 'media/system/js/');
     $translation = KViewHelperBehavior::_calendartranslation();
     if ($translation) {
         $document->addScriptDeclaration($translation);
     }
 }
コード例 #13
0
ファイル: flag.php プロジェクト: janssit/www.reliancelaw.be
 public static function image($lang, $icons_url = null, $ext = ".png")
 {
     KViewHelper::_('behavior.tooltip');
     $url = KViewHelper::_('nooku.flag.url', $lang, $icons_url, $ext);
     return '<div class="nooku_flag hasTip"' . ' style="background-image: url(' . $url . ');" ' . ' title="' . $lang->iso_code . '">' . '</div>';
 }
コード例 #14
0
 /**
  * Generates a yes/no radio list
  *
  * @param string The value of the HTML name attribute
  * @param string Additional HTML attributes for the <select> tag
  * @param mixed The key that is selected
  * @returns string HTML for the radio list
  */
 public static function booleanlist($name, $attribs = null, $selected = null, $yes = 'yes', $no = 'no', $id = false)
 {
     $arr = array(KViewHelper::_('select.option', '0', JText::_($no)), KViewHelper::_('select.option', '1', JText::_($yes)));
     return KViewHelper::_('select.radiolist', $arr, $name, $attribs, 'value', 'text', (int) $selected, $id);
 }
コード例 #15
0
 /**
  * Adds to the stack of helper script paths in LIFO order.
  *
  * This function overrides the default view behavior and the path
  * to the KViewHelper include paths
  *
  * @param string|array The directory (-ies) to add.
  * @return object KViewAbstract
  */
 public function addHelperPath($path)
 {
     KViewHelper::addIncludePath($path);
     return $this;
 }
コード例 #16
0
ファイル: menu.php プロジェクト: janssit/www.alu-andries.be
 public function __construct($object)
 {
     $this->_object = $object;
     KViewHelper::_('stylesheet', 'duuka_admin.css', 'media/com_duuka/css/');
 }
コード例 #17
0
/**
 * @version		$Id: mod_language_select.php 964 2009-04-08 22:20:15Z johan $
 * @category   	Nooku
 * @package     Nooku_Site
 * @subpackage  Module_Language_Select
 * @copyright	Copyright (C) 2007 - 2009 Joomlatools. All rights reserved.
 * @license		GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
 * @link     	http://www.nooku.org
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
// Check if Koowa and Nooku plugins are active
if (!(defined('KOOWA') && defined('NOOKU'))) {
    return;
}
KViewHelper::addIncludePath(dirname(__FILE__) . DS . 'helpers');
$app = KFactory::get('lib.joomla.application');
$uri = JURI::getInstance();
$model = KFactory::get('site::com.nooku.model.languages');
$nooku = KFactory::get('admin::com.nooku.model.nooku');
// Parameters
$langformat = $params->get('langformat', 'name');
$style = $params->get('style', 'default');
$display_flag = $params->get('display_flag', 'both');
// Get data
$langs = $model->getList();
// Get the view
$view = KFactory::get('site::com.nooku.view.html');
$view->addTemplatePath(dirname(JModuleHelper::getLayoutPath('mod_language_select', $style)));
// Assign vars
$view->assign('langformat', $langformat);