/** * Creates the output * * @since 0.5 * @param int $tpl */ function display($tpl = null) { $params = JComponentHelper::getParams('com_redevent'); if (!$params->get('enable_moreinfo', 1)) { echo Jtext::_('COM_REDEVENT_MOREINFO_ERROR_DISABLED_BY_ADMIN'); return; } if ($this->getLayout() == 'final') { return $this->_displayFinal($tpl); } $xref = JRequest::getInt('xref'); $uri =& JFactory::getUri(); $document = JFactory::getDocument(); $user =& Jfactory::getUser(); if (!$xref) { echo JText::_('COM_REDEVENT_MOREINFO_ERROR_MISSING_XREF'); } $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/moreinfo.css'); $this->assign('xref', $xref); $this->assign('action', JRoute::_(RedeventHelperRoute::getMoreInfoRoute($xref))); $this->assignRef('user', $user); parent::display($tpl); }
/** * Parses tag moreinfo * generates a modal link to a more info form for the session * @return string */ function _getTag_moreinfo() { JHTML::_('behavior.modal', 'a.moreinfo'); $link = JRoute::_(RedeventHelperRoute::getMoreInfoRoute($this->getEvent()->getData()->xslug, array('tmpl' => 'component'))); $text = '<a class="moreinfo" title="' . JText::_('COM_REDEVENT_DETAILS_MOREINFO_BUTTON_LABEL') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 400, y: 500}}">' . JText::_('COM_REDEVENT_DETAILS_MOREINFO_BUTTON_LABEL') . ' </a>'; return $text; }
/** * returns moreinfo link * * @param string $text the content of the link tag * @param unknown_type $title the 'title' for the link * @return string */ public static function moreInfoIcon($xref_slug, $text = null, $title = null) { if (!$text) { $text = JText::_('COM_REDEVENT_DETAILS_MOREINFO_BUTTON_LABEL'); } if (!$title) { $title = JText::_('COM_REDEVENT_DETAILS_MOREINFO_BUTTON_LABEL'); } JHTML::_('behavior.modal', 'a.moreinfo'); $link = JRoute::_(RedeventHelperRoute::getMoreInfoRoute($xref_slug, array('tmpl' => 'component'))); $text = '<a class="moreinfo" title="' . $title . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 400, y: 500}}">' . $text . ' </a>'; return $text; }