Пример #1
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/j2xml.php';
     $canDo = J2XMLHelper::getActions();
     $doc = JFactory::getDocument();
     $icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
     $doc->addStyleDeclaration($icon_48_websites);
     JToolBarHelper::title(JText::_('COM_J2XML_MANAGER_WEBSITES'), 'websites.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('website.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('website.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('websites.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('websites.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::checkin('websites.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'websites.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('websites.trash');
     }
 }
Пример #2
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = J2XMLHelper::getActions();
     $doc = JFactory::getDocument();
     $icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
     $doc->addStyleDeclaration($icon_48_websites);
     JToolBarHelper::title($isNew ? JText::_('COM_J2XML_MANAGER_WEBSITE_NEW') : JText::_('COM_J2XML_MANAGER_WEBSITE_EDIT'), 'websites.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('website.apply');
         JToolBarHelper::save('website.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('website.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('website.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('website.cancel');
     } else {
         JToolBarHelper::cancel('website.cancel', 'JTOOLBAR_CLOSE');
     }
 }
Пример #3
0
 function display($tpl = null)
 {
     $info = $this->get('Info');
     $this->assignRef('info', $info);
     $params = JComponentHelper::getParams('com_j2xml');
     $this->assignRef('params', $params);
     if (class_exists('JPlatform') && version_compare(JPlatform::RELEASE, '12', 'ge')) {
         J2XMLHelper::addSubmenu('cpanel');
         $this->sidebar = JHtmlSidebar::render();
     }
     $this->addToolbar();
     parent::display($tpl);
 }
Пример #4
0
 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/j2xml.php';
     J2XMLHelper::updateReset();
     $view = JRequest::getCmd('view', '');
     $layout = JRequest::getCmd('layout', 'default');
     $id = JRequest::getInt('id');
     // Check for edit form.
     if ($view == 'website' && $layout == 'edit' && !$this->checkEditId('com_j2xml.edit.website', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_j2xml&view=websites', false));
         return false;
     } elseif ($view == '') {
         $this->setRedirect(JRoute::_('index.php?option=com_j2xml&view=cpanel', false));
         return false;
     }
     parent::display();
     return $this;
 }
Пример #5
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = J2XMLHelper::getActions();
     $doc = JFactory::getDocument();
     $icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
     $doc->addStyleDeclaration($icon_48_websites);
     JToolBarHelper::title($isNew ? JText::_('COM_J2XML_MANAGER_WEBSITE_NEW') : JText::_('COM_J2XML_MANAGER_WEBSITE_EDIT'), 'websites.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('website.apply');
         JToolBarHelper::save('website.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('website.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('website.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('website.cancel');
     } else {
         JToolBarHelper::cancel('website.cancel', 'JTOOLBAR_CLOSE');
     }
     jimport('eshiol.core.send');
     $option = JRequest::getVar('option');
     $toolbar = JToolBar::getInstance('toolbar');
     $control = substr($option, 4);
     $url = new stdClass();
     $url->title = 'pippo';
     $url->url = 'http://localhost/j341';
     $toolbar->appendButton('Send', 'j2xml_send', 'PLG_SYSTEM_J2XML_BUTTON_SEND', "j2xml.{$control}.send", $url);
 }
Пример #6
0
        ?>
				</td>
			</tr>
			<?php 
    }
    ?>
		</tbody>
	</table>
	<div>
	</div>
</div>
<?php 
}
?>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php 
echo $listOrder;
?>
" />
		<input type="hidden" name="filter_order_Dir" value="<?php 
echo $listDirn;
?>
" />
		<?php 
echo JHtml::_('form.token');
?>
</form>
<?php 
echo J2XMLHelper::copyright();
Пример #7
0
 * 
 * @author		Helios Ciancio <*****@*****.**>
 * @link		http://www.eshiol.it
 * @copyright	Copyright (C) 2010-2013 Helios Ciancio. All Rights Reserved
 * @license		http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL v3
 * J2XML is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 */
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
$canDo = J2XMLHelper::getActions();
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'website.cancel' || document.formvalidator.isValid(document.id('website-form'))) {
			Joomla.submitform(task, document.getElementById('website-form'));
		}
	}
</script>

<form action="<?php 
echo JRoute::_('index.php?option=com_j2xml&layout=edit&id=' . (int) $this->item->id);
?>
" method="post" name="adminForm" id="website-form" class="form-validate">