Beispiel #1
0
 /**
  * Add the page title and toolbar.
  *
  */
 protected function addToolbar()
 {
     $jinput = JFactory::getApplication()->input;
     $jinput->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = JEMHelperBackend::getActions();
     JToolBarHelper::title($isNew ? JText::_('COM_JEM_ADD_VENUE') : JText::_('COM_JEM_EDIT_VENUE'), 'venuesedit');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('venue.apply');
         JToolBarHelper::save('venue.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('venue.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('venue.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('venue.cancel');
     } else {
         JToolBarHelper::cancel('venue.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('editvenues', true);
 }
Beispiel #2
0
 /**
  * Add Toolbar
  */
 protected function addToolbar()
 {
     JToolBarHelper::title(JText::_('COM_JEM_EVENTS'), 'events');
     /* retrieving the allowed actions for the user */
     $canDo = JEMHelperBackend::getActions(0);
     /* create */
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('event.add');
     }
     /* edit */
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('event.edit');
         JToolBarHelper::divider();
     }
     /* state */
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publishList('events.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublishList('events.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::custom('events.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
         JToolBarHelper::archiveList('events.archive');
         JToolBarHelper::checkin('events.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'events.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('events.trash');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('listevents', true);
 }
Beispiel #3
0
 /**
  * Add Toolbar
  */
 protected function addToolbar()
 {
     JToolBarHelper::title(JText::_('COM_JEM_VENUES'), 'venues');
     $canDo = JEMHelperBackend::getActions(0);
     /* create */
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('venue.add');
     }
     /* edit */
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('venue.edit');
         JToolBarHelper::divider();
     }
     /* state */
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.published') != 2) {
             JToolBarHelper::publishList('venues.publish');
             JToolBarHelper::unpublishList('venues.unpublish');
             JToolBarHelper::divider();
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('venues.checkin');
     }
     /* delete-trash */
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'venues.remove', 'JACTION_DELETE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('listvenues', true);
 }
Beispiel #4
0
	/**
	 * Add Toolbar
	 */
	protected function addToolbar()
	{
		JToolBarHelper::title(JText::_('COM_JEM_GROUPS'), 'groups');

		/* retrieving the allowed actions for the user */
		$canDo = JEMHelperBackend::getActions(0);

		/* create */
		if (($canDo->get('core.create'))) {
			JToolBarHelper::addNew('group.add');
		}

		/* edit */
		if (($canDo->get('core.edit'))) {
			JToolBarHelper::editList('group.edit');
			JToolBarHelper::divider();
		}

		if ($canDo->get('core.edit.state')) {
			JToolBarHelper::checkin('groups.checkin');
		}

		JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'groups.remove', 'JACTION_DELETE');

		JToolBarHelper::divider();
		JToolBarHelper::help('listgroups', true);
	}
Beispiel #5
0
 /**
  * Display the view
  *
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Load the submenu.
     // if no view found then refert to main
     JEMHelperBackend::addSubmenu(JFactory::getApplication()->input->getCmd('view', 'main'));
     parent::display();
     return $this;
 }
Beispiel #6
0
 /**
  * Add Toolbar
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/helper.php';
     JToolBarHelper::title(JText::_('COM_JEM_DATES'), 'events');
     /* retrieving the allowed actions for the user */
     $canDo = JEMHelperBackend::getActions(0);
     /* create */
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('date.add');
     }
     /* edit */
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('date.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'dates.delete', 'JTOOLBAR_EMPTY_TRASH');
     }
     /*
     		if ($canDo->get('core.edit.state')) {
     			if ($this->state->get('filter_state') != 2) {
     				JToolBarHelper::publishList('dates.publish', 'JTOOLBAR_PUBLISH', true);
     				JToolBarHelper::unpublishList('dates.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     				//JToolBarHelper::custom('events.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
     			}
     	if ($this->state->get('filter_state') != -1) {
     				JToolBarHelper::divider();
     				if ($this->state->get('filter_state') != 2) {
     					JToolBarHelper::archiveList('dates.archive');
     				} elseif ($this->state->get('filter_state') == 2) {
     					JToolBarHelper::unarchiveList('dates.publish');
     				}
     			}
     		}
     if ($canDo->get('core.edit.state')) {
     			JToolBarHelper::checkin('dates.checkin');
     		}
     if ($this->state->get('filter_state') == -2 && $canDo->get('core.delete')) {
     			JToolBarHelper::deleteList('', 'dates.delete', 'JTOOLBAR_EMPTY_TRASH');
     		} elseif ($canDo->get('core.edit.state')) {
     			JToolBarHelper::trash('dates.trash');
     		}
     */
     //JToolBarHelper::divider();
     //JToolBarHelper::custom('events.removeRecurrenceset','calendar_delete','','Recurrenceset');
     //JToolBarHelper::trash('events.removeRecurrenceset','Recurrenceset');
     //JToolBarHelper::divider();
     JToolBarHelper::help('listevents', true);
 }
