コード例 #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
ファイル: 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;
 }
コード例 #5
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;
 }
コード例 #6
0
ファイル: menu.php プロジェクト: janssit/www.alu-andries.be
 public function __construct($object)
 {
     $this->_object = $object;
     KViewHelper::_('stylesheet', 'duuka_admin.css', 'media/com_duuka/css/');
 }
コード例 #7
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);
 }
コード例 #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
ファイル: 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>';
 }