rifiniture di stile rifiniture primo rilascio di test
This commit is contained in:
435
templates/joomla-italia-theme/html/com_jem/calendar/default.php
Normal file
435
templates/joomla-italia-theme/html/com_jem/calendar/default.php
Normal file
@ -0,0 +1,435 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'ical_link' => $this->ical_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day . $this->param_topcat);
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="catz" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$color = '<div id="eventcontenttop" class="eventcontenttop">';
|
||||
$color .= $colorpic;
|
||||
$color .= '</div>';
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor).'">';
|
||||
} else {
|
||||
$content .= '">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton();
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons">
|
||||
<div class="calendarButtonsToggle">
|
||||
<div id="buttonshowall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</div>
|
||||
<div id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons">
|
||||
<div class="calendarButtonsToggle">
|
||||
<div id="buttonshowall" class="btn btn-outline-dark me-2">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</div>
|
||||
<div id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends mt-4">
|
||||
<?php
|
||||
if ($displayLegend == 1) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark me-2" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tipologia-menu ps-lg-4 col-lg-3">
|
||||
<aside class="aside-list aside-sticky">
|
||||
<div class="menu-laterale">
|
||||
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,437 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
?>
|
||||
|
||||
<style>
|
||||
td.today div.daynum::before,
|
||||
td.today div.daynum::after {
|
||||
background-color: <?php echo $this->params->get('currentdaycolor'); ?>;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'ical_link' => $this->ical_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day . $this->param_topcat);
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="catz" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$color = '<div id="eventcontenttop" class="eventcontenttop">';
|
||||
$color .= $colorpic;
|
||||
$color .= '</div>';
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = '<i class="fa fa-step-backward" aria-hidden="true"></i>';
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = '<i class="fas fa-arrows-alt-h"></i>';
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = '<i class="fa fa-step-forward" aria-hidden="true"></i>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor);
|
||||
$content .= '" onclick="location.href=\''.$detaillink.'\'">';
|
||||
} else {
|
||||
$content .= '" onclick="location.href=\''.$detaillink.'\'">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton();
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<button id="buttonshowall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
if ($displayLegend == 1) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tipologia-menu ps-lg-4 col-lg-3">
|
||||
<aside class="aside-list aside-sticky">
|
||||
<div class="menu-laterale">
|
||||
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
@ -13,403 +13,414 @@ use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="col-12 col-gl-9">
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'ical_link' => $this->ical_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'ical_link' => $this->ical_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day.'&catid='.$this->catid);
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
/**
|
||||
* $cal->setEventContent($year,$month,$day,$content,[$contentUrl,$id])
|
||||
*
|
||||
* Info from: https://www.micronetwork.de/activecalendar/demo/doc/doc_en.html
|
||||
*
|
||||
* Call this method, if you want the class to create a new HTML table within the date specified by the parameters $year, $month, $day.
|
||||
* The parameter $content can be a string or an array.
|
||||
* If $content is a string, then the new generated table will contain one row with the value of $content.
|
||||
* If it is an array, the generated table will contain as many rows as the array length and each row will contain the value of each array item.
|
||||
* The parameter $contentUrl is optional: If you set a $contentUrl, an event content specific link (..href='$contentUrl'..) will be generated
|
||||
* in the 'event content' table row(s), even if the method $cal->enableDayLinks($link) was not called.
|
||||
* The parameter $id is optional as well: if you set an $id, a HTML class='$id' will be generated for each event content (default: 'eventcontent').
|
||||
*/
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="scat" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor).'">';
|
||||
} else {
|
||||
$content .= '">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton('catid='.$this->catid);
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
$counter = array();
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
# skip foreign categories - we are restricted to one
|
||||
if ($cat->id != $this->catid) {
|
||||
continue;
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day.'&catid='.$this->catid);
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
/**
|
||||
* $cal->setEventContent($year,$month,$day,$content,[$contentUrl,$id])
|
||||
*
|
||||
* Info from: https://www.micronetwork.de/activecalendar/demo/doc/doc_en.html
|
||||
*
|
||||
* Call this method, if you want the class to create a new HTML table within the date specified by the parameters $year, $month, $day.
|
||||
* The parameter $content can be a string or an array.
|
||||
* If $content is a string, then the new generated table will contain one row with the value of $content.
|
||||
* If it is an array, the generated table will contain as many rows as the array length and each row will contain the value of each array item.
|
||||
* The parameter $contentUrl is optional: If you set a $contentUrl, an event content specific link (..href='$contentUrl'..) will be generated
|
||||
* in the 'event content' table row(s), even if the method $cal->enableDayLinks($link) was not called.
|
||||
* The parameter $id is optional as well: if you set an $id, a HTML class='$id' will be generated for each event content (default: 'eventcontent').
|
||||
*/
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="scat" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor).'">';
|
||||
} else {
|
||||
$content .= '">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton('catid='.$this->catid);
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
# skip foreign categories - we are restricted to one
|
||||
if ($cat->id != $this->catid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if ($displayLegend == 1) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
<?php if ($displayLegend == 1) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
$counter = array();
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
# skip foreign categories - we are restricted to one
|
||||
if ($cat->id != $this->catid) {
|
||||
continue;
|
||||
}
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
$counter = array();
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
# skip foreign categories - we are restricted to one
|
||||
if ($cat->id != $this->catid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
<div class="tipologia-menu ps-lg-4 col-lg-3">
|
||||
<aside class="aside-list aside-sticky">
|
||||
<div class="menu-laterale">
|
||||
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -11,6 +11,7 @@ defined('_JEXEC') or die;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
?>
|
||||
<div class="container">
|
||||
<div id="jem" class="jem_category<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
@ -102,5 +103,6 @@ use Joomla\CMS\HTML\HTMLHelper;
|
||||
<?php echo JemOutput::footer( ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
|
||||
@ -12,103 +12,115 @@ use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
?>
|
||||
<div id="jem" class="jem_category<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('id' => $this->category->slug, 'slug' => $this->category->slug, 'task' => $this->task, 'print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div id="jem" class="jem_category<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('id' => $this->category->slug, 'slug' => $this->category->slug, 'task' => $this->task, 'print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h1 class='componentheading'>
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->escape($this->params->get('page_heading')) != $this->escape($this->category->title)) : ?>
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h2 class="jem-category-title">
|
||||
<?php echo $this->escape($this->category->title);?>
|
||||
</h2>
|
||||
<?php else : ?>
|
||||
<h1 class="jem-category-title">
|
||||
<?php echo $this->escape($this->category->title);?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<style>
|
||||
.jem-catimg {
|
||||
flex-basis: <?php echo $this->jemsettings->imagewidth; ?>px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php if (($this->jemsettings->discatheader) && (!empty($this->category->image))) : ?>
|
||||
<div class="jem-catimg">
|
||||
<?php echo JemOutput::flyer($this->category, $this->cimage, 'category'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="description">
|
||||
<p><?php echo $this->description; ?></p>
|
||||
</div>
|
||||
|
||||
<div class="jem-clear">
|
||||
</div>
|
||||
|
||||
<!--subcategories-->
|
||||
<?php
|
||||
if ($this->showsubcats && $this->maxLevel != 0 && !empty($this->category->id) && !empty($this->children[$this->category->id])) :
|
||||
$countsubcats = 0;
|
||||
foreach ($this->children[$this->category->id] as $id => $child) :
|
||||
// Do we have any non-empty subcategory or should generally show empty subcategories?
|
||||
// Note: We also show empty subcategories if they have at least one non-empty subsubcategory.
|
||||
if ($this->showemptysubcats || ($child->getNumItems(true) > 0)) :
|
||||
++$countsubcats;
|
||||
endif;
|
||||
endforeach;
|
||||
if ($countsubcats) :
|
||||
?>
|
||||
<div class="cat-children">
|
||||
<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
|
||||
<h2>
|
||||
<?php echo Text::_('COM_JEM_SUBCATEGORIES'); ?>
|
||||
</h2>
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h1 class='componentheading'>
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->escape($this->params->get('page_heading')) != $this->escape($this->category->title)) : ?>
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h2 class="jem-category-title">
|
||||
<?php echo $this->escape($this->category->title);?>
|
||||
</h2>
|
||||
<?php else : ?>
|
||||
<h1 class="jem-category-title">
|
||||
<?php echo $this->escape($this->category->title);?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<style>
|
||||
.jem-catimg {
|
||||
flex-basis: <?php echo $this->jemsettings->imagewidth; ?>px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php if (($this->jemsettings->discatheader) && (!empty($this->category->image))) : ?>
|
||||
<div class="jem-catimg">
|
||||
<?php echo JemOutput::flyer($this->category, $this->cimage, 'category'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->loadTemplate('subcategories'); ?>
|
||||
|
||||
<div class="description">
|
||||
<p><?php echo $this->description; ?></p>
|
||||
</div>
|
||||
|
||||
<div class="jem-clear">
|
||||
</div>
|
||||
|
||||
<!--subcategories-->
|
||||
<?php
|
||||
if ($this->showsubcats && $this->maxLevel != 0 && !empty($this->category->id) && !empty($this->children[$this->category->id])) :
|
||||
$countsubcats = 0;
|
||||
foreach ($this->children[$this->category->id] as $id => $child) :
|
||||
// Do we have any non-empty subcategory or should generally show empty subcategories?
|
||||
// Note: We also show empty subcategories if they have at least one non-empty subsubcategory.
|
||||
if ($this->showemptysubcats || ($child->getNumItems(true) > 0)) :
|
||||
++$countsubcats;
|
||||
endif;
|
||||
endforeach;
|
||||
if ($countsubcats) :
|
||||
?>
|
||||
<div class="cat-children">
|
||||
<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
|
||||
<h2>
|
||||
<?php echo Text::_('COM_JEM_SUBCATEGORIES'); ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->loadTemplate('subcategories'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>
|
||||
<?php echo Text::_('COM_JEM_EVENTS'); ?>
|
||||
</h2>
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm">
|
||||
<!--table-->
|
||||
<?php echo $this->loadTemplate('events_table'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="view" value="category" />
|
||||
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->category->id; ?>" />
|
||||
</form>
|
||||
|
||||
<!--pagination-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<!-- iCal -->
|
||||
<div id="iCal" class="iCal">
|
||||
<?php echo JemOutput::icalbutton($this->category->id, 'category'); ?>
|
||||
</div>
|
||||
|
||||
<!-- copyright -->
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tipologia-menu ps-lg-4 col-lg-3">
|
||||
<aside class="aside-list aside-sticky">
|
||||
<div class="menu-laterale">
|
||||
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>
|
||||
<?php echo Text::_('COM_JEM_EVENTS'); ?>
|
||||
</h2>
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm">
|
||||
<!--table-->
|
||||
<?php echo $this->loadTemplate('events_table'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="view" value="category" />
|
||||
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->category->id; ?>" />
|
||||
</form>
|
||||
|
||||
<!--pagination-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<!-- iCal -->
|
||||
<div id="iCal" class="iCal">
|
||||
<?php echo JemOutput::icalbutton($this->category->id, 'category'); ?>
|
||||
</div>
|
||||
|
||||
<!-- copyright -->
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
|
||||
492
templates/joomla-italia-theme/html/com_jem/event/default.php
Normal file
492
templates/joomla-italia-theme/html/com_jem/event/default.php
Normal file
@ -0,0 +1,492 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Date\Date;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
|
||||
// Create shortcuts to some parameters.
|
||||
$params = $this->item->params;
|
||||
$images = json_decode($this->item->datimage);
|
||||
$attribs = json_decode($this->item->attribs);
|
||||
$user = JemFactory::getUser();
|
||||
$jemsettings = JemHelper::config();
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$uri = Uri::getInstance();
|
||||
|
||||
// Add expiration date, if old events will be archived or removed
|
||||
if ($jemsettings->oldevent > 0) {
|
||||
$enddate = strtotime($this->item->enddates?:($this->item->dates?:date("Y-m-d")));
|
||||
$expDate = date("D, d M Y H:i:s", strtotime('+1 day', $enddate));
|
||||
$document->addCustomTag('<meta http-equiv="expires" content="' . $expDate . '"/>');
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if ($params->get('access-view')) { /* This will show nothings otherwise - ??? */ ?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div id="jem" class="event_id<?php echo $this->item->did; ?> jem_event<?php echo $this->pageclass_sfx;?>"
|
||||
itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
|
||||
<meta itemprop="url" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($this->item->slug)); ?>" />
|
||||
<meta itemprop="identifier" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($this->item->slug)); ?>" />
|
||||
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('slug' => $this->item->slug, 'print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="clr"> </div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"> </div>
|
||||
|
||||
<!-- Event -->
|
||||
<h2 class="jem">
|
||||
<span style="white-space: nowrap;">
|
||||
<?php
|
||||
echo Text::_('COM_JEM_EVENT') . JemOutput::recurrenceicon($this->item) .' ';
|
||||
if($this->item_root) {
|
||||
echo JemOutput::editbutton($this->item_root, $params, $attribs, $this->permissions->canEditEvent, 'editevent') . ' ';
|
||||
}
|
||||
if(!$this->item_root || ($this->item_root && $this->item->recurrence_first_id)) {
|
||||
echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditEvent, 'editevent') . ' ';
|
||||
}
|
||||
echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddEvent, 'editevent');
|
||||
?>
|
||||
</span>
|
||||
</h2>
|
||||
|
||||
<?php echo JemOutput::flyer($this->item, $this->dimage, 'event'); ?>
|
||||
|
||||
<dl class="event_info floattext">
|
||||
<?php if ($params->get('event_show_detailstitle',1)) : ?>
|
||||
<dt class="title"><?php echo Text::_('COM_JEM_TITLE'); ?>:</dt>
|
||||
<dd class="title" itemprop="name"><?php echo $this->escape($this->item->title); ?></dd>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<dt class="when"><?php echo Text::_('COM_JEM_WHEN'); ?>:</dt>
|
||||
<dd class="when">
|
||||
<?php
|
||||
echo JemOutput::formatLongDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
|
||||
echo JemOutput::formatSchemaOrgDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
|
||||
?>
|
||||
</dd>
|
||||
<?php if ($this->item->locid != 0) : ?>
|
||||
<dt class="where"><?php echo Text::_('COM_JEM_WHERE'); ?>:</dt>
|
||||
<dd class="where"><?php
|
||||
if (($params->get('event_show_detlinkvenue') == 1) && (!empty($this->item->url))) :
|
||||
?><a target="_blank" href="<?php echo $this->item->url; ?>"><?php echo $this->escape($this->item->venue); ?></a><?php
|
||||
elseif (($params->get('event_show_detlinkvenue') == 2) && (!empty($this->item->venueslug))) :
|
||||
?><a href="<?php echo Route::_(JemHelperRoute::getVenueRoute($this->item->venueslug)); ?>"><?php echo $this->item->venue; ?></a><?php
|
||||
else/*if ($params->get('event_show_detlinkvenue') == 0)*/ :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
|
||||
# will show "venue" or "venue - city" or "venue - city, state" or "venue, state"
|
||||
$city = $this->escape($this->item->city);
|
||||
$state = $this->escape($this->item->state);
|
||||
if ($city) { echo ' - ' . $city; }
|
||||
if ($state) { echo ', ' . $state; }
|
||||
?>
|
||||
</dd>
|
||||
<?php
|
||||
endif;
|
||||
$n = is_array($this->categories) ? count($this->categories) : 0;
|
||||
?>
|
||||
|
||||
<dt class="category"><?php echo $n < 2 ? Text::_('COM_JEM_CATEGORY') : Text::_('COM_JEM_CATEGORIES'); ?>:</dt>
|
||||
<dd class="category">
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ((array)$this->categories as $category) :
|
||||
?><a href="<?php echo Route::_(JemHelperRoute::getCategoryRoute($category->catslug)); ?>"><?php echo $this->escape($category->catname); ?></a><?php
|
||||
$i++;
|
||||
if ($i != $n) :
|
||||
echo ', ';
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->item->{'custom'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="'.$this->escape($currentRow).'" target="_blank">'.$this->escape($currentRow).'</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?>"><?php echo Text::_('COM_JEM_EVENT_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($params->get('event_show_hits')) : ?>
|
||||
<dt class="hits"><?php echo Text::_('COM_JEM_EVENT_HITS_LABEL'); ?>:</dt>
|
||||
<dd class="hits"><?php echo Text::sprintf('COM_JEM_EVENT_HITS', $this->item->hits); ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!-- AUTHOR -->
|
||||
<?php if ($params->get('event_show_author') && !empty($this->item->author)) : ?>
|
||||
<dt class="createdby"><?php echo Text::_('COM_JEM_EVENT_CREATED_BY_LABEL'); ?>:</dt>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
|
||||
<?php if (!empty($this->item->contactid2) && $params->get('event_link_author') == true) :
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid2 . '&catid=' . $this->item->concatid;
|
||||
$menu = Factory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
echo Text::sprintf('COM_JEM_EVENT_CREATED_BY', HTMLHelper::_('link', Route::_($cntlink), $author));
|
||||
else :
|
||||
echo Text::sprintf('COM_JEM_EVENT_CREATED_BY', $author);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (!empty($this->showeventstate) && isset($this->item->published)) : ?>
|
||||
<dt class="published"><?php echo Text::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="published">
|
||||
<?php switch ($this->item->published) {
|
||||
case 1: echo Text::_('JPUBLISHED'); break;
|
||||
case 0: echo Text::_('JUNPUBLISHED'); break;
|
||||
case 2: echo Text::_('JARCHIVED'); break;
|
||||
case -2: echo Text::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<!-- DESCRIPTION -->
|
||||
<?php if ($params->get('event_show_description','1') && ($this->item->fulltext != '' && $this->item->fulltext != '<br />' || $this->item->introtext != '' && $this->item->introtext != '<br />')) { ?>
|
||||
<h2 class="description"><?php echo Text::_('COM_JEM_EVENT_DESCRIPTION'); ?></h2>
|
||||
<div class="description event_desc" itemprop="description">
|
||||
|
||||
<?php
|
||||
if ($params->get('access-view')) {
|
||||
echo $this->item->text;
|
||||
}
|
||||
/* optional teaser intro text for guests - NOT SUPPORTED YET */
|
||||
elseif (0 /*$params->get('event_show_noauth') == true and $user->get('guest')*/ ) {
|
||||
echo $this->item->introtext;
|
||||
// Optional link to let them register to see the whole event.
|
||||
if ($params->get('event_show_readmore') && $this->item->fulltext != null) {
|
||||
$link1 = Route::_('index.php?option=com_users&view=login');
|
||||
$link = new JUri($link1);
|
||||
echo '<p class="readmore">';
|
||||
echo '<a href="'.$link.'">';
|
||||
if ($params->get('event_alternative_readmore') == false) {
|
||||
echo Text::_('COM_JEM_EVENT_REGISTER_TO_READ_MORE');
|
||||
} elseif ($readmore = $params->get('alternative_readmore')) {
|
||||
echo $readmore;
|
||||
}
|
||||
|
||||
if ($params->get('event_show_readmore_title', 0) != 0) {
|
||||
echo HTMLHelper::_('string.truncate', ($this->item->title), $params->get('event_readmore_limit'));
|
||||
} elseif ($params->get('event_show_readmore_title', 0) == 0) {
|
||||
} else {
|
||||
echo HTMLHelper::_('string.truncate', ($this->item->title), $params->get('event_readmore_limit'));
|
||||
} ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
} /* access_view / show_noauth */
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Contact -->
|
||||
<?php if ($params->get('event_show_contact') && !empty($this->item->conid )) : ?>
|
||||
|
||||
<h2 class="contact"><?php echo Text::_('COM_JEM_CONTACT') ; ?></h2>
|
||||
|
||||
<dl class="location floattext">
|
||||
<dt class="con_name"><?php echo Text::_('COM_JEM_NAME'); ?>:</dt>
|
||||
<dd class="con_name">
|
||||
<?php
|
||||
$contact = $this->item->conname;
|
||||
if ($params->get('event_link_contact') == true) :
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->conid . '&catid=' . $this->item->concatid;
|
||||
$menu = Factory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink2 = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
echo Text::sprintf('COM_JEM_EVENT_CONTACT', HTMLHelper::_('link', Route::_($cntlink2), $contact));
|
||||
else :
|
||||
echo Text::sprintf('COM_JEM_EVENT_CONTACT', $contact);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<?php if ($this->item->contelephone) : ?>
|
||||
<dt class="con_telephone"><?php echo Text::_('COM_JEM_TELEPHONE'); ?>:</dt>
|
||||
<dd class="con_telephone">
|
||||
<?php echo $this->escape($this->item->contelephone); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $this->attachments = $this->item->attachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
<!-- Venue -->
|
||||
<?php if (($this->item->locid != 0) && !empty($this->item->venue) && $params->get('event_show_venue', '1')) : ?>
|
||||
<p></p>
|
||||
<hr />
|
||||
|
||||
<div class="venue_id<?php echo $this->item->locid; ?>" itemprop="location" itemscope="itemscope" itemtype="https://schema.org/Place">
|
||||
<meta itemprop="name" content="<?php echo $this->escape($this->item->venue); ?>" />
|
||||
<?php $itemid = $this->item ? $this->item->id : 0 ; ?>
|
||||
<h2 class="location">
|
||||
<?php
|
||||
echo Text::_('COM_JEM_VENUE') ;
|
||||
$itemid = $this->item ? $this->item->id : 0 ;
|
||||
echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditVenue, 'editvenue');
|
||||
echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddVenue, 'editvenue');
|
||||
?>
|
||||
</h2>
|
||||
<?php echo JemOutput::flyer($this->item, $this->limage, 'venue'); ?>
|
||||
|
||||
<dl class="location">
|
||||
<dt class="venue"><?php echo Text::_('COM_JEM_LOCATION'); ?>:</dt>
|
||||
<dd class="venue">
|
||||
<?php
|
||||
if (!empty($this->item->venueslug)) :
|
||||
echo '<a href="' . Route::_(JemHelperRoute::getVenueRoute($this->item->venueslug)) . '">' . $this->escape($this->item->venue) . '</a>';
|
||||
else :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
if (!empty($this->item->url)) :
|
||||
echo ' - <a target="_blank" href="' . $this->item->url . '">' . Text::_('COM_JEM_WEBSITE') . '</a>';
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php if ($params->get('event_show_detailsadress', '1')) : ?>
|
||||
<dl class="location floattext" itemprop="address" itemscope
|
||||
itemtype="https://schema.org/PostalAddress">
|
||||
<?php if ($this->item->street) : ?>
|
||||
<dt class="venue_street"><?php echo Text::_('COM_JEM_STREET'); ?>:</dt>
|
||||
<dd class="venue_street" itemprop="streetAddress">
|
||||
<?php echo $this->escape($this->item->street); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->postalCode) : ?>
|
||||
<dt class="venue_postalCode"><?php echo Text::_('COM_JEM_ZIP'); ?>:</dt>
|
||||
<dd class="venue_postalCode" itemprop="postalCode">
|
||||
<?php echo $this->escape($this->item->postalCode); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->city) : ?>
|
||||
<dt class="venue_city"><?php echo Text::_('COM_JEM_CITY'); ?>:</dt>
|
||||
<dd class="venue_city" itemprop="addressLocality">
|
||||
<?php echo $this->escape($this->item->city); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->state) : ?>
|
||||
<dt class="venue_state"><?php echo Text::_('COM_JEM_STATE'); ?>:</dt>
|
||||
<dd class="venue_state" itemprop="addressRegion">
|
||||
<?php echo $this->escape($this->item->state); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->country) : ?>
|
||||
<dt class="venue_country"><?php echo Text::_('COM_JEM_COUNTRY'); ?>:</dt>
|
||||
<dd class="venue_country">
|
||||
<?php echo $this->item->countryimg ? $this->item->countryimg : $this->item->country; ?>
|
||||
<meta itemprop="addressCountry" content="<?php echo $this->item->country; ?>" />
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (!empty($this->showvenuestate) && isset($this->item->locpublished)) : ?>
|
||||
<dt class="venue_published"><?php echo Text::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="venue_published">
|
||||
<?php switch ($this->item->locpublished) {
|
||||
case 1: echo Text::_('JPUBLISHED'); break;
|
||||
case 0: echo Text::_('JUNPUBLISHED'); break;
|
||||
case 2: echo Text::_('JARCHIVED'); break;
|
||||
case -2: echo Text::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->item->{'venue'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="' . $this->escape($currentRow) . '" target="_blank">' . $this->escape($currentRow) . '</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?>"><?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 1 || $params->get('event_show_mapserv') == 4) : ?>
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 2 || $params->get('event_show_mapserv') == 5) : ?>
|
||||
<div class="jem-map">
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 3) : ?>
|
||||
<input type="hidden" id="latitude" value="<?php echo $this->item->latitude; ?>">
|
||||
<input type="hidden" id="longitude" value="<?php echo $this->item->longitude; ?>">
|
||||
<input type="hidden" id="venue" value="<?php echo $this->item->venue; ?>">
|
||||
<input type="hidden" id="street" value="<?php echo $this->item->street; ?>">
|
||||
<input type="hidden" id="city" value="<?php echo $this->item->city; ?>">
|
||||
<input type="hidden" id="state" value="<?php echo $this->item->state; ?>">
|
||||
<input type="hidden" id="postalCode" value="<?php echo $this->item->postalCode; ?>">
|
||||
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; /* event_show_detailsadress */ ?>
|
||||
|
||||
<?php if ($params->get('event_show_locdescription', '1') && $this->item->locdescription != ''
|
||||
&& $this->item->locdescription != '<br />') : ?>
|
||||
<h2 class="location_desc"><?php echo Text::_('COM_JEM_VENUE_DESCRIPTION'); ?></h2>
|
||||
<div class="description location_desc" itemprop="description">
|
||||
<?php echo $this->item->locdescription; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->attachments = $this->item->vattachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Registration -->
|
||||
<?php if ($this->showAttendees && $params->get('event_show_registration', '1')) : ?>
|
||||
<hr class="jem-hr">
|
||||
<h2 class="register"><?php echo Text::_('COM_JEM_REGISTRATION'); ?></h2>
|
||||
|
||||
<?php
|
||||
$timeNow = time();
|
||||
|
||||
switch ($this->e_reg) {
|
||||
case 0:
|
||||
//Event without registration (NO)
|
||||
echo Text::_('COM_JEM_VENUE_DESCRIPTION');
|
||||
break;
|
||||
case 1:
|
||||
//Event with registration (YES with or witout UNTIL)
|
||||
echo $this->loadTemplate('attendees');
|
||||
if($this->dateUnregistationUntil) {
|
||||
echo ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . ' ' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2'));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
//Event with date starting registration (FROM with or witout UNTIL)
|
||||
if($this->dateRegistationFrom > $timeNow) {
|
||||
echo Text::_('COM_JEM_EVENT_REGISTRATION_WILLBE_FROM') . ' ' . HTMLHelper::_('date', $this->dateRegistationFrom, Text::_('DATE_FORMAT_LC2'));
|
||||
}else if ($this->allowRegistration) {
|
||||
echo Text::_('COM_JEM_EVENT_REGISTRATION_IS_FROM') . ' ' . HTMLHelper::_('date', $this->dateRegistationFrom, Text::_('DATE_FORMAT_LC2'));
|
||||
if($this->dateRegistationUntil){
|
||||
echo " " . mb_strtolower(Text::_('COM_JEM_UNTIL')) . ' ' . HTMLHelper::_('date', $this->dateRegistationUntil, Text::_('DATE_FORMAT_LC2'));
|
||||
}
|
||||
echo $this->loadTemplate('attendees');
|
||||
|
||||
//Event with date starting annulation
|
||||
if($this->dateUnregistationUntil) {
|
||||
echo "<br>" . ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . ' ' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2'));
|
||||
}
|
||||
}else if($this->dateRegistationUntil !== false && $this->dateRegistationUntil < $timeNow) {
|
||||
echo Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL') . ' ' . HTMLHelper::_('date', $this->dateRegistationUntil, Text::_('DATE_FORMAT_LC2'));
|
||||
echo $this->loadTemplate('attendees');
|
||||
|
||||
//Event with date starting annulation
|
||||
if($this->dateUnregistationUntil) {
|
||||
echo ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . ' ' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2'));
|
||||
}
|
||||
} else {
|
||||
// open registration to the end of event
|
||||
if($this->item->enddates){
|
||||
$endDateEvent = strtotime($this->item->enddates . ' ' . ($this->item->endtimes ? $this->item->endtimes : '23:59:59'));
|
||||
if($timeNow <= $endDateEvent){
|
||||
echo Text::_('COM_JEM_EVENT_REGISTRATION_IS_UNTIL');
|
||||
} else {
|
||||
echo Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL');
|
||||
}
|
||||
echo ' ' . HTMLHelper::_('date', $endDateEvent, Text::_('DATE_FORMAT_LC2'));
|
||||
echo $this->loadTemplate('attendees');
|
||||
}else{
|
||||
if(!empty($this->item->dates)) {
|
||||
$endDateEvent = strtotime($this->item->dates . ' ' . ($this->item->times ? $this->item->times : '23:59:59'));
|
||||
if($timeNow <= $endDateEvent){
|
||||
echo Text::_('COM_JEM_EVENT_REGISTRATION_IS_UNTIL');
|
||||
} else {
|
||||
echo Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL');
|
||||
}
|
||||
echo ' ' . HTMLHelper::_('date', $endDateEvent, Text::_('DATE_FORMAT_LC2'));
|
||||
echo $this->loadTemplate('attendees');
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($this->item->pluginevent->onEventEnd)) : ?>
|
||||
<hr class="jem-hr">
|
||||
<?php echo $this->item->pluginevent->onEventEnd; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tipologia-menu ps-lg-4 col-lg-3">
|
||||
<aside class="aside-list aside-sticky">
|
||||
<div class="menu-laterale">
|
||||
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
echo JemOutput::lightbox();
|
||||
?>
|
||||
|
||||
@ -0,0 +1,270 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*
|
||||
* @todo add check if CB does exists and if so perform action
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
$linkreg = 'index.php?option=com_jem&view=attendees&id='.$this->item->id.($this->itemid ? '&Itemid='.$this->itemid : '');
|
||||
?>
|
||||
|
||||
<div class="register">
|
||||
<dl class="jem-dl floattext">
|
||||
<?php $maxplaces = (int)$this->item->maxplaces; ?>
|
||||
<?php $reservedplaces = (int)$this->item->reservedplaces; ?>
|
||||
<?php $minbookeduser = (int)$this->item->minbookeduser; ?>
|
||||
<?php $maxbookeduser = (int)$this->item->maxbookeduser; ?>
|
||||
<?php $booked = (int)$this->item->booked; ?>
|
||||
<?php $waitinglist = (int)$this->item->waitinglist; ?>
|
||||
<?php $seriesbooking = (int)$this->item->seriesbooking; ?>
|
||||
|
||||
<?php if ($this->settings->get('event_show_registration_counters','1')) : ?>
|
||||
<?php if ($maxplaces > 0) : ?>
|
||||
<dt class="register max-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_MAX_PLACES'); ?>"><?php echo Text::_('COM_JEM_MAX_PLACES'); ?>:</dt>
|
||||
<dd class="register max-places"><?php echo $maxplaces; ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if (($maxplaces > 0) || ($reservedplaces > 0)) : ?>
|
||||
<dt class="register booked-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_RESERVED_PLACES'); ?>"><?php echo Text::_('COM_JEM_RESERVED_PLACES'); ?>:</dt>
|
||||
<dd class="register booked-places">
|
||||
<?php echo $reservedplaces; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($maxplaces > 0) : ?>
|
||||
<dt class="register booked-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_BOOKED_PLACES'); ?>"><?php echo Text::_('COM_JEM_BOOKED_PLACES'); ?>:</dt>
|
||||
<dd class="register booked-places"><?php echo $booked; ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->item->maxbookeduser > 0) : ?>
|
||||
<dt><?php echo Text::_('COM_JEM_MAXIMUM_BOOKED_PLACES_PER_USER') ?>:</dt>
|
||||
<dd><?php echo $this->item->maxbookeduser?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($maxplaces > 0) : ?>
|
||||
<dt class="register available-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_AVAILABLE_PLACES'); ?>"><?php echo Text::_('COM_JEM_AVAILABLE_PLACES'); ?>:</dt>
|
||||
<dd class="register available-places"><?php echo ($maxplaces - $booked - $reservedplaces); ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($waitinglist > 0) : ?>
|
||||
<dt class="register waitinglist-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_WAITING_PLACES'); ?>"><?php echo Text::_('COM_JEM_WAITING_PLACES'); ?>:</dt>
|
||||
<dd class="register waitinglist-places"><?php echo $this->numWaitingPlaces; ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; /* Not show counters registration */ ?>
|
||||
|
||||
<?php
|
||||
$this->registereduser = null;
|
||||
// only set style info if users already have registered for event and user is allowed to see it
|
||||
if ($this->registers) :
|
||||
$showAttendenenames = $this->settings->get('event_show_attendeenames', 2);
|
||||
switch ($showAttendenenames) {
|
||||
case 1: // show to admins
|
||||
if (!$this->user->authorise('core.manage', 'com_jem')) {
|
||||
$showAttendenenames = 0;
|
||||
}
|
||||
break;
|
||||
case 2: // show to registered
|
||||
if ($this->user->get('guest')) {
|
||||
$showAttendenenames = 0;
|
||||
}
|
||||
break;
|
||||
case 3: // show to all
|
||||
break;
|
||||
case 4: // show only to user
|
||||
break;
|
||||
case 0: // show to none
|
||||
default:
|
||||
$showAttendenenames = 0;
|
||||
}
|
||||
if ($showAttendenenames) : ?>
|
||||
<hr/>
|
||||
|
||||
<dt class="register registered-users hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_REGISTERED_USERS'); ?>"><?php echo Text::_('COM_JEM_REGISTERED_USERS'); ?>:</dt>
|
||||
<dd class="register registered-users">
|
||||
<ul class="fa-ul jem-registered-list">
|
||||
<?php
|
||||
if ($this->settings->get('event_comunsolution', '0') == 1) :
|
||||
if ($this->settings->get('event_comunoption', '0') == 1) :
|
||||
//$cparams = ComponentHelper::getParams('com_media');
|
||||
//$imgpath = $cparams->get('image_path'); // mostly 'images'
|
||||
$imgpath = 'images'; // CB does NOT respect path set in Media Manager, so we have to ignore this too
|
||||
if (File::exists(JPATH_ROOT . '/components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png')) {
|
||||
$noimg = 'components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png';
|
||||
} elseif (File::exists(JPATH_ROOT . '/components/com_comprofiler/images/english/tnnophoto.jpg')) {
|
||||
$noimg = 'components/com_comprofiler/images/english/tnnophoto.jpg';
|
||||
} else {
|
||||
$noimg = '';
|
||||
}
|
||||
endif;
|
||||
endif;
|
||||
|
||||
if(!function_exists("jem_getStatusIcon")) {
|
||||
if ($this->settings->get('event_show_more_attendeedetails', '0')) {
|
||||
function jem_getStatusIcon($status) {
|
||||
switch($status) {
|
||||
case 2: // waiting list
|
||||
return ' <i class="fa fa-li fa-hourglass-half jem-attendance-status-fa-hourglass-half hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_ON_WAITINGLIST').'"></i>';
|
||||
break;
|
||||
case 1: // attending
|
||||
return ' <i class="fa fa-li fa-check-circle jem-attendance-status-fa-check-circle hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_ATTENDING').'"></i>';
|
||||
break;
|
||||
case 0: // invited
|
||||
return ' <i class="fa fa-li fa-question-circle jem-attendance-status-fa-question-circle hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_INVITED').'"></i>';
|
||||
break;
|
||||
case -1: // not attending
|
||||
return ' <i class="fa fa-li fa-times-circle jem-attendance-status-fa-times-circle hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_NOT_ATTENDING').'"></i>';
|
||||
break;
|
||||
default:
|
||||
return $status;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
function jem_getStatusIcon($status) {
|
||||
return ' <i class="fa fa-li fa-check-circle jem-attendance-status-fa-check-circle hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_ATTENDING').'"></i>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->registers as $k => $register) :
|
||||
if($showAttendenenames==4){
|
||||
if($this->user->id != $register->uid){
|
||||
continue;
|
||||
}
|
||||
} else if ($showAttendenenames==2) {
|
||||
if($register->status==2){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
echo '<li class="' . ($this->user->id==$register->uid? 'jem-registered-user-owner':'jem-registered-user') . '">' . jem_getStatusIcon($register->status);
|
||||
$text = '';
|
||||
$registedplaces = '';
|
||||
// is a plugin catching this ?
|
||||
if ($res = $this->dispatcher->triggerEvent('onAttendeeDisplay', array($register->uid, &$text))) :
|
||||
echo $text;
|
||||
endif;
|
||||
|
||||
//Registered user in the event
|
||||
if($register->uid == $this->user->id) {
|
||||
$this->registereduser = $k;
|
||||
}
|
||||
if($register->status==1 && $register->places>1){
|
||||
$registedplaces = ' + ' . $register->places-1 . ' '. ($register->places-1>1? Text::_('COM_JEM_BOOKED_PLACES'): Text::_('COM_JEM_BOOKED_PLACE'));
|
||||
}else if($register->status==-1 && $register->places>1){
|
||||
$registedplaces = '';
|
||||
}else if($register->status==0 && $register->places>1){
|
||||
$registedplaces = ' + ' . $register->places-1 . ' '. ($register->places-1>1? Text::_('COM_JEM_INVITED_PLACES'): Text::_('COM_JEM_INVITED_PLACE'));
|
||||
}else if($register->status==2 && $register->places>1){
|
||||
$registedplaces = ' + ' . $register->places-1 . ' '. ($register->places-1>1? Text::_('COM_JEM_WAITING_PLACES'): Text::_('COM_JEM_WAITING_PLACE'));
|
||||
}
|
||||
|
||||
// if CB
|
||||
if ($this->settings->get('event_comunsolution', '0') == 1) :
|
||||
$needle = 'index.php?option=com_comprofiler&view=userprofile';
|
||||
$menu = Factory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink = !empty($item) ? $needle . '&user=' . $register->uid . '&Itemid=' . $item->id : $needle;
|
||||
if ($this->settings->get('event_comunoption', '0') == 1) :
|
||||
// User has avatar
|
||||
if (!empty($register->avatar)) :
|
||||
if (File::exists(JPATH_ROOT . '/' . $imgpath . '/comprofiler/tn' . $register->avatar)) {
|
||||
$useravatar = HTMLHelper::image($imgpath . '/comprofiler/tn' . $register->avatar, $register->name);
|
||||
} elseif (File::exists(JPATH_ROOT . '/' . $imgpath . '/comprofiler/' . $register->avatar)) {
|
||||
$useravatar = HTMLHelper::image($imgpath . '/comprofiler/' . $register->avatar, $register->name);
|
||||
} else {
|
||||
$useravatar = empty($noimg) ? '' : HTMLHelper::image($noimg, $register->name);
|
||||
}
|
||||
echo '<a style="text-decoration: none;" href="' . Route::_($cntlink) . '" title = "' . Text::_('COM_JEM_SHOW_USER_PROFILE') . '">' . $useravatar . ' <span class="username">' . $register->name . '</span></a>' . $registedplaces;
|
||||
|
||||
// User has no avatar
|
||||
else :
|
||||
$nouseravatar = empty($noimg) ? '' : HTMLHelper::image($noimg, $register->name);
|
||||
echo '<a style="text-decoration: none;" href="' . Route::_($cntlink) . '" title = "' . Text::_('COM_JEM_SHOW_USER_PROFILE') .'">' . $nouseravatar . ' <span class="username">' . $register->name . '</span></a>' . $registedplaces;
|
||||
endif;
|
||||
else :
|
||||
// only show the username with link to profile
|
||||
echo '<span class="username"><a style="text-decoration: none;" href="' . Route::_($cntlink) . '">' . $register->name . '</a></span>' . $registedplaces;
|
||||
endif;
|
||||
// if CB end - if not CB than only name
|
||||
else :
|
||||
// no communitycomponent is set so only show the username
|
||||
echo '<span class="username">' . $register->name . '</span>' . $registedplaces;
|
||||
endif;
|
||||
|
||||
echo '</li>';
|
||||
// end loop through attendees
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->permissions->canEditAttendees) : ?>
|
||||
<dt></dt>
|
||||
<dd><a href="<?php echo $linkreg; ?>" title="<?php echo Text::_('COM_JEM_MYEVENT_MANAGEATTENDEES'); ?>"><?php echo Text::_('COM_JEM_MYEVENT_MANAGEATTENDEES') ?> <i class="icon-out-2" aria-hidden="true"></i></a></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<hr />
|
||||
|
||||
<?php if ($this->print == 0) : ?>
|
||||
<dl class="jem-dl floattext">
|
||||
<dt class="register registration hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_YOUR_REGISTRATION'); ?>"><?php echo Text::_('COM_JEM_YOUR_REGISTRATION'); ?>:</dt>
|
||||
<dd class="register registration">
|
||||
<?php
|
||||
if ($this->item->published != 1) {
|
||||
echo Text::_('COM_JEM_WRONG_STATE_FOR_REGISTER');
|
||||
} elseif (!$this->showRegForm) {
|
||||
echo Text::_('COM_JEM_NOT_ALLOWED_TO_REGISTER');
|
||||
} else {
|
||||
switch ($this->formhandler) {
|
||||
case 0:
|
||||
echo Text::_('COM_JEM_TOO_LATE_UNREGISTER');
|
||||
break;
|
||||
case 1:
|
||||
echo Text::_('COM_JEM_TOO_LATE_REGISTER');
|
||||
break;
|
||||
case 2:
|
||||
if ($this->item->requestanswer) { ?>
|
||||
<span class="badge rounded-pill text-light bg-secondary">
|
||||
<?php echo Text::_('COM_JEM_SEND_UNREGISTRATION');?>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
$uri = Uri::getInstance();
|
||||
$returnUrl = $uri->toString();
|
||||
$urlLogin = Route::_($uri->root() . 'index.php?option=com_users&view=login&return='.base64_encode($returnUrl)); ?>
|
||||
<button class="btn btn-sm btn-warning" onclick="location.href='<?php echo $urlLogin; ?>'"
|
||||
type="button"><?php echo Text::_('COM_JEM_LOGIN_FOR_REGISTER'); ?></button>
|
||||
|
||||
<?php //insert Breezing Form hack here
|
||||
/*<input class="btn btn-secondary" type="button" value="<?php echo Text::_('COM_JEM_SIGNUPHERE_AS_GUEST'); ?>" onClick="window.location='/index.php?option=com_breezingforms&view=form&Itemid=6089&event=<?php echo $this->item->title; ?>&date=<?php echo $this->item->dates ?>&conemail=<?php echo $this->item->conemail ?>';"/>
|
||||
*/?>
|
||||
<?php
|
||||
break;
|
||||
case 3:
|
||||
if($this->item->reginvitedonly == 1){
|
||||
if($this->isregistered === 0){
|
||||
echo $this->loadTemplate('regform');
|
||||
} else{
|
||||
echo Text::_('COM_JEM_INVITED_USERS_ONLY') . '.<br>' . Text::_('COM_JEM_NOT_INVITED') . '.';
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
echo $this->loadTemplate('regform');
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@ -0,0 +1,349 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
// The user is not already attending -> display registration form.
|
||||
|
||||
if ($this->showRegForm && empty($this->print)) :
|
||||
|
||||
if (($this->item->maxplaces > 0) && (($this->item->booked + $this->item->reservedplaces) >= $this->item->maxplaces) && !$this->item->waitinglist && empty($this->registration->status)) :
|
||||
?>
|
||||
<?php echo Text::_( 'COM_JEM_EVENT_FULL_NOTICE' ); ?>
|
||||
|
||||
<?php else :
|
||||
|
||||
//USER
|
||||
$waitingPlacesUser = 0;
|
||||
$placesBookedUser = 0;
|
||||
$placesRegisteredUser = 0;
|
||||
$statusRegistrationUser = -1;
|
||||
$model = $this->getModel('event');
|
||||
|
||||
if ($this->item->maxbookeduser != 0) {
|
||||
$placesavailableuser = $this->item->maxbookeduser;
|
||||
if ($this->registereduser !== null) {
|
||||
$placesavailableuser = $this->item->maxbookeduser - ($this->registers[$this->registereduser]->status > 0 ? $this->registers[$this->registereduser]->places : 0);
|
||||
} else if ($this->item->waitinglist && $this->registration != null) {
|
||||
if ($this->registration->status == 2) {
|
||||
$placesavailableuser = $this->item->maxbookeduser - $this->registration->places;
|
||||
$waitingPlacesUser = $this->registration->places;
|
||||
$statusRegistrationUser = $this->registration->status;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$placesavailableuser = null;
|
||||
}
|
||||
|
||||
//EVENT
|
||||
if ($this->item->maxplaces) {
|
||||
$placesavailableevent = $this->item->maxplaces - $this->item->booked - $this->item->reservedplaces;
|
||||
if ($placesavailableuser === null) {
|
||||
$placesavailableuser = $placesavailableevent;
|
||||
}
|
||||
} else {
|
||||
$placesavailableevent = false;
|
||||
}
|
||||
if ($placesavailableevent != false) {
|
||||
if ($placesavailableuser > 0 && ($placesavailableuser > $placesavailableevent)) {
|
||||
$placesavailableuser = $placesavailableevent;
|
||||
}
|
||||
}
|
||||
|
||||
//BOOKED PLACES BY USER
|
||||
if ($this->registereduser !== null) {
|
||||
$statusRegistrationUser = $this->registers[$this->registereduser]->status;
|
||||
if ($statusRegistrationUser == 1) {
|
||||
$placesBookedUser = $this->registers[$this->registereduser]->places;
|
||||
} else {
|
||||
$placesBookedUser = 0;
|
||||
}
|
||||
$placesRegisteredUser = $this->registers[$this->registereduser]->places;
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="JEM" action="<?php echo Route::_('index.php?option=com_jem&view=event&id=' . (int)$this->item->id); ?>" name="adminForm" id="adminForm" method="post">
|
||||
<p>
|
||||
<?php
|
||||
if ($this->isregistered === false) {
|
||||
if ($this->item->requestanswer) {
|
||||
echo Text::_('COM_JEM_SEND_UNREGISTRATION');
|
||||
}
|
||||
if ($this->item->registra == 3) {
|
||||
echo Text::_('COM_JEM_NOT_INVITED');
|
||||
} else {
|
||||
echo Text::_('COM_JEM_YOU_ARE_UNREGISTERED');
|
||||
}
|
||||
} else {
|
||||
switch ($this->isregistered) :
|
||||
case -1:
|
||||
//You are NOT attending
|
||||
echo Text::_('COM_JEM_YOU_ARE_NOT_ATTENDING');
|
||||
break;
|
||||
case 0:
|
||||
//You're invited
|
||||
echo Text::_('COM_JEM_YOU_ARE_INVITED');
|
||||
break;
|
||||
case 1:
|
||||
//You're attending
|
||||
if ($this->allowAnnulation) {
|
||||
echo Text::_('COM_JEM_YOU_ARE_ATTENDING');
|
||||
} else {
|
||||
echo substr(Text::_('COM_JEM_YOU_ARE_ATTENDING'), 0,strpos(Text::_('COM_JEM_YOU_ARE_ATTENDING'), "<br>"));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
//You're on Waitinglist
|
||||
echo Text::_('COM_JEM_YOU_ARE_ON_WAITINGLIST');
|
||||
break;
|
||||
default:
|
||||
//You didn't answer!
|
||||
echo Text::_('COM_JEM_YOU_ARE_UNREGISTERED');
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
|
||||
if ($this->item->seriesbooking) {
|
||||
// If event has 'seriesbooking' active and $checkseries is true then get all recurrence events of series from now (register or unregister)
|
||||
$events = $model->getListRecurrenceEventsbyId($this->item->id, $this->item->recurrence_first_id, time(), $this->user->id);
|
||||
if ($events) {
|
||||
// Shown the active series event list
|
||||
echo '<div class="pt-3">' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_4') . '</div>';
|
||||
echo '<div><table id="table-series"><thead><tr><th>' . Text::_('COM_JEM_DATE') . '</th><th>' . Text::_('COM_JEM_TITLE') . '</th><th>' . Text::_('COM_JEM_STATUS') . '</th><th>' . Text::_('COM_JEM_PLACES') . '</th><th>ID</th></tr></thead><tbody>';
|
||||
|
||||
foreach ($events as $e) {
|
||||
if (!$e->waiting && $e->status == 1) {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_ATTENDING');
|
||||
} else if ($e->waiting == 1 && $e->status == 1) {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_ON_WAITINGLIST');
|
||||
} else if (!$e->status){
|
||||
$status = Text::_('COM_JEM_ATTENDEES_INVITED');
|
||||
} else if ($e->status == -1) {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_NOT_ATTENDING');
|
||||
} else {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_STATUS_UNKNOWN');
|
||||
}
|
||||
echo '<tr><td nowrap>' . $e->dates . ' [' . ($e->times ? substr($e->times, 0, 5) : '') . ($e->endtimes ? '-' . substr($e->endtimes, 0, 5) : '') . ']</td><td>' . $e->title . '</td><td>' . $status . '</td><td>' . $e->places . '</td><td>' . $e->id . '</td></tr>';
|
||||
}
|
||||
echo '</tbody></table></div>';
|
||||
echo '<div> </div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<input type="radio" name="reg_check" value="1" onclick="check(this, document.getElementById('jem_send_attend'))"
|
||||
<?php if ($this->isregistered !== false
|
||||
&& ($placesavailableevent === 0 || ($placesavailableuser === 0 && $statusRegistrationUser != 0))
|
||||
&& (!$this->item->waitinglist || ($this->item->waitinglist && ($placesBookedUser || $placesavailableuser === 0)))
|
||||
|| !$this->allowRegistration) {
|
||||
echo 'disabled="disabled"';
|
||||
} else {
|
||||
echo 'checked="checked"';
|
||||
} ?>
|
||||
/>
|
||||
<i class="fa fa-check-circle-o fa-lg jem-registerbutton" aria-hidden="true"></i>
|
||||
<?php
|
||||
|
||||
//FULL AND WAITLIST
|
||||
if ($this->item->maxplaces && (($this->item->booked + $this->item->reservedplaces) >= $this->item->maxplaces)) {
|
||||
if ($this->item->waitinglist) {
|
||||
if ($placesBookedUser) {
|
||||
$placesavailableuser = 0;
|
||||
echo Text::_('COM_JEM_EVENT_FULL_USER_REGISTERED_NO_WAITING_LIST');
|
||||
} else {
|
||||
echo Text::_('COM_JEM_EVENT_FULL_REGISTER_TO_WAITING_LIST');
|
||||
}
|
||||
} else {
|
||||
if ($placesavailableevent === 0) {
|
||||
echo Text::_('COM_JEM_NOT_AVAILABLE_PLACES_EVENT');
|
||||
$placesavailableuser = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//Option: I will attend
|
||||
if ($this->registereduser !== null) {
|
||||
if (!$placesBookedUser) {
|
||||
echo Text::_('COM_JEM_I_WILL_GO');
|
||||
}
|
||||
} else {
|
||||
echo Text::_('COM_JEM_I_WILL_GO');
|
||||
if(!$this->allowRegistration){
|
||||
echo '<span class="badge bg-warning text-light" role="alert">' . Text::_('COM_JEM_EVENT_REGISTRATION_CLOSED') . '</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// for this user no additional places
|
||||
if ($placesavailableuser === 0 || $this->registration === false) {
|
||||
echo '<span class="badge bg-warning text-light" role="alert">' . Text::_('COM_JEM_NOT_AVAILABLE_PLACES_USER') . '</span>';
|
||||
} else {
|
||||
// Booking places
|
||||
if ($this->item->maxbookeduser > 1) {
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_GO_2');
|
||||
echo ' <input id="addplaces" style="text-align: center; width:auto;" type="number" name="addplaces" '
|
||||
. 'value="' . ($placesavailableuser > 0 ? ($this->item->maxbookeduser - $placesBookedUser < $placesavailableuser ? $this->item->minbookeduser - $placesBookedUser : 1) : ($placesavailableuser ?? 1))
|
||||
. '" max="' . ($placesavailableuser > 0 ? ($this->item->maxbookeduser - $placesBookedUser < $placesavailableuser ? $this->item->maxbookeduser - $placesBookedUser : $placesavailableuser) : ($placesavailableuser ?? ''))
|
||||
. '" min="' . ($placesavailableuser > 0 ? ($placesBookedUser - $this->item->minbookeduser >= 0 ? 1 : $this->item->minbookeduser - $placesBookedUser) : 0) . '">';
|
||||
if ($this->registereduser != null) {
|
||||
//Places
|
||||
if ($placesBookedUser && $statusRegistrationUser == 1) {
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_GO_3');
|
||||
} else {
|
||||
//Place
|
||||
echo ' ' . Text::_('COM_JEM_PLACES_REG') . '.';
|
||||
}
|
||||
} else {
|
||||
//Place
|
||||
if ($this->item->maxbookeduser == $placesavailableuser) {
|
||||
echo ' ' . Text::_('COM_JEM_PLACES_REG') . '.';
|
||||
} else {
|
||||
//Places
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_GO_3');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo ' <input id="addplaces" style="text-align: center; width:auto;" type="hidden" name="addplaces" value="1">';
|
||||
}
|
||||
if ($this->item->recurrence_type){
|
||||
echo '<div class="p-3" >' . Text::_('COM_JEM_I_WILL_GO_SERIES_1') . '</div>';
|
||||
if ($this->item->seriesbooking) {
|
||||
// If event has 'seriesbooking' active and $checkseries is true then get all recurrence events of series from now (register or unregister)
|
||||
if (!$this->registereduser){
|
||||
$events = $model->getListRecurrenceEventsbyId($this->item->id, $this->item->recurrence_first_id, time());
|
||||
}else{
|
||||
$events = $model->getListRecurrenceEventsbyId($this->item->id, $this->item->recurrence_first_id, time(), $this->user->id, 1);
|
||||
}
|
||||
if($events) {
|
||||
// Shown the active series event list
|
||||
echo '<div class="px-3">' . Text::_('COM_JEM_I_WILL_GO_SERIES_4') . '</div>';
|
||||
echo '<div class="px-3"><table id="table-series"><thead><tr><th>' . Text::_('COM_JEM_DATE') . '</th><th>' . Text::_('COM_JEM_TITLE') . '</th>' . ($this->registereduser? '<th>' . Text::_('COM_JEM_STATUS') . '</th><th>' . Text::_('COM_JEM_PLACES') . '</th>':'') . '<th>ID</th></tr></thead><tbody>';
|
||||
|
||||
foreach ($events as $e) {
|
||||
if ($this->registereduser) {
|
||||
switch ($e->status) {
|
||||
case -1:
|
||||
$status = Text::_('COM_JEM_ATTENDEES_NOT_ATTENDING');
|
||||
break;
|
||||
case 0:
|
||||
$status = Text::_('COM_JEM_ATTENDEES_INVITED');
|
||||
break;
|
||||
case 1:
|
||||
if ($e->waiting) {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_ON_WAITINGLIST');
|
||||
} else {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_ATTENDING');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$status = Text::_('COM_JEM_ATTENDEES_STATUS_UNKNOWN');
|
||||
break;
|
||||
}
|
||||
}
|
||||
echo '<tr><td nowrap>' . $e->dates . ' [' . ($e->times ? substr($e->times, 0, 5) : '') . ($e->endtimes ? '-' . substr($e->endtimes, 0, 5) : '') . ']</td><td>' . $e->title . '</td>' . ($this->registereduser? '<td>' . $status . '</td><td>' . $e->places . '</td>':'') . '<td>' . $e->id . '</td></tr>';
|
||||
}
|
||||
echo '</tbody></table></div>';
|
||||
|
||||
if ($this->item->singlebooking) {
|
||||
echo '<div class="px-3 pt-3"> <input id = "jem_unregister_event_series" type = "checkbox" name = "reg_check_series"> ' . Text::_('COM_JEM_I_WILL_GO_SERIES_2') . '</input ></div>';
|
||||
} else {
|
||||
echo '<div class="px-3 pt-3">' . Text::_('COM_JEM_I_WILL_GO_SERIES_3') . '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php if ($this->item->requestanswer || $placesRegisteredUser || $waitingPlacesUser) {?>
|
||||
<p>
|
||||
|
||||
<?php if ($this->allowAnnulation || ($this->isregistered != 1) || $waitingPlacesUser) : ?>
|
||||
<input id="jem_unregister_event" type="radio" name="reg_check" value="-1" onclick="check(this, document.getElementById('jem_send_attend'));"
|
||||
<?php if ($this->isregistered !== false && $statusRegistrationUser>0 && $placesavailableuser==0) { echo 'checked="checked"'; } ?>
|
||||
/>
|
||||
<i class="fa fa-times-circle-o fa-lg jem-unregisterbutton" aria-hidden="true"></i>
|
||||
<?php
|
||||
//Option: I don't attend
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_NOT_GO');
|
||||
if ($this->registereduser !== null || $waitingPlacesUser) {
|
||||
if ($placesRegisteredUser || $waitingPlacesUser) {
|
||||
if ($statusRegistrationUser == 1) {
|
||||
// Booked places
|
||||
$cancelplaces = ($placesRegisteredUser - 1 > 1 ? Text::_('COM_JEM_BOOKED_PLACES') : Text::_('COM_JEM_BOOKED_PLACE'));
|
||||
} else if ($statusRegistrationUser == -1) {
|
||||
$cancelplaces = '';
|
||||
//Booked places for invited users
|
||||
} else if ($statusRegistrationUser == 0) {
|
||||
$cancelplaces = ($placesRegisteredUser - 1 > 1 ? Text::_('COM_JEM_INVITED_PLACES') : Text::_('COM_JEM_INVITED_PLACE'));
|
||||
//Booked places for waiting users
|
||||
} else if ($statusRegistrationUser == 2) {
|
||||
$cancelplaces = ($waitingPlacesUser - 1 > 1 ? Text::_('COM_JEM_WAITING_PLACES') : Text::_('COM_JEM_WAITING_PLACE'));
|
||||
}
|
||||
|
||||
//Canceling...
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_NOT_GO_2');
|
||||
echo ' <input id="cancelplaces" style="text-align: center;" type="number" name="cancelplaces" value="' . ($placesRegisteredUser ? $placesRegisteredUser : $waitingPlacesUser) . '" max="' . ($placesRegisteredUser ? $placesRegisteredUser : $waitingPlacesUser) . '" min="1">' . ' ' . $cancelplaces;
|
||||
}
|
||||
if ($this->item->recurrence_type) {
|
||||
echo '<div class="px-3">' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_1') . '</div>';
|
||||
if ($this->item->seriesbooking) {
|
||||
if($events) {
|
||||
if ($this->item->singlebooking) {
|
||||
echo '<div class="px-3 pt-3"> <input id = "jem_unregister_event_series" type = "checkbox" name = "reg_check_series"> ' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_2') . '</input ></div>';
|
||||
} else {
|
||||
echo '<div class="px-3">' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_3') . '</div>';
|
||||
}
|
||||
}else{
|
||||
echo '<div class="px-3">' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_5') . '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//...booked places
|
||||
$cancelplaces = Text::_('COM_JEM_I_WILL_NOT_GO_3');
|
||||
}
|
||||
?>
|
||||
<?php else :
|
||||
//Unregistration is not possible?>
|
||||
<input type="radio" name="reg_dummy" value="" disabled="disabled" />
|
||||
<i class="fa fa-times-circle-o fa-lg jem-unregisterbutton" aria-hidden="true"></i>
|
||||
<?php echo ' '.Text::_('COM_JEM_NOT_ALLOWED_TO_ANNULATE'); ?>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<?php }
|
||||
|
||||
$disabledOptions = ($placesavailableuser && !$this->allowRegistration) || (!$placesavailableuser && $this->allowRegistration && !$this->allowAnnulation) || (!$this->allowAnnulation && !$this->allowRegistration);
|
||||
|
||||
//Comment?>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) { ?>
|
||||
<p><?php echo Text::_('COM_JEM_OPTIONAL_COMMENT') . ':'; ?></p>
|
||||
<p><textarea class="inputbox" name="reg_comment" id="reg_comment" rows="3" cols="30" maxlength="255" <?php echo ($disabledOptions ? 'disabled="disabled"':'');?>><?php
|
||||
if (is_object($this->registration) && !empty($this->registration->comment)) {
|
||||
echo htmlspecialchars($this->registration->comment);
|
||||
} ?></textarea></p>
|
||||
<?php } ?>
|
||||
<p>
|
||||
<input class="btn btn-sm btn-primary" type="submit" id="jem_send_attend" name="jem_send_attend"
|
||||
<?php echo ($disabledOptions? 'disabled="disabled"':'');?>
|
||||
value="<?php echo ($placesRegisteredUser ? Text::_('COM_JEM_SEND_REGISTER') : Text::_('COM_JEM_REGISTER')); ?>" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="rdid" value="<?php echo $this->item->did; ?>" />
|
||||
<input type="hidden" name="regid" value="<?php echo (is_object($this->registration) ? $this->registration->id : 0); ?>" />
|
||||
<input type="hidden" name="task" value="event.userregister"/>
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
||||
<?php
|
||||
endif; // full?
|
||||
|
||||
endif; // registra and not print
|
||||
@ -0,0 +1,563 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Date\Date;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
|
||||
// Create shortcuts to some parameters.
|
||||
$params = $this->item->params;
|
||||
$images = json_decode($this->item->datimage);
|
||||
$attribs = json_decode($this->item->attribs);
|
||||
$user = JemFactory::getUser();
|
||||
$jemsettings = JemHelper::config();
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$uri = Uri::getInstance();
|
||||
|
||||
// Add expiration date, if old events will be archived or removed
|
||||
if ($jemsettings->oldevent > 0) {
|
||||
$enddate = strtotime($this->item->enddates?:($this->item->dates?:date("Y-m-d")));
|
||||
$expDate = date("D, d M Y H:i:s", strtotime('+1 day', $enddate));
|
||||
$document->addCustomTag('<meta http-equiv="expires" content="' . $expDate . '"/>');
|
||||
}
|
||||
|
||||
$catclasses = '';
|
||||
foreach ((array)$this->categories as $category) {
|
||||
$catclasses .= ' cat_id' . $this->escape($category->id);
|
||||
}
|
||||
|
||||
if ($params->get('access-view')) { /* This will show nothings otherwise - ??? */ ?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div id="jem" class="event_id<?php
|
||||
echo $this->escape($this->item->did);
|
||||
if (!empty($this->item->locid)) {
|
||||
echo ' venue_id' . $this->escape($this->item->locid);
|
||||
}
|
||||
if (!empty($catclasses)) {
|
||||
echo $this->escape($catclasses);
|
||||
}
|
||||
?> jem_event<?php echo $this->escape($this->pageclass_sfx); ?>"
|
||||
itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
|
||||
<meta itemprop="url" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($this->item->slug)); ?>" />
|
||||
<meta itemprop="identifier" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($this->item->slug)); ?>" />
|
||||
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('slug' => $this->item->slug, 'print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Event -->
|
||||
<h2 class="jem">
|
||||
<?php
|
||||
echo Text::_('COM_JEM_EVENT') . JemOutput::recurrenceicon($this->item) . ' ';
|
||||
if($this->item_root) {
|
||||
echo JemOutput::editbutton($this->item_root, $params, $attribs, $this->permissions->canEditEvent, 'editevent') . ' ';
|
||||
}
|
||||
if(!$this->item_root || ($this->item_root && $this->item->recurrence_first_id)) {
|
||||
echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditEvent, 'editevent') .' ';
|
||||
}
|
||||
echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddEvent, 'editevent');
|
||||
?>
|
||||
</h2>
|
||||
<div class="jem-row">
|
||||
<div class="jem-info">
|
||||
<dl class="jem-dl">
|
||||
<?php if ($params->get('event_show_detailstitle',1)) : ?>
|
||||
<dt class="jem-title hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_TITLE'); ?>"><?php echo Text::_('COM_JEM_TITLE'); ?>:</dt>
|
||||
<dd class="jem-title" itemprop="name"><?php echo $this->escape($this->item->title); ?></dd>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<dt class="jem-when hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_WHEN'); ?>"><?php echo Text::_('COM_JEM_WHEN'); ?>:</dt>
|
||||
<dd class="jem-when">
|
||||
<span style="white-space: nowrap;">
|
||||
<?php
|
||||
echo JemOutput::formatLongDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
|
||||
echo JemOutput::formatSchemaOrgDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
|
||||
?>
|
||||
</span>
|
||||
</dd>
|
||||
<?php if (!empty($this->item->locid)) : ?>
|
||||
<dt class="jem-where hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_WHERE'); ?>"><?php echo Text::_('COM_JEM_WHERE'); ?>:</dt>
|
||||
<dd class="jem-where"><?php
|
||||
if (($params->get('event_show_detlinkvenue') == 1) && (!empty($this->item->url))) :
|
||||
?><a target="_blank" href="<?php echo $this->item->url; ?>"><?php echo $this->escape($this->item->venue); ?></a><?php
|
||||
elseif (($params->get('event_show_detlinkvenue') == 2) && (!empty($this->item->venueslug))) :
|
||||
?><a href="<?php echo Route::_(JemHelperRoute::getVenueRoute($this->item->venueslug)); ?>"><?php echo $this->item->venue; ?></a><?php
|
||||
else/*if ($params->get('event_show_detlinkvenue') == 0)*/ :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
|
||||
# will show "venue" or "venue - city" or "venue - city, state" or "venue, state"
|
||||
$city = $this->escape($this->item->city);
|
||||
$state = $this->escape($this->item->state);
|
||||
if ($city) { echo ' - ' . $city; }
|
||||
if ($state) { echo ', ' . $state; }
|
||||
?>
|
||||
</dd>
|
||||
<?php
|
||||
endif;
|
||||
$n = is_array($this->categories) ? count($this->categories) : 0;
|
||||
?>
|
||||
|
||||
<dt class="jem-category hasTooltip" data-original-title="<?php echo $n < 2 ? Text::_('COM_JEM_CATEGORY') : Text::_('COM_JEM_CATEGORIES'); ?>">
|
||||
<?php echo $n < 2 ? Text::_('COM_JEM_CATEGORY') : Text::_('COM_JEM_CATEGORIES'); ?>:
|
||||
</dt>
|
||||
<dd class="jem-category">
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ((array)$this->categories as $category) :
|
||||
?><a href="<?php echo Route::_(JemHelperRoute::getCategoryRoute($category->catslug)); ?>"><?php echo $this->escape($category->catname); ?></a><?php
|
||||
$i++;
|
||||
if ($i != $n) :
|
||||
echo ', ';
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->item->{'custom'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="'.$this->escape($currentRow).'" target="_blank">'.$this->escape($currentRow).'</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="jem-custom<?php echo $cr; ?> hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_EVENT_CUSTOM_FIELD'.$cr); ?>"><?php echo Text::_('COM_JEM_EVENT_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="jem-custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($params->get('event_show_hits')) : ?>
|
||||
<dt class="jem-hits hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_EVENT_HITS_LABEL'); ?>"><?php echo Text::_('COM_JEM_EVENT_HITS_LABEL'); ?>:</dt>
|
||||
<dd class="jem-hits"><?php echo Text::sprintf('COM_JEM_EVENT_HITS', $this->item->hits); ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!-- AUTHOR -->
|
||||
<?php if ($params->get('event_show_author') && !empty($this->item->author)) : ?>
|
||||
<dt class="createdby hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_EVENT_CREATED_BY_LABEL'); ?>"><?php echo Text::_('COM_JEM_EVENT_CREATED_BY_LABEL'); ?>:</dt>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
|
||||
<?php if (!empty($this->item->contactid2) && $params->get('event_link_author') == true) :
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid2 . '&catid=' . $this->item->concatid;
|
||||
$menu = Factory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
echo Text::sprintf('COM_JEM_EVENT_CREATED_BY', HTMLHelper::_('link', Route::_($cntlink), $author));
|
||||
else :
|
||||
echo Text::sprintf('COM_JEM_EVENT_CREATED_BY', $author);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (!empty($this->showeventstate) && isset($this->item->published)) : ?>
|
||||
<dt class="jem-published hasTooltip" data-original-title="<?php echo Text::_('JSTATUS'); ?>"><?php echo Text::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="jem-published">
|
||||
<?php switch ($this->item->published) {
|
||||
case 1: echo Text::_('JPUBLISHED'); break;
|
||||
case 0: echo Text::_('JUNPUBLISHED'); break;
|
||||
case 2: echo Text::_('JARCHIVED'); break;
|
||||
case -2: echo Text::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</div>
|
||||
<style>
|
||||
.jem-img {
|
||||
flex-basis: <?php echo $this->jemsettings->imagewidth; ?>px;
|
||||
}
|
||||
</style>
|
||||
<div class="jem-img">
|
||||
<?php echo JemOutput::flyer($this->item, $this->dimage, 'event'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- DESCRIPTION -->
|
||||
<?php if ($params->get('event_show_description','1') && ($this->item->fulltext != '' && $this->item->fulltext != '<br />' || $this->item->introtext != '' && $this->item->introtext != '<br />')) { ?>
|
||||
<h2 class="jem-description"><?php echo Text::_('COM_JEM_EVENT_DESCRIPTION'); ?></h2>
|
||||
<div class="jem-description event_desc" itemprop="description">
|
||||
|
||||
<?php
|
||||
if ($params->get('access-view')) {
|
||||
echo $this->item->text;
|
||||
}
|
||||
/* optional teaser intro text for guests - NOT SUPPORTED YET */
|
||||
elseif (0 /*$params->get('event_show_noauth') == true and $user->get('guest')*/ ) {
|
||||
echo $this->item->introtext;
|
||||
// Optional link to let them register to see the whole event.
|
||||
if ($params->get('event_show_readmore') && $this->item->fulltext != null) {
|
||||
$link1 = Route::_('index.php?option=com_users&view=login');
|
||||
$link = new Uri($link1);
|
||||
echo '<p class="readmore">';
|
||||
echo '<a href="'.$link.'">';
|
||||
if ($params->get('event_alternative_readmore') == false) {
|
||||
echo Text::_('COM_JEM_EVENT_REGISTER_TO_READ_MORE');
|
||||
} elseif ($readmore = $params->get('alternative_readmore')) {
|
||||
echo $readmore;
|
||||
}
|
||||
|
||||
if ($params->get('event_show_readmore_title', 0) != 0) {
|
||||
echo HTMLHelper::_('string.truncate', ($this->item->title), $params->get('event_readmore_limit'));
|
||||
} elseif ($params->get('event_show_readmore_title', 0) == 0) {
|
||||
} else {
|
||||
echo HTMLHelper::_('string.truncate', ($this->item->title), $params->get('event_readmore_limit'));
|
||||
} ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
} /* access_view / show_noauth */
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Contact -->
|
||||
<?php if ($params->get('event_show_contact') && !empty($this->item->conid )) : ?>
|
||||
|
||||
<h2 class="jem-contact"><?php echo Text::_('COM_JEM_CONTACT') ; ?></h2>
|
||||
|
||||
<dl class="jem-dl">
|
||||
<dt class="con_name hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_NAME'); ?>"><?php echo Text::_('COM_JEM_NAME'); ?>:</dt>
|
||||
<dd class="con_name">
|
||||
<?php
|
||||
$contact = $this->item->conname;
|
||||
if ($params->get('event_link_contact') == true) :
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->conid . '&catid=' . $this->item->concatid;
|
||||
$menu = Factory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink2 = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
echo Text::sprintf('COM_JEM_EVENT_CONTACT', HTMLHelper::_('link', Route::_($cntlink2), $contact));
|
||||
else :
|
||||
echo Text::sprintf('COM_JEM_EVENT_CONTACT', $contact);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<?php if ($this->item->contelephone) : ?>
|
||||
<dt class="con_telephone hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_TELEPHONE'); ?>"><?php echo Text::_('COM_JEM_TELEPHONE'); ?>:</dt>
|
||||
<dd class="con_telephone">
|
||||
<?php echo $this->escape($this->item->contelephone); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $this->attachments = $this->item->attachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
<!-- Venue -->
|
||||
<?php if ((!empty($this->item->locid)) && !empty($this->item->venue) && $params->get('event_show_venue', '1')) : ?>
|
||||
<p></p>
|
||||
<hr class="jem-hr">
|
||||
|
||||
<div class="venue_id<?php echo $this->item->locid; ?>" itemprop="location" itemscope="itemscope" itemtype="https://schema.org/Place">
|
||||
<meta itemprop="name" content="<?php echo $this->escape($this->item->venue); ?>" />
|
||||
<?php $itemid = $this->item ? $this->item->id : 0 ; ?>
|
||||
<h2 class="jem-location">
|
||||
<?php
|
||||
echo Text::_('COM_JEM_VENUE').' '.JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditVenue, 'editvenue').' '.JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddVenue, 'editvenue');
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<div class="jem-row jem-wrap-reverse">
|
||||
<?php if ($params->get('event_show_detailsadress', '1')) : ?>
|
||||
<div class="jem-grow-2">
|
||||
<dl class="jem-dl" itemprop="address" itemscope
|
||||
itemtype="https://schema.org/PostalAddress">
|
||||
<dt class="venue hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_LOCATION'); ?>"><?php echo Text::_('COM_JEM_LOCATION'); ?>:</dt>
|
||||
<dd class="venue">
|
||||
<?php
|
||||
if (($params->get('event_show_detlinkvenue') == 1) && (!empty($this->item->url))) :
|
||||
echo '<a target="_blank" href="' . $this->item->url . '">' . $this->escape($this->item->venue) . '</a>';
|
||||
elseif (($params->get('event_show_detlinkvenue') == 2) && (!empty($this->item->venueslug))) :
|
||||
echo '<a href="' . Route::_(JemHelperRoute::getVenueRoute($this->item->venueslug)) . '">' . $this->escape($this->item->venue) . '</a>';
|
||||
else/*if ($params->get('event_show_detlinkvenue') == 0)*/ :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
<?php if ($this->item->street) : ?>
|
||||
<dt class="venue_street hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_STREET'); ?>"><?php echo Text::_('COM_JEM_STREET'); ?>:</dt>
|
||||
<dd class="venue_street" itemprop="streetAddress">
|
||||
<?php echo $this->escape($this->item->street); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->postalCode) : ?>
|
||||
<dt class="venue_postalCode hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_ZIP'); ?>"><?php echo Text::_('COM_JEM_ZIP'); ?>:</dt>
|
||||
<dd class="venue_postalCode" itemprop="postalCode">
|
||||
<?php echo $this->escape($this->item->postalCode); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->city) : ?>
|
||||
<dt class="venue_city hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_CITY'); ?>"><?php echo Text::_('COM_JEM_CITY'); ?>:</dt>
|
||||
<dd class="venue_city" itemprop="addressLocality">
|
||||
<?php echo $this->escape($this->item->city); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->state) : ?>
|
||||
<dt class="venue_state hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_STATE'); ?>"><?php echo Text::_('COM_JEM_STATE'); ?>:</dt>
|
||||
<dd class="venue_state" itemprop="addressRegion">
|
||||
<?php echo $this->escape($this->item->state); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->country) : ?>
|
||||
<dt class="venue_country hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_COUNTRY'); ?>"><?php echo Text::_('COM_JEM_COUNTRY'); ?>:</dt>
|
||||
<dd class="venue_country">
|
||||
<?php echo $this->item->countryimg ? $this->item->countryimg : $this->item->country; ?>
|
||||
<meta itemprop="addressCountry" content="<?php echo $this->item->country; ?>" />
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (!empty($this->showvenuestate) && isset($this->item->locpublished)) : ?>
|
||||
<dt class="venue_published hasTooltip" data-original-title="<?php echo Text::_('JSTATUS'); ?>"><?php echo Text::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="venue_published">
|
||||
<?php switch ($this->item->locpublished) {
|
||||
case 1: echo Text::_('JPUBLISHED'); break;
|
||||
case 0: echo Text::_('JUNPUBLISHED'); break;
|
||||
case 2: echo Text::_('JARCHIVED'); break;
|
||||
case -2: echo Text::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->item->{'venue'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="' . $this->escape($currentRow) . '" target="_blank">' . $this->escape($currentRow) . '</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?> hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>"><?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if ($params->get('event_show_mapserv') == 1 || $params->get('event_show_mapserv') == 4) : ?>
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="jem-img">
|
||||
<?php echo JemOutput::flyer($this->item, $this->limage, 'venue'); ?>
|
||||
</div>
|
||||
<?php else : // $params->get('event_show_detailsadress', '1') == 0 ?>
|
||||
<div class="jem-grow-2">
|
||||
<dl class="jem-dl" itemprop="address" itemscope
|
||||
itemtype="https://schema.org/PostalAddress">
|
||||
<dt class="venue hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_LOCATION'); ?>"><?php echo Text::_('COM_JEM_LOCATION'); ?>:</dt>
|
||||
<dd class="venue">
|
||||
<?php
|
||||
if (($params->get('event_show_detlinkvenue') == 1) && (!empty($this->item->url))) :
|
||||
echo '<a target="_blank" href="' . $this->item->url . '">' . $this->escape($this->item->venue) . '</a>';
|
||||
elseif (($params->get('event_show_detlinkvenue') == 2) && (!empty($this->item->venueslug))) :
|
||||
echo '<a href="' . Route::_(JemHelperRoute::getVenueRoute($this->item->venueslug)) . '">' . $this->escape($this->item->venue) . '</a>';
|
||||
else/*if ($params->get('event_show_detlinkvenue') == 0)*/ :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="jem-img">
|
||||
<?php echo JemOutput::flyer($this->item, $this->limage, 'venue'); ?>
|
||||
</div>
|
||||
<?php endif; /* event_show_detailsadress */ ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$event_show_mapserv = $params->get('event_show_mapserv');
|
||||
if ($params->get('event_show_mapserv') == 2 || $params->get('event_show_mapserv') == 5) : ?>
|
||||
<div class="jem-map">
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($event_show_mapserv == 3) : ?>
|
||||
<div class="jem-map">
|
||||
<input type="hidden" id="latitude" value="<?php echo $this->item->latitude; ?>">
|
||||
<input type="hidden" id="longitude" value="<?php echo $this->item->longitude; ?>">
|
||||
<input type="hidden" id="venue" value="<?php echo $this->item->venue; ?>">
|
||||
<input type="hidden" id="street" value="<?php echo $this->item->street; ?>">
|
||||
<input type="hidden" id="city" value="<?php echo $this->item->city; ?>">
|
||||
<input type="hidden" id="state" value="<?php echo $this->item->state; ?>">
|
||||
<input type="hidden" id="postalCode" value="<?php echo $this->item->postalCode; ?>">
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('event_show_locdescription', '1') && $this->item->locdescription != ''
|
||||
&& $this->item->locdescription != '<br />') : ?>
|
||||
<h2 class="location_desc"><?php echo Text::_('COM_JEM_VENUE_DESCRIPTION'); ?></h2>
|
||||
<div class="description location_desc" itemprop="description">
|
||||
<?php echo $this->item->locdescription; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->attachments = $this->item->vattachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php elseif (empty($this->item->locid)) : ?>
|
||||
<div itemtype="https://schema.org/Place" itemscope itemprop="location" style="display: none;">
|
||||
<meta itemprop="name" content="None"/>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
<div itemtype="https://schema.org/Place" itemscope itemprop="location" style="display: none;">
|
||||
<meta itemprop="name" content="<?php echo $this->escape($this->item->venue); ?>" />
|
||||
<div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress" style="display: none;">
|
||||
<?php if ($this->item->street) : ?>
|
||||
<meta itemprop="streetAddress" content="<?php echo $this->escape($this->item->street); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if ($this->item->postalCode) : ?>
|
||||
<meta itemprop="postalCode" content="<?php echo $this->escape($this->item->postalCode); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if ($this->item->city) : ?>
|
||||
<meta itemprop="addressLocality" content="<?php echo $this->escape($this->item->city); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if ($this->item->state) : ?>
|
||||
<meta itemprop="addressRegion" content="<?php echo $this->escape($this->item->state); ?>">
|
||||
<?php endif; ?>
|
||||
<?php if ($this->item->country) : ?>
|
||||
<meta itemprop="addressCountry" content="<?php echo $this->escape($this->item->country); ?>">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Registration -->
|
||||
<?php if ($this->showAttendees && $params->get('event_show_registration', '1')) { ?>
|
||||
<hr class="jem-hr">
|
||||
<h2 class="register"><?php echo Text::_('COM_JEM_REGISTRATION'); ?></h2>
|
||||
<dl class="jem-dl floattext">
|
||||
<?php
|
||||
$timeNow = time();
|
||||
|
||||
switch ($this->e_reg) {
|
||||
case 0:
|
||||
//Event without registration (NO)
|
||||
echo Text::_('COM_JEM_VENUE_DESCRIPTION');
|
||||
break;
|
||||
case 1:
|
||||
//Event with registration (YES with or witout UNTIL)
|
||||
echo $this->loadTemplate('attendees');
|
||||
if($this->dateUnregistationUntil) {
|
||||
echo '<dt>' . ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . '</dt><dd>' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2')) . '</dd>';
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
//Event with date starting registration (FROM with or witout UNTIL)
|
||||
if($this->dateRegistationFrom > $timeNow) {
|
||||
echo '<dt>' . Text::_('COM_JEM_EVENT_REGISTRATION_WILLBE_FROM') . '</dt><dd>' . HTMLHelper::_('date', $this->dateRegistationFrom, Text::_('DATE_FORMAT_LC2'));
|
||||
}else if ($this->allowRegistration) {
|
||||
echo '<dt>' . Text::_('COM_JEM_EVENT_REGISTRATION_IS_FROM') . '</dt><dd>' . HTMLHelper::_('date', $this->dateRegistationFrom, Text::_('DATE_FORMAT_LC2'));
|
||||
if($this->dateRegistationUntil){
|
||||
echo " " . mb_strtolower(Text::_('COM_JEM_UNTIL')) . ' ' . HTMLHelper::_('date', $this->dateRegistationUntil, Text::_('DATE_FORMAT_LC2'));
|
||||
}
|
||||
echo "</dd>";
|
||||
echo $this->loadTemplate('attendees');
|
||||
|
||||
//Event with date starting annulation
|
||||
if($this->dateUnregistationUntil) {
|
||||
echo '<dt>' . ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . '</dt><dd>' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2')) . '</dd>';
|
||||
}
|
||||
}else if($this->dateRegistationUntil !== false && $this->dateRegistationUntil < $timeNow) {
|
||||
echo '<dt>' . Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL') . '</dt><dd>' . HTMLHelper::_('date', $this->dateRegistationUntil, Text::_('DATE_FORMAT_LC2')) . '</dd>';
|
||||
echo $this->loadTemplate('attendees');
|
||||
|
||||
//Event with date starting annulation
|
||||
if($this->dateUnregistationUntil) {
|
||||
echo '<dt>' . ($this->allowAnnulation? Text::_('COM_JEM_EVENT_ANNULATION_NOTWILLBE_FROM') : Text::_('COM_JEM_EVENT_ANNULATION_ISNOT_FROM')) . '</dt><dd>' . HTMLHelper::_('date', $this->dateUnregistationUntil, Text::_('DATE_FORMAT_LC2')) . '</dd>';
|
||||
}
|
||||
} else {
|
||||
// open registration to the end of event
|
||||
if($this->item->enddates){
|
||||
$endDateEvent = strtotime($this->item->enddates . ' ' . ($this->item->endtimes ? $this->item->endtimes : '23:59:59'));
|
||||
if($timeNow <= $endDateEvent){
|
||||
echo '<dt>' . Text::_('COM_JEM_EVENT_REGISTRATION_IS_UNTIL');
|
||||
} else {
|
||||
echo '<dt>' . Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL');
|
||||
}
|
||||
echo '</dt><dd>' . HTMLHelper::_('date', $endDateEvent, Text::_('DATE_FORMAT_LC2')) . '</dd>';
|
||||
echo $this->loadTemplate('attendees');
|
||||
}else{
|
||||
if(!empty($this->item->dates)) {
|
||||
$endDateEvent = strtotime($this->item->dates . ' ' . ($this->item->times ? $this->item->times : '23:59:59'));
|
||||
if($timeNow <= $endDateEvent){
|
||||
echo '<dt>' . Text::_('COM_JEM_EVENT_REGISTRATION_IS_UNTIL');
|
||||
} else {
|
||||
echo '<dt>' . Text::_('COM_JEM_EVENT_REGISTRATION_WAS_UNTIL');
|
||||
}
|
||||
echo '</dt><dd>' . HTMLHelper::_('date', $endDateEvent, Text::_('DATE_FORMAT_LC2')) . '</dd>';
|
||||
echo $this->loadTemplate('attendees');
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
} ?>
|
||||
</dl>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!empty($this->item->pluginevent->onEventEnd)) : ?>
|
||||
<hr class="jem-hr">
|
||||
<?php echo $this->item->pluginevent->onEventEnd; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tipologia-menu ps-lg-4 col-lg-3">
|
||||
<aside class="aside-list aside-sticky">
|
||||
<div class="menu-laterale">
|
||||
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }
|
||||
|
||||
echo JemOutput::lightbox();
|
||||
?>
|
||||
@ -0,0 +1,277 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*
|
||||
* @todo add check if CB does exists and if so perform action
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Filesystem\File;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
$linkreg = 'index.php?option=com_jem&view=attendees&id='.$this->item->id.($this->itemid ? '&Itemid='.$this->itemid : '');
|
||||
?>
|
||||
|
||||
<div class="register">
|
||||
<dl class="jem-dl floattext">
|
||||
<?php $maxplaces = (int)$this->item->maxplaces; ?>
|
||||
<?php $reservedplaces = (int)$this->item->reservedplaces; ?>
|
||||
<?php $minbookeduser = (int)$this->item->minbookeduser; ?>
|
||||
<?php $maxbookeduser = (int)$this->item->maxbookeduser; ?>
|
||||
<?php $booked = (int)$this->item->booked; ?>
|
||||
<?php $waitinglist = (int)$this->item->waitinglist; ?>
|
||||
<?php $seriesbooking = (int)$this->item->seriesbooking; ?>
|
||||
|
||||
<?php if($this->settings->get('event_show_registration_counters','1')) : ?>
|
||||
<?php if ($maxplaces > 0) : ?>
|
||||
<dt class="register max-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_MAX_PLACES'); ?>"><?php echo Text::_('COM_JEM_MAX_PLACES'); ?>:</dt>
|
||||
<dd class="register max-places"><?php echo $maxplaces; ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if (($maxplaces > 0) || ($reservedplaces > 0)) : ?>
|
||||
<dt class="register booked-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_RESERVED_PLACES'); ?>"><?php echo Text::_('COM_JEM_RESERVED_PLACES'); ?>:</dt>
|
||||
<dd class="register booked-places">
|
||||
<?php echo $reservedplaces; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($maxplaces > 0) : ?>
|
||||
<dt class="register booked-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_BOOKED_PLACES'); ?>"><?php echo Text::_('COM_JEM_BOOKED_PLACES'); ?>:</dt>
|
||||
<dd class="register booked-places"><?php echo $booked; ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->item->maxbookeduser > 0) : ?>
|
||||
<dt><?php echo Text::_('COM_JEM_MAXIMUM_BOOKED_PLACES_PER_USER') ?>:</dt>
|
||||
<dd><?php echo $this->item->maxbookeduser?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($maxplaces > 0) : ?>
|
||||
<dt class="register available-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_AVAILABLE_PLACES'); ?>"><?php echo Text::_('COM_JEM_AVAILABLE_PLACES'); ?>:</dt>
|
||||
<dd class="register available-places"><?php echo ($maxplaces - $booked - $reservedplaces); ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($waitinglist > 0) : ?>
|
||||
<dt class="register waitinglist-places hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_WAITING_PLACES'); ?>"><?php echo Text::_('COM_JEM_WAITING_PLACES'); ?>:</dt>
|
||||
<dd class="register waitinglist-places"><?php echo $this->numWaitingPlaces; ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; /* Not show counters registration */ ?>
|
||||
|
||||
<?php
|
||||
$this->registereduser = null;
|
||||
// only set style info if users already have registered for event and user is allowed to see it
|
||||
if ($this->registers) :
|
||||
$showAttendenenames = $this->settings->get('event_show_attendeenames', 2);
|
||||
switch ($showAttendenenames) {
|
||||
case 1: // show to admins
|
||||
if (!$this->user->authorise('core.manage', 'com_jem')) {
|
||||
$showAttendenenames = 0;
|
||||
}
|
||||
break;
|
||||
case 2: // show to registered
|
||||
if ($this->user->get('guest')) {
|
||||
$showAttendenenames = 0;
|
||||
}
|
||||
break;
|
||||
case 3: // show to all
|
||||
break;
|
||||
case 4: // show only to user
|
||||
break;
|
||||
case 0: // show to none
|
||||
default:
|
||||
$showAttendenenames = 0;
|
||||
}
|
||||
if ($showAttendenenames) : ?>
|
||||
<hr/>
|
||||
|
||||
<dt class="register registered-users hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_REGISTERED_USERS'); ?>"><?php echo Text::_('COM_JEM_REGISTERED_USERS'); ?>:</dt>
|
||||
<dd class="register registered-users">
|
||||
<ul class="fa-ul jem-registered-list">
|
||||
<?php
|
||||
if ($this->settings->get('event_comunsolution', '0') == 1) :
|
||||
if ($this->settings->get('event_comunoption', '0') == 1) :
|
||||
//$cparams = ComponentHelper::getParams('com_media');
|
||||
//$imgpath = $cparams->get('image_path'); // mostly 'images'
|
||||
$imgpath = 'images'; // CB does NOT respect path set in Media Manager, so we have to ignore this too
|
||||
if (File::exists(JPATH_ROOT . '/components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png')) {
|
||||
$noimg = 'components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png';
|
||||
} elseif (File::exists(JPATH_ROOT . '/components/com_comprofiler/images/english/tnnophoto.jpg')) {
|
||||
$noimg = 'components/com_comprofiler/images/english/tnnophoto.jpg';
|
||||
} else {
|
||||
$noimg = '';
|
||||
}
|
||||
endif;
|
||||
endif;
|
||||
|
||||
if(!function_exists("jem_getStatusIcon")) {
|
||||
if ($this->settings->get('event_show_more_attendeedetails', '0')) {
|
||||
function jem_getStatusIcon($status) {
|
||||
switch($status) {
|
||||
case 2: // waiting list
|
||||
return ' <i class="fa fa-li fa-hourglass-half jem-attendance-status-fa-hourglass-half hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_ON_WAITINGLIST').'"></i>';
|
||||
break;
|
||||
case 1: // attending
|
||||
return ' <i class="fa fa-li fa-check-circle jem-attendance-status-fa-check-circle hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_ATTENDING').'"></i>';
|
||||
break;
|
||||
case 0: // invited
|
||||
return ' <i class="fa fa-li fa-question-circle jem-attendance-status-fa-question-circle hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_INVITED').'"></i>';
|
||||
break;
|
||||
case -1: // not attending
|
||||
return ' <i class="fa fa-li fa-times-circle jem-attendance-status-fa-times-circle hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_NOT_ATTENDING').'"></i>';
|
||||
break;
|
||||
default:
|
||||
return $status;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
function jem_getStatusIcon($status) {
|
||||
return ' <i class="fa fa-li fa-check-circle jem-attendance-status-fa-check-circle hasTooltip" title="'.Text::_('COM_JEM_ATTENDEES_ATTENDING').'"></i>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->registers as $k => $register) :
|
||||
if($showAttendenenames==4){
|
||||
if($this->user->id != $register->uid){
|
||||
continue;
|
||||
}
|
||||
} else if ($showAttendenenames==2) {
|
||||
if($register->status==2){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
echo '<li class="' . ($this->user->id==$register->uid? 'jem-registered-user-owner':'jem-registered-user') . '">' . jem_getStatusIcon($register->status);
|
||||
$text = '';
|
||||
$registedplaces = '';
|
||||
// is a plugin catching this ?
|
||||
if ($res = $this->dispatcher->triggerEvent('onAttendeeDisplay', array($register->uid, &$text))) :
|
||||
echo $text;
|
||||
endif;
|
||||
|
||||
//Registered user in the event
|
||||
if($register->uid == $this->user->id) {
|
||||
$this->registereduser = $k;
|
||||
}
|
||||
if($register->status==1 && $register->places>1){
|
||||
$registedplaces = ' + ' . $register->places-1 . ' '. ($register->places-1>1? Text::_('COM_JEM_BOOKED_PLACES'): Text::_('COM_JEM_BOOKED_PLACE'));
|
||||
}else if($register->status==-1 && $register->places>1){
|
||||
$registedplaces = '';
|
||||
}else if($register->status==0 && $register->places>1){
|
||||
$registedplaces = ' + ' . $register->places-1 . ' '. ($register->places-1>1? Text::_('COM_JEM_INVITED_PLACES'): Text::_('COM_JEM_INVITED_PLACE'));
|
||||
}else if($register->status==2 && $register->places>1){
|
||||
$registedplaces = ' + ' . $register->places-1 . ' '. ($register->places-1>1? Text::_('COM_JEM_WAITING_PLACES'): Text::_('COM_JEM_WAITING_PLACE'));
|
||||
}
|
||||
|
||||
// if CB
|
||||
if ($this->settings->get('event_comunsolution', '0') == 1) :
|
||||
$needle = 'index.php?option=com_comprofiler&view=userprofile';
|
||||
$menu = Factory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink = !empty($item) ? $needle . '&user=' . $register->uid . '&Itemid=' . $item->id : $needle;
|
||||
if ($this->settings->get('event_comunoption', '0') == 1) :
|
||||
// User has avatar
|
||||
if (!empty($register->avatar)) :
|
||||
if (File::exists(JPATH_ROOT . '/' . $imgpath . '/comprofiler/tn' . $register->avatar)) {
|
||||
$useravatar = HTMLHelper::image($imgpath . '/comprofiler/tn' . $register->avatar, $register->name);
|
||||
} elseif (File::exists(JPATH_ROOT . '/' . $imgpath . '/comprofiler/' . $register->avatar)) {
|
||||
$useravatar = HTMLHelper::image($imgpath . '/comprofiler/' . $register->avatar, $register->name);
|
||||
} else {
|
||||
$useravatar = empty($noimg) ? '' : HTMLHelper::image($noimg, $register->name);
|
||||
}
|
||||
echo '<a style="text-decoration: none;" href="' . Route::_($cntlink) . '" title = "' . Text::_('COM_JEM_SHOW_USER_PROFILE') . '">' . $useravatar . ' <span class="username">' . $register->name . '</span></a>' . $registedplaces;
|
||||
|
||||
// User has no avatar
|
||||
else :
|
||||
$nouseravatar = empty($noimg) ? '' : HTMLHelper::image($noimg, $register->name);
|
||||
echo '<a style="text-decoration: none;" href="' . Route::_($cntlink) . '" title = "' . Text::_('COM_JEM_SHOW_USER_PROFILE') .'">' . $nouseravatar . ' <span class="username">' . $register->name . '</span></a>'. $registedplaces;
|
||||
endif;
|
||||
else :
|
||||
// only show the username with link to profile
|
||||
echo '<span class="username"><a style="text-decoration: none;" href="' . Route::_($cntlink) . '">' . $register->name . '</a></span>' . $registedplaces;
|
||||
endif;
|
||||
// if CB end - if not CB than only name
|
||||
else :
|
||||
// no communitycomponent is set so only show the username
|
||||
echo '<span class="username">' . $register->name . '</span>' . $registedplaces;
|
||||
endif;
|
||||
|
||||
echo '</li>';
|
||||
// end loop through attendees
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->permissions->canEditAttendees) : ?>
|
||||
<dt></dt>
|
||||
<dd><a href="<?php echo $linkreg; ?>" title="<?php echo Text::_('COM_JEM_MYEVENT_MANAGEATTENDEES'); ?>"><?php echo Text::_('COM_JEM_MYEVENT_MANAGEATTENDEES') ?> <i class="icon-out-2" aria-hidden="true"></i></a></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<hr />
|
||||
|
||||
<?php if ($this->print == 0) : ?>
|
||||
<dl class="jem-dl floattext">
|
||||
<dt class="register registration hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_YOUR_REGISTRATION'); ?>"><?php echo Text::_('COM_JEM_YOUR_REGISTRATION'); ?>:</dt>
|
||||
<dd class="register registration">
|
||||
<?php
|
||||
$uri = Uri::getInstance();
|
||||
$returnUrl = $uri->toString();
|
||||
$urlLogin = Route::_($uri->root() . 'index.php?option=com_users&view=login&return='.base64_encode($returnUrl));
|
||||
|
||||
if ($this->item->published != 1) {
|
||||
echo Text::_('COM_JEM_WRONG_STATE_FOR_REGISTER');
|
||||
} elseif (!$this->showRegForm) {
|
||||
if(!$this->user->id){ ?>
|
||||
<button class="btn btn-sm btn-warning text-white px-4 py-2" style="border: none; cursor: pointer; transition: background-color 0.3s;"
|
||||
type="button" onclick="location.href='<?php echo $urlLogin; ?>'"><?php echo Text::_('COM_JEM_LOGIN_FOR_REGISTER'); ?></button>
|
||||
<?php
|
||||
}else{
|
||||
echo Text::_('COM_JEM_NOT_ALLOWED_TO_REGISTER');
|
||||
}
|
||||
} else {
|
||||
switch ($this->formhandler) {
|
||||
case 0:
|
||||
echo Text::_('COM_JEM_TOO_LATE_UNREGISTER');
|
||||
break;
|
||||
case 1:
|
||||
echo Text::_('COM_JEM_TOO_LATE_REGISTER');
|
||||
break;
|
||||
case 2:
|
||||
if ($this->item->requestanswer) { ?>
|
||||
<span class="badge rounded-pill text-light bg-secondary">
|
||||
<?php echo Text::_('COM_JEM_SEND_UNREGISTRATION');?>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
||||
<button class="btn btn-sm btn-warning text-white px-4 py-2" style="border: none; cursor: pointer; transition: background-color 0.3s;"
|
||||
type="button" onclick="location.href='<?php echo $urlLogin; ?>'"><?php echo Text::_('COM_JEM_LOGIN_FOR_REGISTER'); ?></button>
|
||||
<?php //insert Breezing Form hack here
|
||||
/*<input class="btn btn-secondary" type="button" value="<?php echo Text::_('COM_JEM_SIGNUPHERE_AS_GUEST'); ?>" onClick="window.location='/index.php?option=com_breezingforms&view=form&Itemid=6089&event=<?php echo $this->item->title; ?>&date=<?php echo $this->item->dates ?>&conemail=<?php echo $this->item->conemail ?>';"/>
|
||||
*/?>
|
||||
<?php
|
||||
break;
|
||||
case 3:
|
||||
if($this->item->reginvitedonly == 1){
|
||||
if($this->isregistered === 0){
|
||||
echo $this->loadTemplate('regform');
|
||||
} else{
|
||||
echo Text::_('COM_JEM_INVITED_USERS_ONLY') . '.<br>' . Text::_('COM_JEM_NOT_INVITED') . '.';
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
echo $this->loadTemplate('regform');
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@ -0,0 +1,354 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
// The user is not already attending -> display registration form.
|
||||
|
||||
if ($this->showRegForm && empty($this->print)) :
|
||||
|
||||
if (($this->item->maxplaces > 0) && (($this->item->booked + $this->item->reservedplaces) >= $this->item->maxplaces) && !$this->item->waitinglist && empty($this->registration->status)) :
|
||||
?>
|
||||
<?php echo Text::_( 'COM_JEM_EVENT_FULL_NOTICE' ); ?>
|
||||
|
||||
<?php else :
|
||||
|
||||
//USER
|
||||
$waitingPlacesUser = 0;
|
||||
$placesBookedUser = 0;
|
||||
$placesRegisteredUser = 0;
|
||||
$statusRegistrationUser = -1;
|
||||
$model = $this->getModel('event');
|
||||
|
||||
if ($this->item->maxbookeduser != 0) {
|
||||
$placesavailableuser = $this->item->maxbookeduser;
|
||||
if ($this->registereduser !== null) {
|
||||
$placesavailableuser = $this->item->maxbookeduser - ($this->registers[$this->registereduser]->status > 0 ? $this->registers[$this->registereduser]->places : 0);
|
||||
} else if ($this->item->waitinglist && $this->registration != null) {
|
||||
if ($this->registration->status == 2) {
|
||||
$placesavailableuser = $this->item->maxbookeduser - $this->registration->places;
|
||||
$waitingPlacesUser = $this->registration->places;
|
||||
$statusRegistrationUser = $this->registration->status;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$placesavailableuser = null;
|
||||
}
|
||||
|
||||
//EVENT
|
||||
if ($this->item->maxplaces) {
|
||||
$placesavailableevent = $this->item->maxplaces - $this->item->booked - $this->item->reservedplaces;
|
||||
if ($placesavailableuser === null) {
|
||||
$placesavailableuser = $placesavailableevent;
|
||||
}
|
||||
} else {
|
||||
$placesavailableevent = false;
|
||||
}
|
||||
if ($placesavailableevent != false) {
|
||||
if ($placesavailableuser > 0 && ($placesavailableuser > $placesavailableevent)) {
|
||||
$placesavailableuser = $placesavailableevent;
|
||||
}
|
||||
}
|
||||
|
||||
//BOOKED PLACES BY USER
|
||||
if ($this->registereduser !== null) {
|
||||
$statusRegistrationUser = $this->registers[$this->registereduser]->status;
|
||||
if ($statusRegistrationUser == 1) {
|
||||
$placesBookedUser = $this->registers[$this->registereduser]->places;
|
||||
} else {
|
||||
$placesBookedUser = 0;
|
||||
}
|
||||
$placesRegisteredUser = $this->registers[$this->registereduser]->places;
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="JEM" action="<?php echo Route::_('index.php?option=com_jem&view=event&id=' . (int)$this->item->id); ?>" name="adminForm" id="adminForm" method="post">
|
||||
<div>
|
||||
<?php
|
||||
if ($this->isregistered === false) {
|
||||
if ($this->item->requestanswer) {
|
||||
echo Text::_('COM_JEM_SEND_UNREGISTRATION');
|
||||
}
|
||||
if ($this->item->registra == 3) {
|
||||
echo Text::_('COM_JEM_NOT_INVITED');
|
||||
} else {
|
||||
echo Text::_('COM_JEM_YOU_ARE_UNREGISTERED');
|
||||
}
|
||||
} else {
|
||||
switch ($this->isregistered) :
|
||||
case -1:
|
||||
//You are NOT attending
|
||||
echo Text::_('COM_JEM_YOU_ARE_NOT_ATTENDING');
|
||||
break;
|
||||
case 0:
|
||||
//You're invited
|
||||
echo Text::_('COM_JEM_YOU_ARE_INVITED');
|
||||
break;
|
||||
case 1:
|
||||
//You're attending
|
||||
if ($this->allowAnnulation) {
|
||||
echo Text::_('COM_JEM_YOU_ARE_ATTENDING');
|
||||
} else {
|
||||
echo substr(Text::_('COM_JEM_YOU_ARE_ATTENDING'), 0,strpos(Text::_('COM_JEM_YOU_ARE_ATTENDING'), "<br>"));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
//You're on Waitinglist
|
||||
echo Text::_('COM_JEM_YOU_ARE_ON_WAITINGLIST');
|
||||
break;
|
||||
default:
|
||||
//You didn't answer!
|
||||
echo Text::_('COM_JEM_YOU_ARE_UNREGISTERED');
|
||||
break;
|
||||
endswitch;
|
||||
}
|
||||
|
||||
if ($this->item->seriesbooking) {
|
||||
// If event has 'seriesbooking' active and $checkseries is true then get all recurrence events of series from now (register or unregister)
|
||||
$events = $model->getListRecurrenceEventsbyId($this->item->id, $this->item->recurrence_first_id, time(), $this->user->id);
|
||||
if ($events) {
|
||||
// Shown the active series event list
|
||||
echo '<div class="pt-3">' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_4') . '</div>';
|
||||
echo '<div><table id="table-series"><thead><tr><th>' . Text::_('COM_JEM_DATE') . '</th><th>' . Text::_('COM_JEM_TITLE') . '</th><th>' . Text::_('COM_JEM_STATUS') . '</th><th>' . Text::_('COM_JEM_PLACES') . '</th><th>ID</th></tr></thead><tbody>';
|
||||
|
||||
foreach ($events as $e) {
|
||||
if (!$e->waiting && $e->status == 1) {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_ATTENDING');
|
||||
} else if ($e->waiting == 1 && $e->status == 1) {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_ON_WAITINGLIST');
|
||||
} else if (!$e->status){
|
||||
$status = Text::_('COM_JEM_ATTENDEES_INVITED');
|
||||
} else if ($e->status == -1) {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_NOT_ATTENDING');
|
||||
} else {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_STATUS_UNKNOWN');
|
||||
}
|
||||
echo '<tr><td nowrap>' . $e->dates . ' [' . ($e->times ? substr($e->times, 0, 5) : '') . ($e->endtimes ? '-' . substr($e->endtimes, 0, 5) : '') . ']</td><td>' . $e->title . '</td><td>' . $status . '</td><td>' . $e->places . '</td><td>' . $e->id . '</td></tr>';
|
||||
}
|
||||
echo '</tbody></table></div>';
|
||||
echo '<div> </div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist">
|
||||
<li class="jem-event" onclick="document.getElementById('jem_register_event').click();">
|
||||
<input id="jem_register_event" type="radio" name="reg_check" value="1" onclick="check(this, document.getElementById('jem_send_attend'));"
|
||||
<?php if ($this->isregistered !== false
|
||||
&& ($placesavailableevent === 0 || ($placesavailableuser === 0 && $statusRegistrationUser != 0))
|
||||
&& (!$this->item->waitinglist || ($this->item->waitinglist && ($placesBookedUser || $placesavailableuser === 0)))
|
||||
|| !$this->allowRegistration) {
|
||||
echo 'disabled="disabled"';
|
||||
} else {
|
||||
echo 'checked="checked"';
|
||||
} ?>
|
||||
/>
|
||||
<i class="fa fa-check-circle-o fa-lg jem-registerbutton" aria-hidden="true"></i>
|
||||
<?php
|
||||
|
||||
//FULL AND WAITLIST
|
||||
if ($this->item->maxplaces && (($this->item->booked + $this->item->reservedplaces) >= $this->item->maxplaces)) {
|
||||
if ($this->item->waitinglist) {
|
||||
if ($placesBookedUser) {
|
||||
$placesavailableuser = 0;
|
||||
echo Text::_('COM_JEM_EVENT_FULL_USER_REGISTERED_NO_WAITING_LIST');
|
||||
} else {
|
||||
echo Text::_('COM_JEM_EVENT_FULL_REGISTER_TO_WAITING_LIST');
|
||||
}
|
||||
} else {
|
||||
if ($placesavailableevent === 0) {
|
||||
echo Text::_('COM_JEM_NOT_AVAILABLE_PLACES_EVENT');
|
||||
$placesavailableuser = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//Option: I will attend
|
||||
if ($this->registereduser !== null) {
|
||||
if (!$placesBookedUser) {
|
||||
echo Text::_('COM_JEM_I_WILL_GO');
|
||||
}
|
||||
} else {
|
||||
echo Text::_('COM_JEM_I_WILL_GO');
|
||||
if(!$this->allowRegistration){
|
||||
echo '<span class="badge bg-warning text-light" role="alert">' . Text::_('COM_JEM_EVENT_REGISTRATION_CLOSED') . '</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// for this user no additional places
|
||||
if ($placesavailableuser === 0 || $this->registration === false) {
|
||||
echo '<span class="badge bg-warning text-light" role="alert">' . Text::_('COM_JEM_NOT_AVAILABLE_PLACES_USER') . '</span>';
|
||||
} else {
|
||||
// Booking places
|
||||
if ($this->item->maxbookeduser > 1) {
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_GO_2');
|
||||
echo ' <input id="addplaces" style="text-align: center; width:auto;" type="number" name="addplaces" '
|
||||
. 'value="' . ($placesavailableuser > 0 ? ($this->item->maxbookeduser - $placesBookedUser < $placesavailableuser ? $this->item->minbookeduser - $placesBookedUser : 1) : ($placesavailableuser ?? 1))
|
||||
. '" max="' . ($placesavailableuser > 0 ? ($this->item->maxbookeduser - $placesBookedUser < $placesavailableuser ? $this->item->maxbookeduser - $placesBookedUser : $placesavailableuser) : ($placesavailableuser ?? ''))
|
||||
. '" min="' . ($placesavailableuser > 0 ? ($placesBookedUser - $this->item->minbookeduser >= 0 ? 1 : $this->item->minbookeduser - $placesBookedUser) : 0) . '">';
|
||||
if ($this->registereduser != null) {
|
||||
//Places
|
||||
if ($placesBookedUser && $statusRegistrationUser == 1) {
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_GO_3');
|
||||
} else {
|
||||
//Place
|
||||
echo ' ' . Text::_('COM_JEM_PLACES_REG') . '.';
|
||||
}
|
||||
} else {
|
||||
//Place
|
||||
if ($this->item->maxbookeduser == $placesavailableuser) {
|
||||
echo ' ' . Text::_('COM_JEM_PLACES_REG') . '.';
|
||||
} else {
|
||||
//Places
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_GO_3');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo ' <input id="addplaces" style="text-align: center; width:auto;" type="hidden" name="addplaces" value="1">';
|
||||
}
|
||||
if ($this->item->recurrence_type){
|
||||
echo '<div class="p-3" >' . Text::_('COM_JEM_I_WILL_GO_SERIES_1') . '</div>';
|
||||
if ($this->item->seriesbooking) {
|
||||
// If event has 'seriesbooking' active and $checkseries is true then get all recurrence events of series from now (register or unregister)
|
||||
if (!$this->registereduser){
|
||||
$events = $model->getListRecurrenceEventsbyId($this->item->id, $this->item->recurrence_first_id, time());
|
||||
}else{
|
||||
$events = $model->getListRecurrenceEventsbyId($this->item->id, $this->item->recurrence_first_id, time(), $this->user->id, 1);
|
||||
}
|
||||
if($events) {
|
||||
// Shown the active series event list
|
||||
echo '<div class="px-3">' . Text::_('COM_JEM_I_WILL_GO_SERIES_4') . '</div>';
|
||||
echo '<div class="px-3"><table id="table-series"><thead><tr><th>' . Text::_('COM_JEM_DATE') . '</th><th>' . Text::_('COM_JEM_TITLE') . '</th>' . ($this->registereduser? '<th>' . Text::_('COM_JEM_STATUS') . '</th><th>' . Text::_('COM_JEM_PLACES') . '</th>':'') . '<th>ID</th></tr></thead><tbody>';
|
||||
|
||||
foreach ($events as $e) {
|
||||
if ($this->registereduser) {
|
||||
switch ($e->status) {
|
||||
case -1:
|
||||
$status = Text::_('COM_JEM_ATTENDEES_NOT_ATTENDING');
|
||||
break;
|
||||
case 0:
|
||||
$status = Text::_('COM_JEM_ATTENDEES_INVITED');
|
||||
break;
|
||||
case 1:
|
||||
if ($e->waiting) {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_ON_WAITINGLIST');
|
||||
} else {
|
||||
$status = Text::_('COM_JEM_ATTENDEES_ATTENDING');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$status = Text::_('COM_JEM_ATTENDEES_STATUS_UNKNOWN');
|
||||
break;
|
||||
}
|
||||
}
|
||||
echo '<tr><td nowrap>' . $e->dates . ' [' . ($e->times ? substr($e->times, 0, 5) : '') . ($e->endtimes ? '-' . substr($e->endtimes, 0, 5) : '') . ']</td><td>' . $e->title . '</td>' . ($this->registereduser? '<td>' . $status . '</td><td>' . $e->places . '</td>':'') .'<td>' . $e->id . '</td></tr>';
|
||||
}
|
||||
echo '</tbody></table></div>';
|
||||
|
||||
if ($this->item->singlebooking) {
|
||||
echo '<div class="px-3 pt-3"> <input id = "jem_unregister_event_series" type = "checkbox" name = "reg_check_series"> ' . Text::_('COM_JEM_I_WILL_GO_SERIES_2') . '</input ></div>';
|
||||
} else {
|
||||
echo '<div class="px-3 pt-3">' . Text::_('COM_JEM_I_WILL_GO_SERIES_3') . '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<?php if ($this->item->requestanswer || $placesRegisteredUser || $waitingPlacesUser) {?>
|
||||
<li class="jem-event" onclick="document.getElementById('jem_unregister_event').click();">
|
||||
|
||||
<?php if ($this->allowAnnulation || ($this->isregistered != 1) || $waitingPlacesUser) : ?>
|
||||
<input id="jem_unregister_event" type="radio" name="reg_check" value="-1" onclick="check(this, document.getElementById('jem_send_attend'));"
|
||||
<?php if ($this->isregistered !== false && $statusRegistrationUser>0 && $placesavailableuser==0) { echo 'checked="checked"'; } ?>
|
||||
/>
|
||||
<i class="fa fa-times-circle-o fa-lg jem-unregisterbutton" aria-hidden="true"></i>
|
||||
<?php
|
||||
//Option: I don't attend
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_NOT_GO');
|
||||
if ($this->registereduser !== null || $waitingPlacesUser) {
|
||||
if ($placesRegisteredUser || $waitingPlacesUser) {
|
||||
if ($statusRegistrationUser == 1) {
|
||||
// Booked places
|
||||
$cancelplaces = ($placesRegisteredUser - 1 > 1 ? Text::_('COM_JEM_BOOKED_PLACES') : Text::_('COM_JEM_BOOKED_PLACE'));
|
||||
} else if ($statusRegistrationUser == -1) {
|
||||
$cancelplaces = '';
|
||||
//Booked places for invited users
|
||||
} else if ($statusRegistrationUser == 0) {
|
||||
$cancelplaces = ($placesRegisteredUser - 1 > 1 ? Text::_('COM_JEM_INVITED_PLACES') : Text::_('COM_JEM_INVITED_PLACE'));
|
||||
//Booked places for waiting users
|
||||
} else if ($statusRegistrationUser == 2) {
|
||||
$cancelplaces = ($waitingPlacesUser - 1 > 1 ? Text::_('COM_JEM_WAITING_PLACES') : Text::_('COM_JEM_WAITING_PLACE'));
|
||||
}
|
||||
|
||||
//Canceling...
|
||||
echo ' ' . Text::_('COM_JEM_I_WILL_NOT_GO_2');
|
||||
echo ' <input id="cancelplaces" style="text-align: center;" type="number" name="cancelplaces" value="' . ($placesRegisteredUser ? $placesRegisteredUser : $waitingPlacesUser) . '" max="' . ($placesRegisteredUser ? $placesRegisteredUser : $waitingPlacesUser) . '" min="1">' . ' ' . $cancelplaces;
|
||||
}
|
||||
if ($this->item->recurrence_type) {
|
||||
echo '<div class="pt-3 pl-3">' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_1') . '</div>';
|
||||
if ($this->item->seriesbooking) {
|
||||
if($events) {
|
||||
if ($this->item->singlebooking) {
|
||||
echo '<div class="px-3 pt-3"> <input id = "jem_unregister_event_series" type = "checkbox" name = "reg_check_series"> ' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_2') . '</input ></div>';
|
||||
} else {
|
||||
echo '<div class="px-3">' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_3') . '</div>';
|
||||
}
|
||||
}else{
|
||||
echo '<div class="px-3">' . Text::_('COM_JEM_I_WILL_NOT_GO_SERIES_5') . '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//...booked places
|
||||
$cancelplaces = Text::_('COM_JEM_I_WILL_NOT_GO_3');
|
||||
}
|
||||
?>
|
||||
<?php else :
|
||||
//Unregistration is not possible?>
|
||||
<input type="radio" name="reg_dummy" value="" disabled="disabled" />
|
||||
<i class="fa fa-times-circle-o fa-lg jem-unregisterbutton" aria-hidden="true"></i>
|
||||
<?php echo ' ' . Text::_('COM_JEM_NOT_ALLOWED_TO_ANNULATE'); ?>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php }
|
||||
|
||||
$disabledOptions = ($placesavailableuser && !$this->allowRegistration) || (!$placesavailableuser && $this->allowRegistration && !$this->allowAnnulation) || (!$this->allowAnnulation && !$this->allowRegistration);
|
||||
|
||||
//Comment?>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) { ?>
|
||||
<li class="jem-event jem-nopointer jem-nohover">
|
||||
<p><?php echo Text::_('COM_JEM_OPTIONAL_COMMENT') . ':'; ?></p>
|
||||
<div class="jem-regcomment">
|
||||
<textarea class="inputbox" name="reg_comment" id="reg_comment" rows="3" cols="30" maxlength="255" <?php echo ($disabledOptions ? 'disabled="disabled"':'');?>><?php
|
||||
if (is_object($this->registration) && !empty($this->registration->comment)) {
|
||||
echo htmlspecialchars($this->registration->comment);
|
||||
} ?></textarea>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<input class="btn btn-sm btn-primary" type="submit" id="jem_send_attend" name="jem_send_attend"
|
||||
<?php echo ($disabledOptions? 'disabled="disabled"':'');?>
|
||||
value="<?php echo ($placesRegisteredUser ? Text::_('COM_JEM_SEND_REGISTER') : Text::_('COM_JEM_REGISTER')); ?>" />
|
||||
|
||||
<input type="hidden" name="rdid" value="<?php echo $this->item->did; ?>" />
|
||||
<input type="hidden" name="regid" value="<?php echo (is_object($this->registration) ? $this->registration->id : 0); ?>" />
|
||||
<input type="hidden" name="task" value="event.userregister"/>
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
||||
<?php
|
||||
endif; // full?
|
||||
|
||||
endif; // registra and not print
|
||||
424
templates/joomla-italia-theme/html/com_jem/venue/calendar.php
Normal file
424
templates/joomla-italia-theme/html/com_jem/venue/calendar.php
Normal file
@ -0,0 +1,424 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
?>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'task' => $this->task, 'ical_link' => $this->ical_link, 'archive_link' => $this->archive_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day.(!empty($this->locid)?('&locid='.$this->locid):''));
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="catz" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$color = '<div id="eventcontenttop" class="eventcontenttop">';
|
||||
$color .= $colorpic;
|
||||
$color .= '</div>';
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor).'">';
|
||||
} else {
|
||||
$content .= '">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton('locid='.$this->locid);
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons">
|
||||
<div class="calendarButtonsToggle">
|
||||
<div id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</div>
|
||||
<div id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons">
|
||||
<div class="calendarButtonsToggle">
|
||||
<div id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</div>
|
||||
<div id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($displayLegend == 1) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
214
templates/joomla-italia-theme/html/com_jem/venue/default.php
Normal file
214
templates/joomla-italia-theme/html/com_jem/venue/default.php
Normal file
@ -0,0 +1,214 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div id="jem" class="jem_venue<?php echo $this->pageclass_sfx . ' venue_id' . $this->venue->id; ?>" itemscope="itemscope" itemtype="https://schema.org/Place">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('id' => $this->venue->slug, 'slug' => $this->venue->slug, 'task' => $this->task, 'print_link' => $this->print_link, 'archive_link' => $this->archive_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->escape($this->params->get('show_page_heading', 1))) : ?>
|
||||
<h1 class="componentheading">
|
||||
<span itemprop="name"><?php echo $this->escape($this->params->get('page_heading')); ?></span>
|
||||
<?php
|
||||
echo JemOutput::editbutton($this->venue, $this->params, NULL, $this->permissions->canEditVenue, 'venue');
|
||||
echo JemOutput::copybutton($this->venue, $this->params, NULL, $this->permissions->canAddVenue, 'venue');
|
||||
?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->escape($this->params->get('page_heading')) != $this->escape($this->venue->title)) : ?>
|
||||
<?php if ($this->escape($this->params->get('show_page_heading', 1))) : ?>
|
||||
<h2 class="jem-venue-title">
|
||||
<?php echo $this->escape($this->venue->title);?>
|
||||
</h2>
|
||||
<?php else : ?>
|
||||
<h1 class="jem-venue-title">
|
||||
<?php echo $this->escape($this->venue->title);?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--Venue-->
|
||||
<h2 class="jem">
|
||||
<?php echo Text::_('COM_JEM_VENUE'); ?>
|
||||
</h2>
|
||||
|
||||
<?php echo JemOutput::flyer($this->venue, $this->limage, 'venue'); ?>
|
||||
|
||||
<?php if (($this->settings->get('global_show_detlinkvenue', 1)) && (!empty($this->venue->url))) : ?>
|
||||
<dl class="location">
|
||||
<dt class="venue"><?php echo Text::_('COM_JEM_WEBSITE'); ?>:</dt>
|
||||
<dd class="venue">
|
||||
<a href="<?php echo $this->venue->url; ?>" target="_blank"><?php echo $this->venue->urlclean; ?></a>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->settings->get('global_show_detailsadress', 1)) : ?>
|
||||
<dl class="location floattext" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
||||
<?php if ($this->venue->street) : ?>
|
||||
<dt class="venue_street"><?php echo Text::_('COM_JEM_STREET'); ?>:</dt>
|
||||
<dd class="venue_street" itemprop="streetAddress">
|
||||
<?php echo $this->escape($this->venue->street); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->postalCode) : ?>
|
||||
<dt class="venue_postalCode"><?php echo Text::_('COM_JEM_ZIP'); ?>:</dt>
|
||||
<dd class="venue_postalCode" itemprop="postalCode">
|
||||
<?php echo $this->escape($this->venue->postalCode); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->city) : ?>
|
||||
<dt class="venue_city"><?php echo Text::_('COM_JEM_CITY'); ?>:</dt>
|
||||
<dd class="venue_city" itemprop="addressLocality">
|
||||
<?php echo $this->escape($this->venue->city); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->state) : ?>
|
||||
<dt class="venue_state"><?php echo Text::_('COM_JEM_STATE'); ?>:</dt>
|
||||
<dd class="venue_state" itemprop="addressRegion">
|
||||
<?php echo $this->escape($this->venue->state); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->country) : ?>
|
||||
<dt class="venue_country"><?php echo Text::_('COM_JEM_COUNTRY'); ?>:</dt>
|
||||
<dd class="venue_country">
|
||||
<?php echo $this->venue->countryimg ? $this->venue->countryimg : $this->venue->country; ?>
|
||||
<meta itemprop="addressCountry" content="<?php echo $this->venue->country; ?>" />
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (isset($this->venue->published) && !empty($this->show_status)) : ?>
|
||||
<dt class="published"><?php echo Text::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="published">
|
||||
<?php switch ($this->venue->published) {
|
||||
case 1: echo Text::_('JPUBLISHED'); break;
|
||||
case 0: echo Text::_('JUNPUBLISHED'); break;
|
||||
case 2: echo Text::_('JARCHIVED'); break;
|
||||
case -2: echo Text::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->venue->{'custom'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="' . $this->escape($currentRow) . '" target="_blank">' . $this->escape($currentRow) . '</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?>"><?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ($this->settings->get('global_show_mapserv') == 1 || $this->settings->get('global_show_mapserv') == 4) {
|
||||
echo JemOutput::mapicon($this->venue, null, $this->settings);
|
||||
}
|
||||
endif; ?>
|
||||
|
||||
</dl>
|
||||
<?php if ($this->settings->get('global_show_mapserv') == 2 || $this->settings->get('global_show_mapserv') == 5) : ?>
|
||||
<div class="jem-map">
|
||||
<?php echo JemOutput::mapicon($this->venue, null, $this->settings); ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
if (isset($this->venue->published) && !empty($this->show_status)) : ?>
|
||||
<!-- PUBLISHING STATE -->
|
||||
<dl>
|
||||
<dt class="published"><?php echo Text::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="published">
|
||||
<?php switch ($this->venue->published) {
|
||||
case 1: echo Text::_('JPUBLISHED'); break;
|
||||
case 0: echo Text::_('JUNPUBLISHED'); break;
|
||||
case 2: echo Text::_('JARCHIVED'); break;
|
||||
case -2: echo Text::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->settings->get('global_show_mapserv') == 3) : ?>
|
||||
<input type="hidden" id="latitude" value="<?php echo $this->venue->latitude; ?>">
|
||||
<input type="hidden" id="longitude" value="<?php echo $this->venue->longitude; ?>">
|
||||
|
||||
<input type="hidden" id="venue" value="<?php echo $this->venue->venue; ?>">
|
||||
<input type="hidden" id="street" value="<?php echo $this->venue->street; ?>">
|
||||
<input type="hidden" id="city" value="<?php echo $this->venue->city; ?>">
|
||||
<input type="hidden" id="state" value="<?php echo $this->venue->state; ?>">
|
||||
<input type="hidden" id="postalCode" value="<?php echo $this->venue->postalCode; ?>">
|
||||
<?php echo JemOutput::mapicon($this->venue, null, $this->settings); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->settings->get('global_show_locdescription', 1) && $this->venuedescription != '' &&
|
||||
$this->venuedescription != '<br />') : ?>
|
||||
|
||||
<h2 class="description"><?php echo Text::_('COM_JEM_VENUE_DESCRIPTION'); ?></h2>
|
||||
<div class="description no_space floattext" itemprop="description">
|
||||
<?php echo $this->venuedescription; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->attachments = $this->venue->attachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
<?php if ($this->settings->get('global_show_listevents', 1)) : ?>
|
||||
<!--table-->
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm">
|
||||
<?php echo $this->loadTemplate('events_table'); ?>
|
||||
|
||||
<p>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="view" value="venue" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->venue->id; ?>" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<!--pagination-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<?php echo JemOutput::icalbutton($this->venue->id, 'venue'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--copyright-->
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tipologia-menu ps-lg-4 col-lg-3">
|
||||
<aside class="aside-list aside-sticky">
|
||||
<div class="menu-laterale">
|
||||
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
@ -0,0 +1,187 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.2.2
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2017 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function tableOrdering(order, dir, view)
|
||||
{
|
||||
var form = document.getElementById("adminForm");
|
||||
|
||||
form.filter_order.value = order;
|
||||
form.filter_order_Dir.value = dir;
|
||||
form.submit(view);
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php if ($this->settings->get('global_show_filter',1) || $this->settings->get('global_display',1)) : ?>
|
||||
<div id="jem_filter" class="floattext">
|
||||
<?php if ($this->settings->get('global_show_filter',1)) : ?>
|
||||
<div class="jem_fleft">
|
||||
<?php
|
||||
echo '<label for="filter">'.JText::_('COM_JEM_FILTER').'</label> ';
|
||||
echo $this->lists['filter'].' ';
|
||||
?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search'];?>" class="inputbox" onchange="document.adminForm.submit();" />
|
||||
<button class="buttonfilter" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button class="buttonfilter" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->settings->get('global_display',1)) : ?>
|
||||
<div class="jem_fright">
|
||||
<?php
|
||||
echo '<label for="limit">'.JText::_('COM_JEM_DISPLAY_NUM').'</label> ';
|
||||
echo $this->pagination->getLimitBox();
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="eventtable" style="width:<?php echo $this->jemsettings->tablewidth; ?>;" summary="jem">
|
||||
<colgroup>
|
||||
<?php if ($this->jemsettings->showeventimage == 1) : ?>
|
||||
<col width="<?php echo $this->jemsettings->tableeventimagewidth; ?>" class="jem_col_event_image" />
|
||||
<?php endif; ?>
|
||||
<col width="<?php echo $this->jemsettings->datewidth; ?>" class="jem_col_date" />
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<col width="<?php echo $this->jemsettings->titlewidth; ?>" class="jem_col_title" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<col width="<?php echo $this->jemsettings->locationwidth; ?>" class="jem_col_venue" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<col width="<?php echo $this->jemsettings->citywidth; ?>" class="jem_col_city" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<col width="<?php echo $this->jemsettings->statewidth; ?>" class="jem_col_state" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<col width="<?php echo $this->jemsettings->catfrowidth; ?>" class="jem_col_category" />
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<col width="<?php echo $this->jemsettings->attewidth; ?>" class="jem_col_attendees" />
|
||||
<?php endif; ?>
|
||||
</colgroup>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<?php if ($this->jemsettings->showeventimage == 1) : ?>
|
||||
<th id="jem_eventimage" class="sectiontableheader" align="left"><?php echo JText::_('COM_JEM_TABLE_EVENTIMAGE'); ?></th>
|
||||
<?php endif; ?>
|
||||
<th id="jem_date" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_DATE', 'a.dates', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<th id="jem_title" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<th id="jem_location" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_LOCATION', 'l.venue', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<th id="jem_city" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<th id="jem_state" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<th id="jem_category" class="sectiontableheader" align="left"><?php echo JHtml::_('grid.sort', 'COM_JEM_TABLE_CATEGORY', 'c.catname', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<th id="jem_attendees" class="sectiontableheader" align="center"><?php echo JText::_('COM_JEM_TABLE_ATTENDEES'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if ($this->noevents == 1) : ?>
|
||||
<tr align="center"><td colspan="20"><?php echo JText::_('COM_JEM_NO_EVENTS'); ?></td></tr>
|
||||
<?php else : ?>
|
||||
<?php $this->rows = $this->getRows(); ?>
|
||||
<?php foreach ($this->rows as $row) : ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<tr class="featured featured<?php echo $row->id.$this->params->get('pageclass_sfx'); ?>" itemprop="event" itemscope="itemscope" itemtype="https://schema.org/Event" >
|
||||
<?php else : ?>
|
||||
<tr class="sectiontableentry<?php echo ($row->odd +1) . $this->params->get('pageclass_sfx'); ?>" itemprop="event" itemscope="itemscope" itemtype="https://schema.org/Event" >
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showeventimage == 1) : ?>
|
||||
<td headers="jem_eventimage" align="left" valign="top">
|
||||
<?php
|
||||
if (!empty($row->datimage)) :
|
||||
$dimage = JemImage::flyercreator($row->datimage, 'event');
|
||||
echo JemOutput::flyer($row, $dimage, 'event');
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<td headers="jem_date" align="left">
|
||||
<?php
|
||||
echo JemOutput::formatShortDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes, $this->jemsettings->showtime);
|
||||
echo JemOutput::formatSchemaOrgDateTime($row->dates, $row->times,
|
||||
$row->enddates, $row->endtimes);
|
||||
?>
|
||||
</td>
|
||||
|
||||
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 1)) : ?>
|
||||
<td headers="jem_title" align="left" valign="top">
|
||||
<a href="<?php echo JRoute::_(JemHelperRoute::getEventRoute($row->slug)); ?>" itemprop="url">
|
||||
<span itemprop="name"><?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row); ?></span>
|
||||
</a><?php echo JemOutput::publishstateicon($row); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 0)) : ?>
|
||||
<td headers="jem_title" align="left" valign="top" itemprop="name">
|
||||
<?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<td headers="jem_location" align="left" valign="top">
|
||||
<?php
|
||||
if ($this->jemsettings->showlinkvenue == 1) :
|
||||
echo !empty($row->locid) ? "<a href='".JRoute::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>" : '-';
|
||||
else :
|
||||
echo !empty($row->locid) ? $this->escape($row->venue) : '-';
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<td headers="jem_city" align="left" valign="top">
|
||||
<?php echo !empty($row->city) ? $this->escape($row->city) : '-'; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<td headers="jem_state" align="left" valign="top">
|
||||
<?php echo !empty($row->state) ? $this->escape($row->state) : '-'; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<td headers="jem_category" align="left" valign="top">
|
||||
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->jemsettings->showatte == 1) : ?>
|
||||
<td headers="jem_attendees" align="left" valign="top">
|
||||
<?php echo !empty($row->regCount) ? $this->escape($row->regCount) : '-'; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table></div>
|
||||
@ -0,0 +1,426 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'task' => $this->task, 'ical_link' => $this->ical_link, 'archive_link' => $this->archive_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day.(!empty($this->locid)?('&locid='.$this->locid):''));
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="catz" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$color = '<div id="eventcontenttop" class="eventcontenttop">';
|
||||
$color .= $colorpic;
|
||||
$color .= '</div>';
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor);
|
||||
$content .= '" onclick="location.href=\''.$detaillink.'\'">';
|
||||
} else {
|
||||
$content .= '" onclick="location.href=\''.$detaillink.'\'">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton('locid='.$this->locid);
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
|
||||
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start"">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<div class="calendarButtonsToggle">
|
||||
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
if ($displayLegend == 1) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,244 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div id="jem" class="jem_venue<?php echo $this->pageclass_sfx . ' venue_id' . $this->venue->id; ?>" itemscope="itemscope" itemtype="https://schema.org/Place">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('id' => $this->venue->slug, 'slug' => $this->venue->slug, 'task' => $this->task, 'print_link' => $this->print_link, 'archive_link' => $this->archive_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->escape($this->params->get('show_page_heading', 1))) : ?>
|
||||
<h1 class="componentheading">
|
||||
<span itemprop="name"><?php echo $this->escape($this->params->get('page_heading')); ?></span>
|
||||
<?php echo JemOutput::editbutton($this->venue, $this->params, NULL, $this->permissions->canEditVenue, 'venue'); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->escape($this->params->get('page_heading')) != $this->escape($this->venue->title)) : ?>
|
||||
<?php if ($this->escape($this->params->get('show_page_heading', 1))) : ?>
|
||||
<h2 class="jem-venue-title">
|
||||
<?php echo $this->escape($this->venue->title);?>
|
||||
</h2>
|
||||
<?php else : ?>
|
||||
<h1 class="jem-venue-title">
|
||||
<?php echo $this->escape($this->venue->title);?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--Venue-->
|
||||
<h2 class="jem">
|
||||
<?php /*
|
||||
echo Text::_('COM_JEM_VENUE');
|
||||
echo JemOutput::editbutton($this->venue, $this->params, NULL, $this->permissions->canEditVenue, 'venue');
|
||||
echo JemOutput::copybutton($this->venue, $this->params, NULL, $this->permissions->canAddVenue, 'venue');
|
||||
*/?>
|
||||
</h2>
|
||||
<div class="jem-row">
|
||||
<div class="jem-info">
|
||||
<?php if ($this->settings->get('global_show_detailsadress',1)) : ?>
|
||||
<dl class="jem-dl" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
||||
<dt class="title hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_TITLE'); ?>"><?php echo Text::_('COM_JEM_TITLE').':'; ?></dt>
|
||||
<dd class="title">
|
||||
<?php echo $this->venue->title;?>
|
||||
</dd>
|
||||
|
||||
<?php if (($this->settings->get('global_show_detlinkvenue', 1)) && (!empty($this->venue->url))) : ?>
|
||||
<dt class="venue hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_WEBSITE'); ?>"><?php echo Text::_('COM_JEM_WEBSITE'); ?>:</dt>
|
||||
<dd class="venue">
|
||||
<a href="<?php echo $this->venue->url; ?>" target="_blank"><?php echo $this->venue->urlclean; ?></a>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->street) : ?>
|
||||
<dt class="venue_street hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_STREET'); ?>"><?php echo Text::_('COM_JEM_STREET'); ?>:</dt>
|
||||
<dd class="venue_street" itemprop="streetAddress">
|
||||
<?php echo $this->escape($this->venue->street); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->postalCode) : ?>
|
||||
<dt class="venue_postalCode hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_ZIP'); ?>"><?php echo Text::_('COM_JEM_ZIP'); ?>:</dt>
|
||||
<dd class="venue_postalCode" itemprop="postalCode">
|
||||
<?php echo $this->escape($this->venue->postalCode); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->city) : ?>
|
||||
<dt class="venue_city hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_CITY'); ?>"><?php echo Text::_('COM_JEM_CITY'); ?>:</dt>
|
||||
<dd class="venue_city" itemprop="addressLocality">
|
||||
<?php echo $this->escape($this->venue->city); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->state) : ?>
|
||||
<dt class="venue_state hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_STATE'); ?>"><?php echo Text::_('COM_JEM_STATE'); ?>:</dt>
|
||||
<dd class="venue_state" itemprop="addressRegion">
|
||||
<?php echo $this->escape($this->venue->state); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->venue->country) : ?>
|
||||
<dt class="venue_country hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_COUNTRY'); ?>"><?php echo Text::_('COM_JEM_COUNTRY'); ?>:</dt>
|
||||
<dd class="venue_country">
|
||||
<?php echo $this->venue->countryimg ? $this->venue->countryimg : $this->venue->country; ?>
|
||||
<meta itemprop="addressCountry" content="<?php echo $this->venue->country; ?>" />
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (isset($this->venue->published) && !empty($this->show_status)) : ?>
|
||||
<dt class="published hasTooltip" data-original-title="<?php echo Text::_('JSTATUS'); ?>"><?php echo Text::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="published">
|
||||
<?php switch ($this->venue->published) {
|
||||
case 1: echo Text::_('JPUBLISHED'); break;
|
||||
case 0: echo Text::_('JUNPUBLISHED'); break;
|
||||
case 2: echo Text::_('JARCHIVED'); break;
|
||||
case -2: echo Text::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->venue->{'custom'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="' . $this->escape($currentRow) . '" target="_blank">' . $this->escape($currentRow) . '</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?> hasTooltip" data-original-title="<?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>"><?php echo Text::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($this->settings->get('global_show_mapserv') == 1 || $this->settings->get('global_show_mapserv') == 4) {
|
||||
echo JemOutput::mapicon($this->venue, null, $this->settings);
|
||||
}
|
||||
?>
|
||||
</dl>
|
||||
<?php
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
.jem-img {
|
||||
flex-basis: <?php echo $this->jemsettings->imagewidth; ?>px;
|
||||
}
|
||||
</style>
|
||||
<div class="jem-img">
|
||||
<?php echo JemOutput::flyer($this->venue, $this->limage, 'venue'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php elseif (isset($this->venue->published) && !empty($this->show_status)) : ?>
|
||||
<!-- PUBLISHING STATE -->
|
||||
<dl>
|
||||
<dt class="published hasTooltip" data-original-title="<?php echo Text::_('JSTATUS'); ?>"><?php echo Text::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="published">
|
||||
<?php switch ($this->venue->published) {
|
||||
case 1: echo Text::_('JPUBLISHED'); break;
|
||||
case 0: echo Text::_('JUNPUBLISHED'); break;
|
||||
case 2: echo Text::_('JARCHIVED'); break;
|
||||
case -2: echo Text::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$global_show_mapserv = $this->settings->get('global_show_mapserv');
|
||||
if ($global_show_mapserv == 2 || $global_show_mapserv == 3 || $global_show_mapserv == 5) : ?>
|
||||
<div class="jem-map">
|
||||
<?php if ($global_show_mapserv == 2 || $global_show_mapserv == 5) : ?>
|
||||
<div class="jem-map">
|
||||
<?php echo JemOutput::mapicon($this->venue, null, $this->settings); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($global_show_mapserv == 3) : ?>
|
||||
<input type="hidden" id="latitude" value="<?php echo $this->venue->latitude; ?>">
|
||||
<input type="hidden" id="longitude" value="<?php echo $this->venue->longitude; ?>">
|
||||
|
||||
<input type="hidden" id="venue" value="<?php echo $this->venue->venue; ?>">
|
||||
<input type="hidden" id="street" value="<?php echo $this->venue->street; ?>">
|
||||
<input type="hidden" id="city" value="<?php echo $this->venue->city; ?>">
|
||||
<input type="hidden" id="state" value="<?php echo $this->venue->state; ?>">
|
||||
<input type="hidden" id="postalCode" value="<?php echo $this->venue->postalCode; ?>">
|
||||
<?php echo JemOutput::mapicon($this->venue, null, $this->settings); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->settings->get('global_show_locdescription', 1) && $this->venuedescription != '' &&
|
||||
$this->venuedescription != '<br />') : ?>
|
||||
|
||||
<h2 class="description"><?php echo Text::_('COM_JEM_VENUE_DESCRIPTION'); ?></h2>
|
||||
<div class="description no_space floattext" itemprop="description">
|
||||
<?php echo $this->venuedescription; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->attachments = $this->venue->attachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
<?php if ($this->settings->get('global_show_listevents', 1)) : ?>
|
||||
<!--table-->
|
||||
<h2 class="jem">
|
||||
<?php echo Text::_('COM_JEM_EVENTS'); ?>
|
||||
</h2>
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm">
|
||||
<?php echo $this->loadTemplate('events_table'); ?>
|
||||
|
||||
<p>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="view" value="venue" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->venue->id; ?>" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<!--pagination-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<?php echo JemOutput::icalbutton($this->venue->id, 'venue'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--copyright-->
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tipologia-menu ps-lg-4 col-lg-3">
|
||||
<aside class="aside-list aside-sticky">
|
||||
<div class="menu-laterale">
|
||||
<?= JHtml::_('content.prepare', '{loadposition right}'); ?>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
@ -0,0 +1,186 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.0
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2020 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
*
|
||||
* @todo add check if CB does exists and if so perform action
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$linkreg = 'index.php?option=com_jem&view=attendees&id='.$this->item->id.($this->itemid ? '&Itemid='.$this->itemid : '');
|
||||
?>
|
||||
|
||||
<div class="register">
|
||||
<dl class="jem-dl floattext">
|
||||
<?php $maxplaces = (int)$this->item->maxplaces; ?>
|
||||
<?php $booked = (int)$this->item->booked; ?>
|
||||
<?php if ($maxplaces > 0) : ?>
|
||||
<dt class="register max-places hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_MAX_PLACES'); ?>"><?php echo JText::_('COM_JEM_MAX_PLACES'); ?>:</dt>
|
||||
<dd class="register max-places"><?php echo $maxplaces; ?></dd>
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
<?php if (($maxplaces > 0) || ($booked > 0)) : ?>
|
||||
<dt class="register booked-places hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_BOOKED_PLACES'); ?>"><?php echo JText::_('COM_JEM_BOOKED_PLACES'); ?>:</dt>
|
||||
<dd class="register booked-places">
|
||||
<?php if (empty($this->permissions->canEditAttendees)) : ?>
|
||||
<?php echo $booked; ?>
|
||||
<?php else : ?>
|
||||
<a href="<?php echo $linkreg; ?>" title="<?php echo JText::_('COM_JEM_MYEVENT_MANAGEATTENDEES'); ?>"><?php echo $this->item->booked; ?> <i class="fa fa-external-link" aria-hidden="true"></i></a>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
<?php if ($maxplaces > 0) : ?>
|
||||
<dt class="register available-places hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_AVAILABLE_PLACES'); ?>"><?php echo JText::_('COM_JEM_AVAILABLE_PLACES'); ?>:</dt>
|
||||
<dd class="register available-places"><?php echo ($maxplaces - $booked); ?></dd>
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
<?php
|
||||
// only set style info if users already have registered and user is allowed to see it
|
||||
if ($this->registers) :
|
||||
?>
|
||||
<dt class="register registered-users hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_REGISTERED_USERS'); ?>"><?php echo JText::_('COM_JEM_REGISTERED_USERS'); ?>:</dt>
|
||||
<dd class="register registered-users">
|
||||
<ul class="fa-ul jem-registered-list">
|
||||
<?php
|
||||
if ($this->settings->get('event_comunsolution', '0') == 1) :
|
||||
if ($this->settings->get('event_comunoption', '0') == 1) :
|
||||
//$cparams = JComponentHelper::getParams('com_media');
|
||||
//$imgpath = $cparams->get('image_path'); // mostly 'images'
|
||||
$imgpath = 'images'; // CB does NOT respect path set in Media Manager, so we have to ignore this too
|
||||
if (JFile::exists(JPATH_ROOT . '/components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png')) {
|
||||
$noimg = 'components/com_comprofiler/plugin/templates/default/images/avatar/tnnophoto_n.png';
|
||||
} elseif (JFile::exists(JPATH_ROOT . '/components/com_comprofiler/images/english/tnnophoto.jpg')) {
|
||||
$noimg = 'components/com_comprofiler/images/english/tnnophoto.jpg';
|
||||
} else {
|
||||
$noimg = '';
|
||||
}
|
||||
endif;
|
||||
endif;
|
||||
|
||||
if(!function_exists("jem_getStatusIcon")) {
|
||||
if ($this->settings->get('event_show_more_attendeedetails', '0')) {
|
||||
function jem_getStatusIcon($status) {
|
||||
switch($status) {
|
||||
case 2: // waiting list
|
||||
return ' <i class="fa fa-li fa-hourglass-half jem-attendance-status-fa-hourglass-half hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_ON_WAITINGLIST').'"></i>';
|
||||
break;
|
||||
case 1: // attending
|
||||
return ' <i class="fa fa-li fa-check-circle jem-attendance-status-fa-check-circle hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_ATTENDING').'"></i>';
|
||||
break;
|
||||
case 0: // invited
|
||||
return ' <i class="fa fa-li fa-question-circle jem-attendance-status-fa-question-circle hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_INVITED').'"></i>';
|
||||
break;
|
||||
case -1: // not attending
|
||||
return ' <i class="fa fa-li fa-times-circle jem-attendance-status-fa-times-circle hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_NOT_ATTENDING').'"></i>';
|
||||
break;
|
||||
default:
|
||||
return $status;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
function jem_getStatusIcon($status) {
|
||||
return ' <i class="fa fa-li fa-check-circle jem-attendance-status-fa-check-circle hasTooltip" title="'.JText::_('COM_JEM_ATTENDEES_ATTENDING').'"></i>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// loop through attendees
|
||||
$registers_array = array();
|
||||
if ($this->settings->get('event_show_more_attendeedetails', '0')) { // Show attendees, on waitinglist, invited and not attending.
|
||||
$registers_array = array_merge($this->regs['attending'], $this->regs['waiting'], $this->regs['invited'], $this->regs['not_attending']);
|
||||
} else {
|
||||
$registers_array = $this->registers;
|
||||
}
|
||||
foreach ($registers_array as $register) :
|
||||
echo '<li class="jem-registered-user">' . jem_getStatusIcon($register->status);
|
||||
$text = '';
|
||||
// is a plugin catching this ?
|
||||
if ($res = $this->dispatcher->trigger('onAttendeeDisplay', array($register->uid, &$text))) :
|
||||
echo $text;
|
||||
endif;
|
||||
// if CB
|
||||
if ($this->settings->get('event_comunsolution', '0') == 1) :
|
||||
if ($this->settings->get('event_comunoption', '0') == 1) :
|
||||
// User has avatar
|
||||
if (!empty($register->avatar)) :
|
||||
if (JFile::exists(JPATH_ROOT . '/' . $imgpath . '/comprofiler/tn' . $register->avatar)) {
|
||||
$useravatar = JHtml::image($imgpath . '/comprofiler/tn' . $register->avatar, $register->name);
|
||||
} elseif (JFile::exists(JPATH_ROOT . '/' . $imgpath . '/comprofiler/' . $register->avatar)) {
|
||||
$useravatar = JHtml::image($imgpath . '/comprofiler/' . $register->avatar, $register->name);
|
||||
} else {
|
||||
$useravatar = empty($noimg) ? '' : JHtml::image($noimg, $register->name);
|
||||
}
|
||||
echo '<a href="' . JRoute::_('index.php?option=com_comprofiler&task=userProfile&user=' . $register->uid) . '" title = "' . JText::_('COM_JEM_SHOW_USER_PROFILE') . '">' . $useravatar . ' <span class="username">' . $register->name . '</span></a>';
|
||||
|
||||
// User has no avatar
|
||||
else :
|
||||
$nouseravatar = empty($noimg) ? '' : JHtml::image($noimg, $register->name);
|
||||
echo '<a href="' . JRoute::_('index.php?option=com_comprofiler&task=userProfile&user=' . $register->uid) . '" title = "' . JText::_('COM_JEM_SHOW_USER_PROFILE') .'">' . $nouseravatar . ' <span class="username">' . $register->name . '</span></a>';
|
||||
endif;
|
||||
else :
|
||||
// only show the username with link to profile
|
||||
echo '<span class="username"><a href="' . JRoute::_('index.php?option=com_comprofiler&task=userProfile&user=' . $register->uid) . '">' . $register->name . '</a></span>';
|
||||
endif;
|
||||
// if CB end - if not CB than only name
|
||||
else :
|
||||
// no communitycomponent is set so only show the username
|
||||
echo '<span class="username">' . $register->name . '</span>';
|
||||
endif;
|
||||
|
||||
echo '</li>';
|
||||
// end loop through attendees
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<?php if ($this->print == 0) : ?>
|
||||
<dl class="jem-dl floattext">
|
||||
<dt class="register registration hasTooltip" data-original-title="<?php echo JText::_('COM_JEM_YOUR_REGISTRATION'); ?>"><?php echo JText::_('COM_JEM_YOUR_REGISTRATION'); ?>:</dt>
|
||||
<dd class="register registration">
|
||||
<?php
|
||||
if ($this->item->published != 1) {
|
||||
echo JText::_('COM_JEM_WRONG_STATE_FOR_REGISTER');
|
||||
} elseif (!$this->showRegForm) {
|
||||
echo JText::_('COM_JEM_NOT_ALLOWED_TO_REGISTER');
|
||||
} else {
|
||||
switch ($this->formhandler) {
|
||||
case 0:
|
||||
echo JText::_('COM_JEM_TOO_LATE_UNREGISTER');
|
||||
break;
|
||||
case 1:
|
||||
echo JText::_('COM_JEM_TOO_LATE_REGISTER');
|
||||
break;
|
||||
case 2:
|
||||
|
||||
// insert Breezing Form hack here
|
||||
|
||||
//echo JText::_('COM_JEM_LOGIN_FOR_REGISTER'); ?>
|
||||
|
||||
<input class="btn btn-primary btn-sm" type="button" value="<?php echo JText::_('COM_JEM_LOGIN_FOR_REGISTER'); ?>" onClick="window.location='/index.php?option=com_comprofiler&view=login&Itemid=4812';"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<br /><br />
|
||||
|
||||
<input class="btn btn-success btn-sm" type="button" value="<?php echo JText::_('COM_JEM_SIGNUPHERE_AS_GUEST'); ?>" onClick="window.location='/index.php?option=com_breezingforms&view=form&Itemid=3475&event=<?php echo $this->item->title; ?>&date=<?php echo $this->item->dates ?>&conemail=<?php echo $this->item->conemail ?>';"/>
|
||||
<?php
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
echo $this->loadTemplate('regform');
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user