Beispiel #7
0
 /**
  * Add Toolbar
  */
 protected function addToolbar()
 {
     /* retrieving the allowed actions for the user */
     $canDo = JEMHelperBackend::getActions(0);
     JToolBarHelper::title(JText::_('COM_JEM_REGISTERED_USERS'), 'users');
     /* create */
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('attendee.add');
     }
     JToolBarHelper::spacer();
     JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'attendees.remove', 'COM_JEM_ATTENDEES_DELETE');
     JToolBarHelper::spacer();
     JToolBarHelper::custom('attendees.back', 'back', 'back', JText::_('COM_JEM_ATT_BACK'), false);
     JToolBarHelper::divider();
     JToolBarHelper::help('registereduser', true);
 }
Beispiel #8
0
 /**
  * Add the page title and toolbar.
  *
  */
 protected function addToolbar()
 {
     $jinput = JFactory::getApplication()->input;
     $jinput->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $canDo = JEMHelperBackend::getActions(0);
     JToolBarHelper::title(JText::_('COM_JEM_CSSMANAGER_EDIT_FILE'), 'thememanager');
     // Can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('source.apply');
         JToolBarHelper::save('source.save');
     }
     JToolBarHelper::cancel('source.cancel', 'JTOOLBAR_CLOSE');
     JToolBarHelper::divider();
     JToolBarHelper::help('editcss', true);
 }
Beispiel #9
0
	/**
	 * Add the page title and toolbar.
	 */
	protected function addToolbar()
	{

		// Initialise variables.
		$canDo		= null;
		$user		= JemFactory::getUser();

		// Get the results for each action.
		$canDo = JEMHelperBackend::getActions(0);

		JToolBarHelper::title(JText::_('COM_JEM_CATEGORIES'), 'elcategories');

		if ($canDo->get('core.create')) {
			 JToolBarHelper::addNew('category.add');
		}

		if ($canDo->get('core.edit' ) || $canDo->get('core.edit.own')) {
			JToolBarHelper::editList('category.edit');
			JToolBarHelper::divider();
		}

		if ($canDo->get('core.edit.state')) {
			JToolBarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
			JToolBarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
			JToolBarHelper::divider();
			JToolBarHelper::archiveList('categories.archive');
		}

		if ($user->authorise('core.admin')) { // todo: is that correct?
			JToolBarHelper::checkin('categories.checkin');
		}

		if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
			JToolBarHelper::deleteList('COM_JEM_CONFIRM_DELETE', 'categories.remove', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state')) {
			JToolBarHelper::trash('categories.trash');
		}

		if ($canDo->get('core.admin')) {
			JToolBarHelper::divider();
			JToolBarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
		}

		JToolBarHelper::divider();
		JToolBarHelper::help('listcategories', true);
	}
