public static function url($lang, $icons_url = null, $ext = '.png') { if (!$icons_url) { $icons_url = Nooku::getURL('media') . 'images/flags/'; } if (empty($lang->image)) { $result = $icons_url . KViewHelper::_('nooku.flag.country', $lang) . $ext; } else { $result = $icons_url . $lang->image; } return $result; }
/** * 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&view=translate&tmpl=component&id=' . $cid . '&editor=' . $name); $button->set('text', JText::_('Translate')); $button->set('name', 'translate'); $button->set('options', "{handler: 'iframe', size: {x: 900, y: 600}}"); return $button; }
<?php /** $Id: default.php 745 2008-10-01 02:23:40Z Johan $ */ defined('_JEXEC') or die; ?> <?php @helper('stylesheet', 'grid.css', Nooku::getURL('css')); ?> <form action="<?php echo @route(); ?> " method="post" name="adminForm"> <table class="adminlist" style="clear: both;"> <thead> <tr> <th width="5"> <?php echo @text('NUM'); ?> </th> <th width="20"> <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count(@$tables); ?> );" /> </th> <th> <?php echo @helper('grid.sort', 'NAME', 'table_name', @$filter['direction'], @$filter['order']);
<?php /** $Id: default.php 787 2008-10-28 17:03:08Z mathias $ */ defined('_JEXEC') or die; ?> <?php @helper('stylesheet', 'translate.css', Nooku::getURL('css')); @helper('script', 'view.translate.js', Nooku::getURL('js')); ?> <script type="text/javascript"> function insertTranslation() { window.parent.tinyMCE.setContent(tinyMCE.getContent()); return false; } var article_id = <?php echo @$id; ?> ; </script> <fieldset style="width: 860px;"> <div class="configuration" style="float: left;"> <?php echo @text('Translate'); ?> </div> <div style="float: right;">
<?php /** $Id: form.php 852 2008-11-14 01:28:43Z mathias $ */ @helper('behavior.tooltip'); @helper('script', 'view.language.js', Nooku::getURL('js')); @helper('stylesheet', 'form.css', Nooku::getURL('css')); echo @helper('behavior.modal'); ?> <form action="<?php echo @route('id=' . @$language->id); ?> " method="post" class="adminform" name="adminForm"> <div class="col40"> <fieldset id="lang_langpack"> <legend><?php echo @text('Language pack'); ?> </legend> <dl> <dt><label><?php echo @text('Language pack'); ?> </label></dt> <dd> <?php echo @helper('nooku.select.langpacks', @$language->iso_code); ?> </dd> </dl> </fieldset>
<?php /** $Id: default.php 852 2008-11-14 01:28:43Z mathias $ */ defined('_JEXEC') or die; ?> <?php @helper('stylesheet', 'grid.css', Nooku::getURL('css')); @helper('stylesheet', 'nooku_admin.css', Nooku::getURL('css')); @helper('script', 'view.flags.js', Nooku::getURL('js')); ?> <fieldset> <div style="float: right"> <button type="button" onclick="window.parent.document.getElementById('sbox-window').close();"> <?php echo @text('Cancel'); ?> </button> </div> <div class="configuration" > <?php echo @text('Pick a flag'); ?> </div> </fieldset> <?php echo @helper('nooku.select.flags');