<?php if ($this->params->get('events_rsscal', 0)) { ?> <span class="events-rsscal"> <?php echo JHTML::link(JRoute::_(RedeventHelperRoute::getSimpleListRoute(null, 'rsscal') . '&format=feed'), JHTML::image('components/com_redevent/assets/images/rsscal2.0.png', JText::_('COM_REDEVENT_EXPORT_RSSCAL'))); ?> </span> <?php } ?> <?php if ($this->params->get('events_ical', 1)) { ?> <span class="events-ical"> <?php echo JHTML::link(JRoute::_(RedeventHelperRoute::getSimpleListRoute() . '&format=raw&layout=ics'), JHTML::image('components/com_redevent/assets/images/iCal2.0.png', JText::_('COM_REDEVENT_EXPORT_ICS'))); ?> </span> <?php } ?> </div> <!-- end: exports --> <?php } ?> </div>
/** * Creates the Simple List View * * @since 0.9 */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); //initialize variables $document =& JFactory::getDocument(); $elsettings =& redEVENTHelper::config(); $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $mainframe->getParams(); $uri =& JFactory::getURI(); $pathway =& $mainframe->getPathWay(); $state =& $this->get('state'); //add css file if (!$params->get('custom_css')) { $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css'); } else { $document->addStyleSheet($params->get('custom_css')); } $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); // add js JHTML::_('behavior.mootools'); // for filter hint $document->addScript($this->baseurl . '/components/com_redevent/assets/js/eventslist.js'); // get variables $task = JRequest::getWord('task'); $pop = JRequest::getBool('pop'); //get data from model $rows =& $this->get('Data'); $customs =& $this->get('ListCustomFields'); $customsfilters =& $this->get('CustomFilters'); $pagination =& $this->get('Pagination'); //are events available? if (!$rows) { $noevents = 1; } else { $noevents = 0; } //params $params->def('page_title', isset($item->title) ? $item->title : JText::_('COM_REDEVENT_Events')); if ($pop) { //If printpopup set true $params->set('popup', 1); $This->setLayout('print'); } $print_link = JRoute::_(RedeventHelperRoute::getArchiveRoute() . '&pop=1'); $pagetitle = $params->get('page_title'); $list_link = RedeventHelperRoute::getSimpleListRoute(); //Set Page title $this->document->setTitle($pagetitle); //create select lists $lists = $this->_buildSortLists(); $filter_customs = $state->get('filter_customs'); $this->assign('lists', $lists); $this->assignRef('rows', $rows); $this->assignRef('customs', $customs); $this->assignRef('customsfilters', $customsfilters); $this->assignRef('task', $task); $this->assignRef('noevents', $noevents); $this->assignRef('print_link', $print_link); $this->assignRef('params', $params); $this->assignRef('dellink', $dellink); $this->assignRef('pageNav', $pagination); $this->assignRef('elsettings', $elsettings); $this->assignRef('pagetitle', $pagetitle); $this->assignRef('config', $elsettings); $this->assignRef('thumb_link', $thumb_link); $this->assignRef('list_link', $list_link); $this->assign('filter_customs', $filter_customs); $cols = explode(',', $params->get('lists_columns', 'date, title, venue, city, category')); $cols = redEVENTHelper::validateColumns($cols); $this->assign('columns', $cols); parent::display($tpl); }
/** * Creates the Simple List View * * @since 0.9 */ function display($tpl = null) { $mainframe =& JFactory::getApplication(); //initialize variables $document =& JFactory::getDocument(); $elsettings =& redEVENTHelper::config(); $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $mainframe->getParams(); $uri =& JFactory::getURI(); $pathway =& $mainframe->getPathWay(); $state =& $this->get('state'); //add css file if (!$params->get('custom_css')) { $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css'); } else { $document->addStyleSheet($params->get('custom_css')); } $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); // add js JHTML::_('behavior.mootools'); // for filter hint $document->addScript($this->baseurl . '/components/com_redevent/assets/js/eventslist.js'); // get variables $task = JRequest::getWord('task'); $pop = JRequest::getBool('pop'); //get data from model $rows =& $this->get('Data'); $customs =& $this->get('ListCustomFields'); $customsfilters =& $this->get('CustomFilters'); $pagination =& $this->get('Pagination'); //are events available? if (!$rows) { $noevents = 1; } else { $noevents = 0; } //params $params->def('page_title', isset($item->title) ? $item->title : JText::_('COM_REDEVENT_Events')); if ($pop) { //If printpopup set true $params->set('popup', 1); $This->setLayout('print'); } $print_link = JRoute::_('index.php?option=com_redevent&view=simplelist&tmpl=component&pop=1'); $pagetitle = $params->get('page_title'); $thumb_link = RedeventHelperRoute::getSimpleListRoute(null, 'thumb'); $list_link = RedeventHelperRoute::getSimpleListRoute(null, 'default'); //Set Page title $this->document->setTitle($pagetitle); //Check if the user has access to the form $maintainer = ELUser::ismaintainer(); $genaccess = ELUser::validate_user($elsettings->get('evdelrec'), $elsettings->get('delivereventsyes')); if ($maintainer || $genaccess) { $dellink = 1; } //add alternate feed link $link = 'index.php?option=com_redevent&view=simplelist&format=feed'; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $document->addHeadLink(JRoute::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $document->addHeadLink(JRoute::_($link . '&type=atom'), 'alternate', 'rel', $attribs); //create select lists $lists = $this->_buildSortLists(); $filter_customs = $state->get('filter_customs'); $this->assign('lists', $lists); $this->assignRef('rows', $rows); $this->assignRef('customs', $customs); $this->assignRef('customsfilters', $customsfilters); $this->assignRef('task', $task); $this->assignRef('noevents', $noevents); $this->assignRef('print_link', $print_link); $this->assignRef('params', $params); $this->assignRef('dellink', $dellink); $this->assignRef('pageNav', $pagination); $this->assignRef('elsettings', $elsettings); $this->assignRef('pagetitle', $pagetitle); $this->assignRef('config', $elsettings); $this->assignRef('thumb_link', $thumb_link); $this->assignRef('list_link', $list_link); $this->assign('filter_customs', $filter_customs); $cols = explode(',', $params->get('lists_columns', 'date, title, venue, city, category')); $cols = redEVENTHelper::validateColumns($cols); $this->assign('columns', $cols); parent::display($tpl); }
function display($tpl = null) { $mainframe =& JFactory::getApplication(); $document =& JFactory::getDocument(); $elsettings =& redEVENTHelper::config(); $params =& $mainframe->getParams(); $rows =& $this->get('Data'); $total =& $this->get('Total'); //add css file if (!$params->get('custom_css')) { $document->addStyleSheet($this->baseurl . '/components/com_redevent/assets/css/redevent.css'); } else { $document->addStyleSheet($params->get('custom_css')); } $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #eventlist dd { height: 1%; }</style><![endif]-->'); //get menu information $menu =& JSite::getMenu(); $item = $menu->getActive(); $params =& $mainframe->getParams('com_redevent'); // Request variables $limitstart = JRequest::getInt('limitstart'); $limit = JRequest::getInt('limit', $params->get('cat_num')); $task = JRequest::getWord('task'); $params->def('page_title', $item->title); //pathway $pathway =& $mainframe->getPathWay(); if ($task == 'archive') { $pathway->addItem(JText::_('COM_REDEVENT_ARCHIVE'), JRoute::_(RedeventHelperRoute::getCategoriesRoute(null, 'archive'))); $pagetitle = $params->get('page_title') . ' - ' . JText::_('COM_REDEVENT_ARCHIVE'); } else { $pagetitle = $params->get('page_title'); } //Set Page title $this->document->setTitle($pagetitle); //get icon settings $params->def('icons', $mainframe->getCfg('icons')); //add alternate feed link $link = RedeventHelperRoute::getSimpleListRoute(); // $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); // $document->addHeadLink(JRoute::_($link.'&format=feed&type=rss'), 'alternate', 'rel', $attribs); // $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); // $document->addHeadLink(JRoute::_($link.'&format=feed&type=atom'), 'alternate', 'rel', $attribs); //Check if the user has access to the form $maintainer = ELUser::ismaintainer(); $genaccess = ELUser::validate_user($elsettings->get('evdelrec'), $elsettings->get('delivereventsyes')); if ($maintainer || $genaccess) { $dellink = 1; } // Create the pagination object jimport('joomla.html.pagination'); $pageNav = new JPagination($total, $limitstart, $limit); $this->assignRef('rows', $rows); $this->assignRef('task', $task); $this->assignRef('params', $params); $this->assignRef('dellink', $dellink); $this->assignRef('pageNav', $pageNav); $this->assignRef('item', $item); $this->assignRef('elsettings', $elsettings); $this->assignRef('pagetitle', $pagetitle); parent::display($tpl); }