Beispiel #10
0
	/**
	 * Add the page title and toolbar.
	 */
	protected function addToolbar()
	{
		// Initialise variables.
		$user		= JemFactory::getUser();
		$userId		= $user->get('id');

		$isNew		= ($this->item->id == 0);
		$checkedOut	= !($this->item->checked_out == 0 || $this->item->checked_out == $userId);

		// Get the results for each action.
		$canDo = JEMHelperBackend::getActions();

		$title = JText::_('COM_JEM_CATEGORY_BASE_'.($isNew?'ADD':'EDIT').'_TITLE');
		// Prepare the toolbar.
		JToolBarHelper::title($title, 'category-'.($isNew?'add':'edit').' -category-'.($isNew?'add':'edit'));

		// For new records, check the create permission.
		if ($isNew && (count($user->getAuthorisedCategories('com_jem', 'core.create')) > 0)) {
			JToolBarHelper::apply('category.apply');
			JToolBarHelper::save('category.save');
			JToolBarHelper::save2new('category.save2new');
		}

		// If not checked out, can save the item.
		elseif (!$checkedOut && ($canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_user_id == $userId))) {
			JToolBarHelper::apply('category.apply');
			JToolBarHelper::save('category.save');
			if ($canDo->get('core.create')) {
				JToolBarHelper::save2new('category.save2new');
			}
		}

		// If an existing item, can save to a copy.
		if (!$isNew && $canDo->get('core.create')) {
			JToolBarHelper::save2copy('category.save2copy');
		}

		if (empty($this->item->id))  {
			JToolBarHelper::cancel('category.cancel');
		} else {
			JToolBarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE');
		}

		JToolBarHelper::divider();
		JToolBarHelper::help('editcategories', true);
	}
Beispiel #11
0
	/**
	 * Display the view
	 *
	 */
	public function display($cachable = false, $urlparams = false)
	{
		// Load the submenu - but not on edit views.
		// if no view found then refert to main
		$jinput = JFactory::getApplication()->input;
		$view = $jinput->getCmd('view', 'main');
		// add all views you won't see the submenu / sidebar
		//  - on J! 2.5 param 'hidemainmenu' let's not show the submenu
		//    but on J! 3.x the submenu (sidebar) is shown with non-clickable entries.
		//    The alternative would be to move the addSubmenu call to all views the sidebar should be shown.
		static $views_without_submenu = array('attendee', 'category', 'event', 'group', 'source', 'venue');

		if (!in_array($view, $views_without_submenu)) {
			JEMHelperBackend::addSubmenu($view);
		}

		parent::display();
		return $this;
	}
Beispiel #12
0
<?php
/**
 * @version 2.0.0
 * @package JEM
 * @copyright (C) 2013-2014 joomlaeventmanager.net
 * @copyright (C) 2005-2009 Christoph Lukes
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */

defined('_JEXEC') or die;

JHtml::_('behavior.tooltip');
JHtml::_('behavior.modal');
$canDo = JEMHelperBackend::getActions();
?>

<form action="<?php echo JRoute::_('index.php?option=com_jem&view=cssmanager'); ?>" method="post" name="adminForm" id="adminForm">
	<div class="width-50 fltlft">
		<fieldset class="adminform">
			<legend><?php echo JText::_('COM_JEM_CSSMANAGER_DESCRIPTION_LEGEND');?></legend>
			<p><?php echo JText::_('COM_JEM_CSSMANAGER_DESCRIPTION');?></p>
		</fieldset>

		<fieldset class="adminform">
			<legend><?php echo JText::_('COM_JEM_CSSMANAGER_LINENUMBER_LEGEND');?></legend>
			<p><?php echo JText::_('COM_JEM_CSSMANAGER_LINENUMBER_DESCRIPTION'); ?></p>
			<h3><?php echo JText::_('COM_JEM_CSSMANAGER_LINENUMBER_STATUS'); ?></h3>
			<p>
			<?php if ($this->statusLinenumber) : ?>
				<?php echo JText::_('COM_JEM_CSSMANAGER_LINENUMBER_ENABLED'); ?>
				<br />
Beispiel #13
0
	/**
	 * Method to get the Country options.
	 *
	 */
	public function getOptions()
	{
		return JEMHelperBackend::getCountryOptions();
	}