function display($tpl = null) { $mainframe =& JFactory::getApplication(); $params = JComponentHelper::getParams('com_redevent'); // Load pane behavior jimport('joomla.html.pane'); JHTML::_('behavior.framework'); //initialise variables $editor =& JFactory::getEditor(); $document =& JFactory::getDocument(); $pane =& JPane::getInstance('sliders'); $tabs =& JPane::getInstance('tabs'); $user =& JFactory::getUser(); $settings = JComponentHelper::getParams('com_redevent'); //get vars $cid = JRequest::getVar('cid'); $url = JURI::root(); $document->setTitle(JText::_('COM_REDEVENT_PAGETITLE_EDITVENUE')); //add css and js to document $document->addScript('../includes/js/joomla/popup.js'); $document->addStyleSheet('../includes/js/joomla/popup.css'); $document->addStyleSheet('components/com_redevent/assets/css/redeventbackend.css'); $document->addScript($url . '/components/com_redevent/assets/js/attachments.js'); $document->addScriptDeclaration('var removemsg = "' . JText::_('COM_REDEVENT_ATTACHMENT_CONFIRM_MSG') . '";'); // Get data from the model $model =& $this->getModel(); $row =& $this->get('Data'); // fail if checked out not by 'me' if ($row->id) { if ($model->isCheckedOut($user->get('id'))) { JError::raiseWarning('REDEVENT_GENERIC_ERROR', $row->venue . ' ' . JText::_('COM_REDEVENT_EDITED_BY_ANOTHER_ADMIN')); $mainframe->redirect('index.php?option=com_redevent&view=venues'); } } $task = JRequest::getVar('task'); //create the toolbar if ($task == 'copy') { JToolBarHelper::title(JText::_('COM_REDEVENT_COPY_VENUE'), 'venuesedit'); } elseif ($cid) { JToolBarHelper::title(JText::_('COM_REDEVENT_EDIT_VENUE'), 'venuesedit'); //makes data safe JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'locdescription'); } else { JToolBarHelper::title(JText::_('COM_REDEVENT_ADD_VENUE'), 'venuesedit'); //set the submenu JSubMenuHelper::addEntry(JText::_('COM_REDEVENT'), 'index.php?option=com_redevent'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_EVENTS'), 'index.php?option=com_redevent&view=events'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_VENUES'), 'index.php?option=com_redevent&view=venues'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_CATEGORIES'), 'index.php?option=com_redevent&view=categories'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_ARCHIVESCREEN'), 'index.php?option=com_redevent&view=archive'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_GROUPS'), 'index.php?option=com_redevent&view=groups'); JSubMenuHelper::addEntry(JText::_('COM_REDEVENT_HELP'), 'index.php?option=com_redevent&view=help'); } JToolBarHelper::apply(); JToolBarHelper::spacer(); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); //JToolBarHelper::help( 'el.editvenues', true ); $lists = array(); // categories selector $selected = array(); foreach ((array) $row->categories as $cat) { $selected[] = $cat; } $lists['categories'] = JHTML::_('select.genericlist', (array) $this->get('Categories'), 'categories[]', 'class="inputbox" multiple="multiple" size="10"', 'value', 'text', $selected); $countries = array(); $countries[] = JHTML::_('select.option', '', JText::_('COM_REDEVENT_Select_country')); $countries = array_merge($countries, redEVENTHelperCountries::getCountryOptions()); $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox"', 'value', 'text', $row->country); unset($countries); $pinpointicon = REOutput::pinpointicon($row); if ($task == 'copy') { $row->id = null; $row->venue .= ' ' . JText::_('COM_REDEVENT_copy'); $row->alias = ''; } //assign data to template $this->assignRef('row', $row); $this->assignRef('pane', $pane); $this->assignRef('tabs', $tabs); $this->assignRef('editor', $editor); $this->assignRef('settings', $settings); $this->assignRef('params', $params); $this->assignRef('lists', $lists); $this->assignRef('imageselect', $imageselect); $this->assignRef('pinpointicon', $pinpointicon); $this->assignRef('access', redEVENTHelper::getAccesslevelOptions()); $this->assignRef('form', $this->get('form')); parent::display($tpl); }
</div> <div class="coord"> <label for="longitude"> <?php echo JText::_('COM_REDEVENT_LONGITUDE') . ':'; ?> </label> <input class="inputbox" name="longitude" id="longitude" value="<?php echo $this->row->longitude; ?> " size="14" maxlength="25" /> </div> </div> <div class="coords-pinpoint"> <?php echo $pinpointicon = REOutput::pinpointicon($this->row); ?> </div> </td> </tr> <?php } ?> </tbody> </table> </fieldset> <?php if ($this->params->get('edit_image', 1) == 2 || $this->params->get('edit_image', 1) == 1) { ?>