/** * Creates the Venueevents View * * @since 0.9 */ function display() { $document =& JFactory::getDocument(); $document->link = JRoute::_('index.php?option=com_redevent&view=upcomingvenueevents'); $upcomingevents = $this->get('UpcomingVenueEvents'); $elsettings = redEVENTHelper::config(); $imagepath = JURI::root() . 'administrator/components/com_redevent/assets/images/'; foreach ((array) $upcomingevents as $key => $event) { $event_url = RedeventHelperRoute::getDetailsRoute($event->slug, $event->xslug); $venue_url = RedeventHelperRoute::getVenueEventsRoute($event->venueslug); $description = '<table> <tbody> <tr> <td width="100">Course:</td><td>' . JHTML::_('link', $event_url, $event->full_title, 'target="_blank"') . '</td> </tr><tr> <td>Where:</td><td>' . $event->location . ' ' . REOutput::getFlag($event->country) . '</td> </tr><tr> <td>Date:</td><td>' . REOutput::formatdate($event->dates, $event->times) . '</td> </tr><tr> <td>Duration:</td><td>' . $event->duration; if ($event->duration == 1) { $description .= JText::_('COM_REDEVENT_DAY'); } else { if ($event->duration > 1) { $description .= JText::_('COM_REDEVENT_DAYS'); } } $description .= '</td> </tr><tr> <td>Venue:</td><td>' . JHTML::_('link', $venue_url, $event->venue, 'target="_blank"') . '</td> </tr><tr> <td>Price:</td><td class="re-price">' . REOutput::formatListPrices($event->prices) . '</td> </tr><tr> <td>Credits:</td><td>' . $event->course_credit . '</td> </tr><tr> <td>Signup:</td><td>'; /* Get the different submission types */ $submissiontypes = explode(',', $event->submission_types); $venues_html = ''; foreach ($submissiontypes as $key => $subtype) { switch ($subtype) { case 'email': $venues_html .= ' ' . JHTML::_('link', JRoute::_('index.php?option=com_redevent&view=signup&task=signup&subtype=email&xref=' . $event->xref . '&id=' . $event->id), JHTML::_('image', $imagepath . $elsettings->get('signup_email_img'), JText::_($elsettings->get('signup_email_text')), 'width="24px" height="24px" border="0"'), 'target="_blank"') . ' '; break; case 'phone': $venues_html .= ' ' . JHTML::_('link', JRoute::_('index.php?option=com_redevent&view=signup&task=signup&subtype=phone&xref=' . $event->xref . '&id=' . $event->id), JHTML::_('image', $imagepath . $elsettings->get('signup_phone_img'), JText::_($elsettings->get('signup_phone_text')), 'width="24px" height="24px" border="0"'), 'target="_blank"') . ' '; break; case 'external': $venues_html .= ' ' . JHTML::_('link', $event->submission_type_external, JHTML::_('image', $imagepath . $elsettings->get('signup_external_img'), $elsettings->get('signup_external_text'), 'width="24px" height="24px" border="0"'), 'target="_blank"') . ' '; break; case 'webform': if ($event->prices && count($event->prices)) { foreach ($event->prices as $p) { $img = empty($p->image) ? JHTML::_('image', $imagepath . $elsettings->get('signup_webform_img'), JText::_($elsettings->get('signup_webform_text'))) : JHTML::_('image', $imagepath . $p->image, JText::_($p->name)); $link = JRoute::_(RedeventHelperRoute::getSignupRoute('webform', $event->slug, $event->xslug, $p->slug)); $venues_html .= ' ' . JHTML::_('link', $link, $img) . ' '; } } else { $venues_html .= ' ' . JHTML::_('link', JRoute::_(RedeventHelperRoute::getSignupRoute('webform', $event->slug, $event->xslug)), JHTML::_('image', $imagepath . $elsettings->get('signup_webform_img'), JText::_($elsettings->get('signup_webform_text')))) . ' '; } break; case 'formaloffer': $venues_html .= ' ' . JHTML::_('link', JRoute::_('index.php?option=com_redevent&view=signup&subtype=formaloffer&task=signup&xref=' . $event->xslug . '&id=' . $event->slug), JHTML::_('image', $imagepath . $elsettings->get('signup_formal_offer_img'), JText::_($elsettings->get('signup_formal_offer_text')), 'width="24px" height="24px" border="0"'), 'target="_blank"') . ' '; break; } } $description .= $venues_html; $description .= '</td></tr></tbody></table>'; $item = new JFeedItem(); $item->title = $event->full_title; $item->link = $event_url; $item->description = $description; $item->date = ''; $item->category = $event->venue; // loads item info into rss array $document->addItem($item); } }
<?php case 'places': ?> <td class="re_places"><?php echo redEVENTHelper::getRemainingPlaces($row); ?> </td> <?php break; ?> <?php case 'price': ?> <td class="re_prices" class="re-price"><?php echo REOutput::formatListPrices($row->prices); ?> </td> <?php break; ?> <?php case 'credits': ?> <td class="re_credits"><?php echo $row->course_credit ? $row->course_credit : '-'; ?> </td> <?php break;
<td><?php echo JHTML::_('link', $event_url, $event->full_title); ?> </td> <td><?php echo $event->location; ?> </td> <td><?php echo REOutput::formatdate($event->dates, $event->times); ?> <?php echo redEVENTHelper::getEventDuration($event); ?> <?php echo JHTML::_('link', $venue_url, $event->venue); ?> </td> <td class="re-price"><?php echo REOutput::formatListPrices($event->prices); ?> </td> </tr> <?php } ?> </tbody> </table>