primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,278 @@
<?php
/**
* @version 2.3.6
* @package JEM
* @copyright (C) 2013-2021 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>
<script type="text/javascript">
function fullOrdering(id, view)
{
var form = document.getElementById("adminForm");
var field = form.getElementById(id);
var parts = field.value.split(' ');
if (parts.length > 1) {
form.filter_order.value = parts[0];
form.filter_order_Dir.value = parts[1];
}
form.submit(view);
}
</script>
<?php
$sort_by = array();
$sort_by[] = JHtml::_('select.option', 'a.dates ASC', JText::_('COM_JEM_DATE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
$sort_by[] = JHtml::_('select.option', 'a.dates DESC', JText::_('COM_JEM_DATE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
if ($this->jemsettings->showtitle == 1) {
$sort_by[] = JHtml::_('select.option', 'a.title ASC', JText::_('COM_JEM_TITLE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
$sort_by[] = JHtml::_('select.option', 'a.title DESC', JText::_('COM_JEM_TITLE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
}
if ($this->jemsettings->showlocate == 1) {
$sort_by[] = JHtml::_('select.option', 'l.venue ASC', JText::_('COM_JEM_VENUE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
$sort_by[] = JHtml::_('select.option', 'l.venue DESC', JText::_('COM_JEM_VENUE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
}
if ($this->jemsettings->showcity == 1) {
$sort_by[] = JHtml::_('select.option', 'l.city ASC', JText::_('COM_JEM_CITY') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
$sort_by[] = JHtml::_('select.option', 'l.city DESC', JText::_('COM_JEM_CITY') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
}
if ($this->jemsettings->showstate == 1) {
$sort_by[] = JHtml::_('select.option', 'l.state ASC', JText::_('COM_JEM_STATE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
$sort_by[] = JHtml::_('select.option', 'l.state DESC', JText::_('COM_JEM_STATE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
}
if ($this->jemsettings->showcat == 1) {
$sort_by[] = JHtml::_('select.option', 'c.catname ASC', JText::_('COM_JEM_CATEGORY') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
$sort_by[] = JHtml::_('select.option', 'c.catname DESC', JText::_('COM_JEM_CATEGORY') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
}
$this->lists['sort_by'] = JHtml::_('select.genericlist', $sort_by, 'sort_by', array('size'=>'1','class'=>'inputbox','onchange'=>'fullOrdering(\'sort_by\', \'\');'), 'value', 'text', $this->lists['order'] . ' ' . $this->lists['order_Dir']);
?>
<div id="jem_filter" class="floattext">
<div class="jem_fleft">
<div class="row-fluid">
<div class="span2">
<label for="filter_type"><?php echo JText::_('COM_JEM_FILTER'); ?></label>
</div>
<div class="span10">
<?php echo $this->lists['filter_types']; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['filter'];?>" class="inputbox" onchange="document.getElementById('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>
</div>
<div class="row-fluid">
<div class="span2">
<label for="category"><?php echo JText::_('COM_JEM_CATEGORY'); ?></label>
</div>
<div class="span10">
<?php echo $this->lists['categories']; ?>
</div>
</div>
<div class="row-fluid">
<div class="span2">
<label for="date"><?php echo JText::_('COM_JEM_SEARCH_DATE'); ?></label>
</div>
<div class="span10">
<div class="nowrap"><?php echo JText::_('COM_JEM_SEARCH_FROM') .'&nbsp;'. $this->lists['date_from'];?></div>
<div class="nowrap"><?php echo JText::_('COM_JEM_SEARCH_TO'); ?><?php echo $this->lists['date_to'];?></div>
</div>
</div>
<div class="row-fluid">
<div class="span2">
<label for="continent"><?php echo ''.JText::_('COM_JEM_CONTINENT'); ?></label>
</div>
<div class="span10">
<?php echo $this->lists['continents'];?>
</div>
</div>
<?php if ($this->filter_continent): ?>
<div class="row-fluid">
<div class="span2">
<label for="country"><?php echo ''.JText::_('COM_JEM_COUNTRY'); ?></label>
</div>
<div class="span10">
<?php echo $this->lists['countries'];?>
</div>
</div>
<?php endif; ?>
<?php if ($this->filter_continent && $this->filter_country): ?>
<div class="row-fluid">
<div class="span2">
<label for="city"><?php echo ''.JText::_('COM_JEM_CITY');?></label>
</div>
<div class="span10">
<?php echo $this->lists['cities'];?>
</div>
</div>
<?php endif; ?>
<div class="row-fluid">
<div class="offset2 span10">
<input class="buttonfilter" type="submit" value="<?php echo JText::_('COM_JEM_SEARCH_SUBMIT'); ?>"/>
</div>
</div>
</div>
<?php if ($this->settings->get('global_display',1)) : ?>
<div class="jem_fright">
<label for="sort_by"><?php echo JText::_('COM_JEM_ORDERING'); ?></label>
<?php echo $this->lists['sort_by'].' '; ?>
<label for="limit"><?php echo JText::_('COM_JEM_DISPLAY_NUM'); ?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
</div>
<?php
// calculate span of columns to show, summary must be 12
$default_span = array('date' => 3, 'title' => 3, 'venue' => 3, 'category' => 3);
$a_span = array('date' => $default_span['date']); // always shown
if ($this->jemsettings->showtitle == 1) {
$a_span['title'] = $default_span['title'];
}
if (($this->jemsettings->showlocate == 1) || ($this->jemsettings->showcity == 1) || ($this->jemsettings->showstate == 1)) {
$a_span['venue'] = $default_span['venue'];
}
if ($this->jemsettings->showcat == 1) {
$a_span['category'] = $default_span['category'];
}
$total = array_sum($a_span);
if (!array_key_exists('title', $a_span) && !array_key_exists('venue', $a_span) && !array_key_exists('category', $a_span)) {
$a_span['date'] += 12 - $total;
} else {
while ($total < 12) {
if (array_key_exists('title', $a_span)) {
++$a_span['title'];
++$total;
}
if ($total < 12 && ($a_span['date'] <= $default_span['date'])) {
++$a_span['date'];
++$total;
}
if (($total < 12) && array_key_exists('venue', $a_span)) {
++$a_span['venue'];
++$total;
}
if (($total < 12) && array_key_exists('category', $a_span)) {
++$a_span['category'];
++$total;
}
} // while
}
?>
<div class="eventtable">
<div class="row-fluid sectiontableheader">
<div class="span<?php echo $a_span['date']; ?>"><?php echo JText::_('COM_JEM_TABLE_DATE'); ?></div>
<?php if (array_key_exists('title', $a_span)) : ?>
<div class="span<?php echo $a_span['title']; ?>"><?php echo JText::_('COM_JEM_TABLE_TITLE'); ?></div>
<?php endif; ?>
<?php if (array_key_exists('venue', $a_span)) : ?>
<div class="span<?php echo $a_span['venue']; ?>"><?php echo JText::_('COM_JEM_TABLE_LOCATION'); ?></div>
<?php endif; ?>
<?php if (array_key_exists('category', $a_span)) : ?>
<div class="span<?php echo $a_span['category']; ?>"><?php echo JText::_('COM_JEM_TABLE_CATEGORY'); ?></div>
<?php endif; ?>
</div>
<?php if (empty($this->rows)) : ?>
<div class="row-fluid sectiontableentry<?php echo $this->params->get('pageclass_sfx'); ?>">
<div class="span12">
<strong><i><?php echo JText::_('COM_JEM_NO_EVENTS_FOUND'); ?></i></strong>
</div>
</div>
<?php else : ?>
<?php foreach ($this->rows as $row) : ?>
<?php if (!empty($row->featured)) : ?>
<div class="row-fluid sectiontableentry featured featured<?php echo $row->id.$this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
<?php else : ?>
<div class="row-fluid sectiontableentry<?php echo $this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
<?php endif; ?>
<div class="span<?php echo $a_span['date']; ?> date">
<?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);
?>
</div>
<?php if (array_key_exists('title', $a_span)) : ?>
<div class="span<?php echo $a_span['title']; ?>">
<?php if (($this->jemsettings->showeventimage == 1) && !empty($row->datimage)) : ?>
<div class="image">
<?php echo JemOutput::flyer($row, JemImage::flyercreator($row->datimage, 'event'), 'event'); ?>
</div>
<?php endif; ?>
<?php if ($this->jemsettings->showdetails == 1) : ?>
<div class="event">
<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); ?>
</div>
<?php else : ?>
<div class="event" itemprop="name">
<?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if (array_key_exists('venue', $a_span)) : ?>
<div class="span<?php echo $a_span['venue']; ?> venue">
<?php
$venue = array();
if ($this->jemsettings->showlocate == 1) {
if (!empty($row->venue)) {
if (($this->jemsettings->showlinkvenue == 1) && !empty($row->venueslug)) {
$venue[] = "<a href='".JRoute::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>";
} else {
$venue[] = $this->escape($row->venue);
}
} else {
$venue[] = '-';
}
}
// if no city skip if also no state, else add hyphen
if (($this->jemsettings->showcity == 1) && (!empty($row->city) || !empty($row->state))) {
$venue[] = !empty($row->city) ? $this->escape($row->city) : '-';
}
if (($this->jemsettings->showstate == 1) && !empty($row->state)) {
$venue[] = $this->escape($row->state);
}
echo implode(', ', $venue);
?>
</div>
<?php endif; ?>
<?php if (array_key_exists('category', $a_span)) : ?>
<div class="span<?php echo $a_span['category']; ?> category">
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; /* noevents */ ?>
</div>

View File

@ -0,0 +1,53 @@
<?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;
?>
<div id="jem" class="jem_search<?php echo $this->pageclass_sfx;?>">
<?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>
<?php if ($this->params->get('showintrotext')) : ?>
<div class="description no_space floattext">
<?php echo $this->params->get('introtext'); ?>
</div>
<?php endif; ?>
<!--table-->
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
<?php
if ($this->params->get('template_suffix')) {
echo $this->loadTemplate('table_'. $this->params->get('template_suffix'));
} else {
echo $this->loadTemplate('table');
}
?>
<p>
<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="task" value="<?php echo $this->task; ?>" />
<input type="hidden" name="view" value="search" />
</p>
</form>
<!--footer-->
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<div class="copyright">
<?php echo JemOutput::footer( ); ?>
</div>
</div>

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_JEM_SEARCH_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_JEM_SEARCH_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic"
addfieldpath="/administrator/components/com_jem/models/fields"
>
<field name="introtext" type="textarea"
filter="safehtml"
default=""
label="COM_JEM_INTROTEXT_FIELD"
rows="8"
cols="30"
description="COM_JEM_INTROTEXT_FIELD_DESC"
/>
<field name="showintrotext" type="radio"
default="0"
label="COM_JEM_DISPLAY_INTROTEXT"
description="COM_JEM_DISPLAY_INTROTEXT_DESC"
class="btn-group btn-group-yesno"
>
<option value="1">COM_JEM_SHOW</option>
<option value="0">COM_JEM_HIDE</option>
</field>
<field type="spacer" name="myspacer2" hr="true" />
<field name="top_category" type="categories"
default="0"
label="COM_JEM_SELECT_TOP_CATEGORY"
description="COM_JEM_SELECT_TOP_CATEGORY_DESC"
/>
<field name="date_filter_type" type="list"
default="0"
label="COM_JEM_DATE_FILTER_TYPE"
description="COM_JEM_DATE_FILTER_TYPE_DESC"
>
<option value="0">COM_JEM_EVENT_START_DATE</option>
<option value="1">COM_JEM_ALL_EVENT_DATES</option>
</field>
<field name="template_suffix" type="text"
default=""
label="COM_JEM_SEARCH_TABLE_LAYOUT_SUFFIX"
description="COM_JEM_SEARCH_TABLE_LAYOUT_SUFFIX_DESC"
/>
</fieldset>
</fields>
</metadata>

View File

@ -0,0 +1,215 @@
<?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;
?>
<script>
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>
<div id="jem_filter" class="floattext">
<div class="jem_fleft">
<table>
<tr>
<td>
<label for="filter_type"><?php echo Text::_('COM_JEM_FILTER'); ?></label>
</td>
<td>
<?php echo $this->lists['filter_types']; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['filter'];?>" class="inputbox" onchange="document.getElementById('adminForm').submit();" />
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="btn btn-secondary" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
</td>
</tr>
<tr>
<td>
<?php echo '<label for="category">'.Text::_('COM_JEM_CATEGORY').'</label>&nbsp;'; ?>
</td>
<td>
<?php echo $this->lists['categories']; ?>
</td>
</tr>
<tr>
<td>
<?php echo '<label for="date">'.Text::_('COM_JEM_SEARCH_DATE').'</label>&nbsp;'; ?>
</td>
<td>
<div class="nowrap"><?php echo text::_('COM_JEM_SEARCH_FROM'); ?><?php echo $this->lists['date_from'];?></div>
<div class="nowrap"><?php echo text::_('COM_JEM_SEARCH_TO'); ?><?php echo $this->lists['date_to'];?></div>
</td>
</tr>
<tr>
<td>
<?php echo '<label for="continent">'.Text::_('COM_JEM_CONTINENT').'</label>&nbsp;'; ?>
</td>
<td>
<?php echo $this->lists['continents'];?>
</td>
</tr>
<?php if ($this->filter_continent): ?>
<tr>
<td>
<?php echo '<label for="country">'.Text::_('COM_JEM_COUNTRY').'</label>&nbsp;'; ?>
</td>
<td>
<?php echo $this->lists['countries'];?>
</td>
</tr>
<?php endif; ?>
<?php if ($this->filter_continent && $this->filter_country): ?>
<tr>
<td>
<?php echo '<label for="city">'.Text::_('COM_JEM_CITY').'</label>&nbsp;';?>
</td>
<td>
<?php echo $this->lists['cities'];?>
</td>
</tr>
<?php endif; ?>
<tr>
<td colspan="2">
<input class="btn btn-primary" type="submit" value="<?php echo Text::_('COM_JEM_SEARCH_SUBMIT'); ?>"/>
</td>
</tr>
</table>
<div class="jem_fright">
<label for="limit"><?php echo Text::_('COM_JEM_DISPLAY_NUM'); ?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
</div>
</div>
<div class="table-responsive">
<table class="eventtable table table-striped" style="width:<?php echo $this->jemsettings->tablewidth; ?>;" summary="jem">
<colgroup>
<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; ?>
</colgroup>
<thead>
<tr>
<th id="jem_date" class="sectiontableheader" align="left"><?php echo HTMLHelper::_('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 HTMLHelper::_('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 HTMLHelper::_('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 HTMLHelper::_('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 HTMLHelper::_('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 HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CATEGORY', 'c.catname', $this->lists['order_Dir'], $this->lists['order']); ?></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php if (empty($this->rows)) : ?>
<tr class="no_events"><td colspan="20"><?php echo Text::_('COM_JEM_NO_EVENTS_FOUND'); ?></td></tr>
<?php else : ?>
<?php $odd = 0; ?>
<?php foreach ($this->rows as $row) : ?>
<?php $odd = 1 - $odd; ?>
<?php if (!empty($row->featured)) : ?>
<tr class="featured featured<?php echo $row->id.$this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
<?php else : ?>
<tr class="sectiontableentry<?php echo ($odd + 1) . $this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
<?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 Route::_(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 (!empty($row->venue)) :
if (($this->jemsettings->showlinkvenue == 1) && !empty($row->venueslug)) :
echo "<a href='".Route::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>";
else :
echo $this->escape($row->venue);
endif;
else :
echo '-';
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; ?>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,58 @@
<?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 id="jem" class="jem_search<?php echo $this->pageclass_sfx;?>">
<?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>
<?php if ($this->params->get('showintrotext')) : ?>
<div class="description no_space floattext">
<?php echo $this->params->get('introtext'); ?>
</div>
<?php endif; ?>
<h2>
<?php echo Text::_('COM_JEM_SEARCH_SUBMIT');?>
</h2>
<!--table-->
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
<?php
/*if ($this->params->get('template_suffix')) {
echo $this->loadTemplate('table_'. $this->params->get('template_suffix'));
} else {*/
echo $this->loadTemplate('table');
//}
?>
<p>
<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="task" value="<?php echo $this->task; ?>" />
<input type="hidden" name="view" value="search" />
</p>
</form>
<!--footer-->
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<div class="copyright">
<?php echo JemOutput::footer( ); ?>
</div>
</div>

View File

@ -0,0 +1,380 @@
<?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\Uri\Uri;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Router\Route;
$uri = Uri::getInstance();
?>
<script>
function tableOrdering(order, dir, view)
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit(view);
}
function clearForm() {
var node = null;
node = document.getElementById('filter_type');
if (node != null) {
node.value='title';
}
node = null;
node = document.getElementById('filter_search');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_category');
if (node != null) {
node.value='1';
}
node = null;
node = document.getElementById('filter_date_from');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_date_to');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_continent');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_country');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_city');
if (node != null) {
node.value='';
}
node = null;
return;
}
</script>
<div id="jem_filter" class="floattext">
<dl class="jem-dl">
<dt>
<label for="filter_type"><?php echo Text::_('COM_JEM_FILTER'); ?></label>
</dt>
<dd class="jem-row jem-justify-start search-row">
<?php echo $this->lists['filter_types'].'&nbsp;'; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['filter'];?>" class="inputbox form-control" onchange="document.getElementById('adminForm').submit();" />
</dd>
<dt>
<?php echo '<label for="category">'.Text::_('COM_JEM_CATEGORY').'</label>'; ?>
</dt>
<dd>
<?php echo $this->lists['categories']; ?>
</dd>
<dt>
<?php echo '<label for="date">'.Text::_('COM_JEM_SEARCH_DATE').'</label>'; ?>
</dt>
<dd>
<div class="jem-row jem-nowrap jem-justify-start jem-date"><?php echo $this->lists['date_from'];?></div>
<div class="jem-row jem-nowrap jem-justify-start jem-date"><?php echo $this->lists['date_to'];?></div>
</dd>
<dt>
<?php echo '<label for="continent">'.Text::_('COM_JEM_CONTINENT').'</label>'; ?>
</dt>
<dd>
<?php echo $this->lists['continents'];?>
</dd>
<?php if ($this->filter_continent): ?>
<dt>
<?php echo '<label for="country">'.Text::_('COM_JEM_COUNTRY').'</label>'; ?>
</dt>
<dd>
<?php echo $this->lists['countries'];?>
</dd>
<?php endif; ?>
<?php if ($this->filter_continent && $this->filter_country): ?>
<dt>
<?php echo '<label for="city">'.Text::_('COM_JEM_CITY').'</label>';?>
</dt>
<dd>
<?php echo $this->lists['cities'];?>
</dd>
<?php endif; ?>
<dt></dt>
<dd>
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="btn btn-secondary" type="button" onclick="clearForm();this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
</dd>
</dl>
<?php if ($this->settings->get('global_display',1)) : ?>
<div class="jem_limit jem-row">
<?php
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;';
echo $this->pagination->getLimitBox();
?>
</div>
<?php endif; ?>
</div>
<div class="jem-misc jem-row">
<div class="jem-sort jem-row jem-justify-start jem-nowrap">
<i class="fa fa-sort fa-lg jem-sort-icon" aria-hidden="true"></i>
<div class="jem-row jem-justify-start jem-sort-parts">
<div id="jem_date" class="sectiontableheader"><i class="far fa-clock" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_DATE', 'a.dates', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<div id="jem_title" class="sectiontableheader"><i class="fa fa-comment" aria-hidden="true"></i><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php if ($this->jemsettings->showlocate == 1) : ?>
<div id="jem_location" class="sectiontableheader"><i class="fa fa-map-marker" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_LOCATION', 'l.venue', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<?php if ($this->jemsettings->showcity == 1) : ?>
<div id="jem_city" class="sectiontableheader"><i class="fa fa-building" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<?php if ($this->jemsettings->showstate == 1) : ?>
<div id="jem_state" class="sectiontableheader"><i class="fa fa-map" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<?php if ($this->jemsettings->showcat == 1) : ?>
<div id="jem_category" class="sectiontableheader"><i class="fa fa-tag" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CATEGORY', 'c.catname', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<?php if ($this->jemsettings->showatte == 1) : ?>
<div id="jem_atte" class="sectiontableheader"><i class="fa fa-user" aria-hidden="true"></i>&nbsp;<?php echo Text::_('COM_JEM_TABLE_ATTENDEES'); ?></div>
<?php endif; ?>
</div>
</div>
</div>
<style>
<?php
$imagewidth = 'inherit';
if ($this->jemsettings->imagewidth != 0) {
$imagewidth = $this->jemsettings->imagewidth / 2;
$imagewidth = $imagewidth.'px';
}
$imagewidthstring = 'jem-imagewidth';
if (JemHelper::jemStringContains($this->params->get('pageclass_sfx'), $imagewidthstring)) {
$pageclass_sfx = $this->params->get('pageclass_sfx');
$imagewidthpos = strpos($pageclass_sfx, $imagewidthstring);
$spacepos = strpos($pageclass_sfx, ' ', $imagewidthpos);
if ($spacepos === false) {
$spacepos = strlen($pageclass_sfx);
}
$startpos = $imagewidthpos + strlen($imagewidthstring);
$endpos = $spacepos - $startpos;
$imagewidth = substr($pageclass_sfx, $startpos, $endpos);
}
$imageheight = 'auto';
$imageheigthstring = 'jem-imageheight';
if (JemHelper::jemStringContains($this->params->get('pageclass_sfx'), $imageheigthstring)) {
$pageclass_sfx = $this->params->get('pageclass_sfx');
$imageheightpos = strpos($pageclass_sfx, $imageheigthstring);
$spacepos = strpos($pageclass_sfx, ' ', $imageheightpos);
if ($spacepos === false) {
$spacepos = strlen($pageclass_sfx);
}
$startpos = $imageheightpos + strlen($imageheigthstring);
$endpos = $spacepos - $startpos;
$imageheight = substr($pageclass_sfx, $startpos, $endpos);
}
?>
#jem .jem-list-img {
width: <?php echo $imagewidth; ?>;
}
#jem .jem-list-img img {
width: <?php echo $imagewidth; ?>;
height: <?php echo $imageheight; ?>;
}
@media not print {
@media only all and (max-width: 47.938rem) {
#jem .jem-list-img {
width: 100%;
}
#jem .jem-list-img img {
width: <?php echo $imagewidth; ?>;
height: <?php echo $imageheight; ?>;
}
}
}
</style>
<ul class="eventlist">
<?php if ($this->noevents == 1) : ?>
<li class="jem-event"><?php echo Text::_('COM_JEM_NO_EVENTS'); ?></li>
<?php else : ?>
<?php
// Safari has problems with the "onclick" element in the <li>. It covers the links to location and category etc.
// This detects the browser and just writes the onclick attribute if the broswer is not Safari.
$isSafari = false;
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') && !strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome')) {
$isSafari = true;
}
?>
<?php $this->rows = $this->getRows(); ?>
<?php foreach ($this->rows as $row) : ?>
<?php if (!empty($row->featured)) : ?>
<li class="jem-event jem-row jem-justify-start jem-nowrap jem-featured event_id<?php echo $row->id . ' ' . $this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event" <?php if ($this->jemsettings->showdetails == 1 && (!$isSafari) && ($this->jemsettings->gddisabled == 0)) : echo 'onclick="location.href=\''.Route::_(JemHelperRoute::getEventRoute($row->slug)).'\'"'; endif; ?>>
<?php else : ?>
<li class="jem-event jem-row jem-justify-start jem-nowrap event_id<?php echo $row->id . ' jem-odd' . ($row->odd +1) . $this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event" <?php if ($this->jemsettings->showdetails == 1 && (!$isSafari) && ($this->jemsettings->gddisabled == 0)) : echo 'onclick="location.href=\''.Route::_(JemHelperRoute::getEventRoute($row->slug)).'\'"'; endif; ?>>
<?php endif; ?>
<div class="jem-event-details" <?php if ($this->jemsettings->showdetails == 1 && (!$isSafari) && ($this->jemsettings->gddisabled == 1)) : echo 'onclick="location.href=\''.Route::_(JemHelperRoute::getEventRoute($row->slug)).'\'"'; endif; ?>>
<?php if (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 1)) : // Display title as title of jem-event with link ?>
<h4 title="<?php echo Text::_('COM_JEM_TABLE_TITLE').': '.$this->escape($row->title); ?>">
<a href="<?php echo Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" ><?php echo $this->escape($row->title); ?></a>
<?php echo JemOutput::recurrenceicon($row); ?>
<?php echo JemOutput::publishstateicon($row); ?>
<?php if (!empty($row->featured)) :?>
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
<?php endif; ?>
</h4>
<?php elseif (($this->jemsettings->showtitle == 1) && ($this->jemsettings->showdetails == 0)) : //Display title as title of jem-event without link ?>
<h4 title="<?php echo Text::_('COM_JEM_TABLE_TITLE').': '.$this->escape($row->title); ?>">
<?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
<?php if (!empty($row->featured)) :?>
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
<?php endif; ?>
</h4>
<?php elseif (($this->jemsettings->showtitle == 0) && ($this->jemsettings->showdetails == 1)) : // Display date as title of jem-event with link ?>
<h4>
<a href="<?php echo Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" >
<?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);
?>
</a>
<?php echo JemOutput::recurrenceicon($row); ?>
<?php echo JemOutput::publishstateicon($row); ?>
<?php if (!empty($row->featured)) :?>
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
<?php endif; ?>
</h4>
<?php else : // Display date as title of jem-event without link ?>
<h4>
<?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);
?>
<?php echo JemOutput::recurrenceicon($row); ?>
<?php echo JemOutput::publishstateicon($row); ?>
<?php if (!empty($row->featured)) :?>
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
<?php endif; ?>
</h4>
<?php endif; ?>
<?php // Display other information below in a row ?>
<div class="jem-list-row">
<?php if ($this->jemsettings->showtitle == 1) : ?>
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags(JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $this->jemsettings->showtime)); ?>">
<i class="far fa-clock" aria-hidden="true"></i>
<?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);
?>
</div>
<?php endif; ?>
<?php if ($this->jemsettings->showtitle == 0) : ?>
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_TITLE').': '.$this->escape($row->title); ?>">
<i class="fa fa-comment" aria-hidden="true"></i>
<?php echo $this->escape($row->title) . JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
</div>
<?php endif; ?>
<?php if (($this->jemsettings->showlocate == 1) && (!empty($row->venue))) : ?>
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_LOCATION').': '.$this->escape($row->venue); ?>">
<i class="fa fa-map-marker" aria-hidden="true"></i>
<?php if (($this->jemsettings->showlinkvenue == 1) && !empty($row->venueslug)) : ?>
<?php echo "<a href='".Route::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>"; ?>
<?php else : ?>
<?php echo $this->escape($row->venue); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if (($this->jemsettings->showcity == 1) && (!empty($row->city))) : ?>
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_CITY').': '.$this->escape($row->city); ?>">
<i class="fa fa-building" aria-hidden="true"></i>
<?php echo $this->escape($row->city); ?>
</div>
<?php endif; ?>
<?php if (($this->jemsettings->showstate == 1) && (!empty($row->state))): ?>
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_STATE').': '.$this->escape($row->state); ?>">
<i class="fa fa-map" aria-hidden="true"></i>
<?php echo $this->escape($row->state); ?>
</div>
<?php endif; ?>
<?php if ($this->jemsettings->showcat == 1) : ?>
<div class="jem-event-info" title="<?php echo strip_tags(Text::_('COM_JEM_TABLE_CATEGORY').': '.implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist))); ?>">
<i class="fa fa-tag" aria-hidden="true"></i>
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
</div>
<?php endif; ?>
<?php if (($this->jemsettings->showatte == 1) && (!empty($row->regCount))) : ?>
<div class="jem-event-info" title="<?php echo Text::_('COM_JEM_TABLE_ATTENDEES').': '.$this->escape($row->regCount); ?>">
<i class="fa fa-user" aria-hidden="true"></i>
<?php echo $this->escape($row->regCount); ?>
</div>
<?php endif; ?>
</div>
</div>
<meta itemprop="name" content="<?php echo $this->escape($row->title); ?>" />
<meta itemprop="url" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" />
<meta itemprop="identifier" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" />
<div itemtype="https://schema.org/Place" itemscope itemprop="location" style="display: none;" >
<?php if (!empty($row->locid)) : ?>
<meta itemprop="name" content="<?php echo $this->escape($row->venue); ?>" />
<?php else : ?>
<meta itemprop="name" content="None" />
<?php endif; ?>
<?php
$microadress = '';
if (!empty($row->city)) {
$microadress .= $this->escape($row->city);
}
if (!empty($microadress)) {
$microadress .= ', ';
}
if (!empty($row->state)) {
$microadress .= $this->escape($row->state);
}
if (empty($microadress)) {
$microadress .= '-';
}
?>
<meta itemprop="address" content="<?php echo $microadress; ?>" />
</div>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>

View File

@ -0,0 +1,351 @@
<?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\Uri\Uri;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Router\Route;
$uri = Uri::getInstance();
?>
<script>
function tableOrdering(order, dir, view)
{
var form = document.getElementById("adminForm");
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
form.submit(view);
}
function clearForm() {
var node = null;
node = document.getElementById('filter_type');
if (node != null) {
node.value='title';
}
node = null;
node = document.getElementById('filter_search');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_category');
if (node != null) {
node.value='1';
}
node = null;
node = document.getElementById('filter_date_from');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_date_to');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_continent');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_country');
if (node != null) {
node.value='';
}
node = null;
node = document.getElementById('filter_city');
if (node != null) {
node.value='';
}
node = null;
return;
}
</script>
<style>
<?php if (!empty($this->jemsettings->tablewidth)) : ?>
#jem #adminForm {
width: <?php echo ($this->jemsettings->tablewidth); ?>;
}
<?php endif; ?>
.jem-sort #jem_date,
#jem .jem-event .jem-event-date {
<?php if (!empty($this->jemsettings->datewidth)) : ?>
flex: 1 <?php echo ($this->jemsettings->datewidth); ?>;
<?php else : ?>
flex: 1;
<?php endif; ?>
}
.jem-sort #jem_title,
#jem .jem-event .jem-event-title {
<?php if (($this->jemsettings->showtitle == 1) && (!empty($this->jemsettings->titlewidth))) : ?>
flex: 1 <?php echo ($this->jemsettings->titlewidth); ?>;
<?php else : ?>
flex: 1;
<?php endif; ?>
}
.jem-sort #jem_location,
#jem .jem-event .jem-event-venue {
<?php if (($this->jemsettings->showlocate == 1) && (!empty($this->jemsettings->locationwidth))) : ?>
flex: 1 <?php echo ($this->jemsettings->locationwidth); ?>;
<?php else : ?>
flex: 1;
<?php endif; ?>
}
.jem-sort #jem_city,
#jem .jem-event .jem-event-city {
<?php if (($this->jemsettings->showcity == 1) && (!empty($this->jemsettings->citywidth))) : ?>
flex: 1 <?php echo ($this->jemsettings->citywidth); ?>;
<?php else : ?>
flex: 1;
<?php endif; ?>
}
.jem-sort #jem_state,
#jem .jem-event .jem-event-state {
<?php if (($this->jemsettings->showstate == 1) && (!empty($this->jemsettings->statewidth))) : ?>
flex: 1 <?php echo ($this->jemsettings->statewidth); ?>;
<?php else : ?>
flex: 1;
<?php endif; ?>
}
.jem-sort #jem_category,
#jem .jem-event .jem-event-category {
<?php if (($this->jemsettings->showcat == 1) && (!empty($this->jemsettings->catfrowidth))) : ?>
flex: 1 <?php echo ($this->jemsettings->catfrowidth); ?>;
<?php else : ?>
flex: 1;
<?php endif; ?>
}
.jem-sort #jem_atte,
#jem .jem-event .jem-event-attendees {
<?php if (($this->jemsettings->showatte == 1) && (!empty($this->jemsettings->attewidth))) : ?>
flex: 1 <?php echo ($this->jemsettings->attewidth); ?>;
<?php else : ?>
flex: 1;
<?php endif; ?>
}
</style>
<div id="jem_filter" class="floattext">
<dl class="jem-dl">
<dt>
<label for="filter_type"><?php echo Text::_('COM_JEM_FILTER'); ?></label>
</dt>
<dd>
<?php echo $this->lists['filter_types']; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['filter'];?>" class="inputbox" onchange="document.getElementById('adminForm').submit();" />
</dd>
<dt>
<?php echo '<label for="category">'.Text::_('COM_JEM_CATEGORY').'</label>'; ?>
</dt>
<dd>
<?php echo $this->lists['categories']; ?>
</dd>
<dt>
<?php echo '<label for="date">'.Text::_('COM_JEM_SEARCH_DATE').'</label>'; ?>
</dt>
<dd>
<div class="jem-row jem-nowrap jem-justify-start"><?php echo text::_('COM_JEM_SEARCH_FROM'); ?>&nbsp;<?php echo $this->lists['date_from'];?></div>
<div class="jem-row jem-nowrap jem-justify-start"><?php echo text::_('COM_JEM_SEARCH_TO'); ?>&nbsp;<?php echo $this->lists['date_to'];?></div>
</dd>
<dt>
<?php echo '<label for="continent">'.Text::_('COM_JEM_CONTINENT').'</label>'; ?>
</dt>
<dd>
<?php echo $this->lists['continents'];?>
</dd>
<?php if ($this->filter_continent): ?>
<dt>
<?php echo '<label for="country">'.Text::_('COM_JEM_COUNTRY').'</label>'; ?>
</dt>
<dd>
<?php echo $this->lists['countries'];?>
</dd>
<?php endif; ?>
<?php if ($this->filter_continent && $this->filter_country): ?>
<dt>
<?php echo '<label for="city">'.Text::_('COM_JEM_CITY').'</label>';?>
</dt>
<dd>
<?php echo $this->lists['cities'];?>
</dd>
<?php endif; ?>
<dt></dt>
<dd>
<button class="btn btn-primary" type="submit"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="btn btn-secondary" type="button" onclick="clearForm();this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
</dd>
</dl>
<?php if ($this->settings->get('global_display',1)) : ?>
<div class="jem-limit-smallist">
<?php
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label>&nbsp;';
echo $this->pagination->getLimitBox();
?>
</div>
<?php endif; ?>
</div>
<div class="jem-sort jem-sort-small">
<div class="jem-list-row jem-small-list">
<div id="jem_date" class="sectiontableheader"><i class="far fa-clock" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_DATE', 'a.dates', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php if ($this->jemsettings->showtitle == 1) : ?>
<div id="jem_title" class="sectiontableheader"><i class="fa fa-comment" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_TITLE', 'a.title', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<?php if ($this->jemsettings->showlocate == 1) : ?>
<div id="jem_location" class="sectiontableheader"><i class="fa fa-map-marker" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_LOCATION', 'l.venue', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<?php if ($this->jemsettings->showcity == 1) : ?>
<div id="jem_city" class="sectiontableheader"><i class="fa fa-building" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<?php if ($this->jemsettings->showstate == 1) : ?>
<div id="jem_state" class="sectiontableheader"><i class="fa fa-map" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<?php if ($this->jemsettings->showcat == 1) : ?>
<div id="jem_category" class="sectiontableheader"><i class="fa fa-tag" aria-hidden="true"></i>&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_CATEGORY', 'c.catname', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
</div>
</div>
<ul class="eventlist">
<?php if ($this->noevents == 1) : ?>
<li class="jem-event"><?php echo Text::_('COM_JEM_NO_EVENTS'); ?></li>
<?php else : ?>
<?php
// Safari has problems with the "onclick" element in the <li>. It covers the links to location and category etc.
// This detects the browser and just writes the onclick attribute if the broswer is not Safari.
$isSafari = false;
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') && !strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome')) {
$isSafari = true;
}
?>
<?php $this->rows = $this->getRows(); ?>
<?php foreach ($this->rows as $row) : ?>
<?php if (!empty($row->featured)) : ?>
<li class="jem-event jem-list-row jem-small-list jem-featured event_id<?php echo $row->id . ' ' . $this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
<?php else : ?>
<li class="jem-event jem-list-row jem-small-list event_id<?php echo $row->id . ' jem-odd' . ($row->odd +1) . $this->params->get('pageclass_sfx'); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
<?php endif; ?>
<div class="jem-event-info-small jem-event-date" title="<?php echo Text::_('COM_JEM_TABLE_DATE').': '.strip_tags(JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $this->jemsettings->showtime)); ?>" <?php if ($this->jemsettings->showdetails == 1 && (!$isSafari)) : echo 'onclick="location.href=\''.Route::_(JemHelperRoute::getEventRoute($row->slug)).'\'"'; endif; ?>>
<i class="far fa-clock" aria-hidden="true"></i>
<?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);
?>
<?php if ($this->jemsettings->showtitle == 0) : ?>
<?php echo JemOutput::recurrenceicon($row); ?>
<?php echo JemOutput::publishstateicon($row); ?>
<?php if (!empty($row->featured)) :?>
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
<?php endif; ?>
<?php endif; ?>
</div>
<?php if ($this->jemsettings->showtitle == 1) : ?>
<div class="jem-event-info-small jem-event-title" title="<?php echo Text::_('COM_JEM_TABLE_TITLE').': '.$this->escape($row->title); ?>">
<i class="fa fa-comment" aria-hidden="true"></i>
<a href="<?php echo Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>"><?php echo $this->escape($row->title); ?></a>
<?php echo JemOutput::recurrenceicon($row) . JemOutput::publishstateicon($row); ?>
<?php if (!empty($row->featured)) :?>
<i class="jem-featured-icon fa fa-exclamation-circle" aria-hidden="true"></i>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->jemsettings->showlocate == 1) : ?>
<?php if (!empty($row->venue)) : ?>
<div class="jem-event-info-small jem-event-venue" title="<?php echo Text::_('COM_JEM_TABLE_LOCATION').': '.$this->escape($row->venue); ?>">
<i class="fa fa-map-marker" aria-hidden="true"></i>
<?php if (($this->jemsettings->showlinkvenue == 1) && !empty($row->venueslug)) : ?>
<?php echo "<a href='".Route::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>"; ?>
<?php else : ?>
<?php echo $this->escape($row->venue); ?>
<?php endif; ?>
</div>
<?php else : ?>
<div class="jem-event-info-small jem-event-venue">
<i class="fa fa-map-marker" aria-hidden="true"></i> -
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->jemsettings->showcity == 1) : ?>
<?php if (!empty($row->city)) : ?>
<div class="jem-event-info-small jem-event-city" title="<?php echo Text::_('COM_JEM_TABLE_CITY').': '.$this->escape($row->city); ?>">
<i class="fa fa-building" aria-hidden="true"></i>
<?php echo $this->escape($row->city); ?>
</div>
<?php else : ?>
<div class="jem-event-info-small jem-event-city"><i class="fa fa-building" aria-hidden="true"></i> -</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->jemsettings->showstate == 1) : ?>
<?php if (!empty($row->state)) : ?>
<div class="jem-event-info-small jem-event-state" title="<?php echo Text::_('COM_JEM_TABLE_STATE').': '.$this->escape($row->state); ?>">
<i class="fa fa-map" aria-hidden="true"></i>
<?php echo $this->escape($row->state); ?>
</div>
<?php else : ?>
<div class="jem-event-info-small jem-event-state"><i class="fa fa-map" aria-hidden="true"></i> -</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->jemsettings->showcat == 1) : ?>
<div class="jem-event-info-small jem-event-category" title="<?php echo strip_tags(Text::_('COM_JEM_TABLE_CATEGORY').': '.implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist))); ?>">
<i class="fa fa-tag" aria-hidden="true"></i>
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
</div>
<?php endif; ?>
<meta itemprop="name" content="<?php echo $this->escape($row->title); ?>" />
<meta itemprop="url" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" />
<meta itemprop="identifier" content="<?php echo rtrim($uri->base(), '/').Route::_(JemHelperRoute::getEventRoute($row->slug)); ?>" />
<div itemtype="https://schema.org/Place" itemscope itemprop="location" style="display: none;" >
<?php if (!empty($row->locid)) : ?>
<meta itemprop="name" content="<?php echo $this->escape($row->venue); ?>" />
<?php else : ?>
<meta itemprop="name" content="None" />
<?php endif; ?>
<?php
$microadress = '';
if (!empty($row->city)) {
$microadress .= $this->escape($row->city);
}
if (!empty($microadress)) {
$microadress .= ', ';
}
if (!empty($row->state)) {
$microadress .= $this->escape($row->state);
}
if (empty($microadress)) {
$microadress .= '-';
}
?>
<meta itemprop="address" content="<?php echo $microadress; ?>" />
</div>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>

View File

@ -0,0 +1,16 @@
<?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;
if (empty($this->jemsettings->tablewidth)) :
echo $this->loadTemplate('jem_eventslist'); // The new layout
else :
echo $this->loadTemplate('jem_eventslist_small'); // Similar to the old table-layout
endif;
?>

View File

@ -0,0 +1,227 @@
<?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\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
/**
* Search-View
*/
class JemViewSearch extends JemView
{
/**
* Creates the Simple List View
*/
public function display($tpl = null)
{
// initialize variables
$app = Factory::getApplication();
$document = $app->getDocument();
$jemsettings = JemHelper::config();
$settings = JemHelper::globalattribs();
$menu = $app->getMenu();
$menuitem = $menu->getActive();
$params = $app->getParams();
$uri = Uri::getInstance();
$pathway = $app->getPathWay();
$url = Uri::root();
$model = $this->getModel('search');
// $user = JemFactory::getUser();
// Decide which parameters should take priority
$useMenuItemParams = ($menuitem && $menuitem->query['option'] == 'com_jem'
&& $menuitem->query['view'] == 'search');
// Load css
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
// Load Script
// HTMLHelper::_('script', 'com_jem/search.js', false, true);
$document->addScript($url.'media/com_jem/js/search.js');
$filter_continent = $app->getUserStateFromRequest('com_jem.search.filter_continent', 'filter_continent', '', 'string');
$filter_country = $app->getUserStateFromRequest('com_jem.search.filter_country', 'filter_country', '', 'string');
$filter_city = $app->getUserStateFromRequest('com_jem.search.filter_city', 'filter_city', '', 'string');
$filter_date_from = $app->getUserStateFromRequest('com_jem.search.filter_date_from', 'filter_date_from', '', 'string');
$filter_date_to = $app->getUserStateFromRequest('com_jem.search.filter_date_to', 'filter_date_to', '', 'string');
$filter_category = $app->getUserStateFromRequest('com_jem.search.filter_category', 'filter_category', 0, 'int');
$task = $app->input->getCmd('task', '');
if(empty($filter_continent) && empty($filter_country)){
$filter_country = $jemsettings->defaultCountry;
$filter_continent = $model->getContinentFromCountry($filter_country);
}
// get data from model
$rows = $this->get('Data');
// are events available?
$noevents = (!$rows) ? 1 : 0;
// Check to see which parameters should take priority
if ($useMenuItemParams) {
// Menu item params take priority
$pagetitle = $params->def('page_title', $menuitem ? $menuitem->title : Text::_('COM_JEM_SEARCH'));
$pageheading = $params->def('page_heading', $pagetitle);
$pathwayKeys = array_keys($pathway->getPathway());
$lastPathwayEntryIndex = end($pathwayKeys);
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
//$pathway->setItemName(1, $menuitem->title);
} else {
$pagetitle = Text::_('COM_JEM_SEARCH');
$pageheading = $pagetitle;
$params->set('introtext', ''); // there is no introtext in that case
$params->set('showintrotext', 0);
$pathway->addItem(1, $pagetitle);
}
$pageclass_sfx = $params->get('pageclass_sfx');
if ($task == 'archive') {
$pathway->addItem(Text::_('COM_JEM_ARCHIVE'), Route::_('index.php?option=com_jem&view=search&task=archive'));
$pagetitle .= ' - ' . Text::_('COM_JEM_ARCHIVE');
$pageheading .= ' - ' . Text::_('COM_JEM_ARCHIVE');
}
$pageclass_sfx = $params->get('pageclass_sfx');
$params->set('page_heading', $pageheading);
// Add site name to title if param is set
if ($app->get('sitename_pagetitles', 0) == 1) {
$pagetitle = Text::sprintf('JPAGETITLE', $app->get('sitename'), $pagetitle);
}
elseif ($app->get('sitename_pagetitles', 0) == 2) {
$pagetitle = Text::sprintf('JPAGETITLE', $pagetitle, $app->get('sitename'));
}
// Set Page title
$document->setTitle($pagetitle);
$document->setMetadata('title' , $pagetitle);
// No permissions required/useful on this view
$permissions = new stdClass();
// create select lists
$lists = $this->_buildSortLists();
if ($lists['filter']) {
//$uri->setVar('filter', $app->input->getString('filter', ''));
//$filter = $app->getUserStateFromRequest('com_jem.jem.filter', 'filter', '', 'string');
$uri->setVar('filter', $lists['filter']);
$uri->setVar('filter_type', $app->input->getString('filter_type', ''));
} else {
$uri->delVar('filter');
$uri->delVar('filter_type');
}
// Cause of group limits we can't use class here to build the categories tree
$categories = $this->get('CategoryTree');
$catoptions = array();
$catoptions[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_SELECT_CATEGORY'));
$catoptions = array_merge($catoptions, JemCategories::getcatselectoptions($categories));
$selectedcats = ($filter_category) ? array($filter_category) : array();
// build selectlists
$lists['categories'] = HTMLHelper::_('select.genericlist', $catoptions, 'filter_category', array('size'=>'1', 'class'=>'form-select'), 'value', 'text', $selectedcats);
// Create the pagination object
$pagination = $this->get('Pagination');
// date filter
$lists['date_from'] = HTMLHelper::_('calendar', $filter_date_from, 'filter_date_from', 'filter_date_from', '%Y-%m-%d', array('class'=>"inputbox", 'placeholder' => Text::_('COM_JEM_SEARCH_FROM'), 'showTime' => false));
$lists['date_to'] = HTMLHelper::_('calendar', $filter_date_to, 'filter_date_to', 'filter_date_to', '%Y-%m-%d', array('class'=>"inputbox", 'placeholder' => Text::_('COM_JEM_SEARCH_TO'), 'showTime' => false));
// country filter
$continents = array();
$continents[] = HTMLHelper::_('select.option', '', Text::_('COM_JEM_SELECT_CONTINENT'));
$continents[] = HTMLHelper::_('select.option', 'AF', Text::_('COM_JEM_AFRICA'));
$continents[] = HTMLHelper::_('select.option', 'AS', Text::_('COM_JEM_ASIA'));
$continents[] = HTMLHelper::_('select.option', 'EU', Text::_('COM_JEM_EUROPE'));
$continents[] = HTMLHelper::_('select.option', 'NA', Text::_('COM_JEM_NORTH_AMERICA'));
$continents[] = HTMLHelper::_('select.option', 'SA', Text::_('COM_JEM_SOUTH_AMERICA'));
$continents[] = HTMLHelper::_('select.option', 'OC', Text::_('COM_JEM_OCEANIA'));
$continents[] = HTMLHelper::_('select.option', 'AN', Text::_('COM_JEM_ANTARCTICA'));
$lists['continents'] = HTMLHelper::_('select.genericlist', $continents, 'filter_continent', array('class'=>'form-select'), 'value', 'text', $filter_continent);
unset($continents);
// country filter
$countries = array();
$countries[] = HTMLHelper::_('select.option', '', Text::_('COM_JEM_SELECT_COUNTRY'));
$countries = array_merge($countries, $this->get('CountryOptions'));
$lists['countries'] = HTMLHelper::_('select.genericlist', $countries, 'filter_country', array('class'=>'form-select'), 'value', 'text', $filter_country);
unset($countries);
// city filter
if ($filter_country) {
$cities = array();
$cities[] = HTMLHelper::_('select.option', '', Text::_('COM_JEM_SELECT_CITY'));
$cities = array_merge($cities, $this->get('CityOptions'));
$lists['cities'] = HTMLHelper::_('select.genericlist', $cities, 'filter_city', array('class'=>'form-select'), 'value', 'text', $filter_city);
unset($cities);
}
$this->lists = $lists;
$this->action = $uri->toString();
$this->rows = $rows;
$this->task = $task;
$this->noevents = $noevents;
$this->params = $params;
$this->pagination = $pagination;
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->permissions = $permissions;
$this->pagetitle = $pagetitle;
$this->filter_continent = $filter_continent;
$this->filter_country = $filter_country;
$this->document = $document;
$this->pageclass_sfx =$pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
parent::display($tpl);
}
/**
* Method to build the sortlists
*
* @access private
* @return array
*
*/
protected function _buildSortLists()
{
$app = Factory::getApplication();
$task = $app->input->getCmd('task', '');
$filter_order = $app->input->getCmd('filter_order', 'a.dates');
$filter_order_DirDefault = 'ASC';
// Reverse default order for dates in archive mode
if ($task == 'archive' && $filter_order == 'a.dates') {
$filter_order_DirDefault = 'DESC';
}
$filter_order_Dir = $app->input->get('filter_order_Dir', $filter_order_DirDefault);
$filter = $app->getUserStateFromRequest('com_jem.search.filter_search', 'filter_search', '', 'string');
$filter_type = $app->input->getString('filter_type', '');
$sortselects = array();
$sortselects[] = HTMLHelper::_('select.option', 'title', Text::_('COM_JEM_TABLE_TITLE'));
$sortselects[] = HTMLHelper::_('select.option', 'venue', Text::_('COM_JEM_TABLE_LOCATION'));
$sortselect = HTMLHelper::_('select.genericlist', $sortselects, 'filter_type', array('size'=>'1','class'=>'form-select'), 'value', 'text', $filter_type);
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
$lists['filter'] = $filter;
$lists['filter_types'] = $sortselect;
return $lists;
}
}
?>

View File

@ -0,0 +1,217 @@
<?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
*/
defined('_JEXEC') or die;
/**
* Search-View
*/
class JemViewSearch extends JemView
{
/**
* Creates the Simple List View
*/
public function display($tpl = null)
{
// initialize variables
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$jemsettings = JemHelper::config();
$settings = JemHelper::globalattribs();
$menu = $app->getMenu();
$menuitem = $menu->getActive();
$params = $app->getParams();
$uri = JFactory::getURI();
$pathway = $app->getPathWay();
// $user = JemFactory::getUser();
// Decide which parameters should take priority
$useMenuItemParams = ($menuitem && $menuitem->query['option'] == 'com_jem'
&& $menuitem->query['view'] == 'search');
// add javascript
JHtml::_('behavior.framework');
// Load css
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
// Load Script
JHtml::_('script', 'com_jem/search.js', false, true);
$filter_continent = $app->getUserStateFromRequest('com_jem.search.filter_continent', 'filter_continent', '', 'string');
$filter_country = $app->getUserStateFromRequest('com_jem.search.filter_country', 'filter_country', '', 'string');
$filter_city = $app->getUserStateFromRequest('com_jem.search.filter_city', 'filter_city', '', 'string');
$filter_date_from = $app->getUserStateFromRequest('com_jem.search.filter_date_from', 'filter_date_from', '', 'string');
$filter_date_to = $app->getUserStateFromRequest('com_jem.search.filter_date_to', 'filter_date_to', '', 'string');
$filter_category = $app->getUserStateFromRequest('com_jem.search.filter_category', 'filter_category', 0, 'int');
$task = $app->input->get('task', '');
// get data from model
$rows = $this->get('Data');
// are events available?
$noevents = (!$rows) ? 1 : 0;
// Check to see which parameters should take priority
if ($useMenuItemParams) {
// Menu item params take priority
$pagetitle = $params->def('page_title', $menuitem ? $menuitem->title : JText::_('COM_JEM_SEARCH'));
$pageheading = $params->def('page_heading', $pagetitle);
$pathwayKeys = array_keys($pathway->getPathway());
$lastPathwayEntryIndex = end($pathwayKeys);
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
//$pathway->setItemName(1, $menuitem->title);
} else {
$pagetitle = JText::_('COM_JEM_SEARCH');
$pageheading = $pagetitle;
$params->set('introtext', ''); // there is no introtext in that case
$params->set('showintrotext', 0);
$pathway->addItem(1, $pagetitle);
}
$pageclass_sfx = $params->get('pageclass_sfx');
if ($task == 'archive') {
$pathway->addItem(JText::_('COM_JEM_ARCHIVE'), JRoute::_('index.php?option=com_jem&view=search&task=archive'));
$pagetitle .= ' - ' . JText::_('COM_JEM_ARCHIVE');
$pageheading .= ' - ' . JText::_('COM_JEM_ARCHIVE');
}
$pageclass_sfx = $params->get('pageclass_sfx');
$params->set('page_heading', $pageheading);
// Add site name to title if param is set
if ($app->getCfg('sitename_pagetitles', 0) == 1) {
$pagetitle = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $pagetitle);
}
elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
$pagetitle = JText::sprintf('JPAGETITLE', $pagetitle, $app->getCfg('sitename'));
}
// Set Page title
$document->setTitle($pagetitle);
$document->setMetadata('title' , $pagetitle);
// No permissions required/useful on this view
$permissions = new stdClass();
// create select lists
$lists = $this->_buildSortLists();
if ($lists['filter']) {
//$uri->setVar('filter', $app->input->getString('filter', ''));
//$filter = $app->getUserStateFromRequest('com_jem.jem.filter', 'filter', '', 'string');
$uri->setVar('filter', $lists['filter']);
$uri->setVar('filter_type', $app->input->getString('filter_type', ''));
} else {
$uri->delVar('filter');
$uri->delVar('filter_type');
}
// Cause of group limits we can't use class here to build the categories tree
$categories = $this->get('CategoryTree');
$catoptions = array();
$catoptions[] = JHtml::_('select.option', '1', JText::_('COM_JEM_SELECT_CATEGORY'));
$catoptions = array_merge($catoptions, JemCategories::getcatselectoptions($categories));
$selectedcats = ($filter_category) ? array($filter_category) : array();
// build selectlists
$lists['categories'] = JHtml::_('select.genericlist', $catoptions, 'filter_category', array('size'=>'1', 'class'=>'inputbox'), 'value', 'text', $selectedcats);
// Create the pagination object
$pagination = $this->get('Pagination');
// date filter
$lists['date_from'] = JHtml::_('calendar', $filter_date_from, 'filter_date_from', 'filter_date_from', '%Y-%m-%d', array('class'=>"inputbox", 'showTime' => false));
$lists['date_to'] = JHtml::_('calendar', $filter_date_to, 'filter_date_to', 'filter_date_to', '%Y-%m-%d', array('class'=>"inputbox", 'showTime' => false));
// country filter
$continents = array();
$continents[] = JHtml::_('select.option', '', JText::_('COM_JEM_SELECT_CONTINENT'));
$continents[] = JHtml::_('select.option', 'AF', JText::_('COM_JEM_AFRICA'));
$continents[] = JHtml::_('select.option', 'AS', JText::_('COM_JEM_ASIA'));
$continents[] = JHtml::_('select.option', 'EU', JText::_('COM_JEM_EUROPE'));
$continents[] = JHtml::_('select.option', 'NA', JText::_('COM_JEM_NORTH_AMERICA'));
$continents[] = JHtml::_('select.option', 'SA', JText::_('COM_JEM_SOUTH_AMERICA'));
$continents[] = JHtml::_('select.option', 'OC', JText::_('COM_JEM_OCEANIA'));
$continents[] = JHtml::_('select.option', 'AN', JText::_('COM_JEM_ANTARCTICA'));
$lists['continents'] = JHtml::_('select.genericlist', $continents, 'filter_continent', array('class'=>'inputbox'), 'value', 'text', $filter_continent);
unset($continents);
// country filter
$countries = array();
$countries[] = JHtml::_('select.option', '', JText::_('COM_JEM_SELECT_COUNTRY'));
$countries = array_merge($countries, $this->get('CountryOptions'));
$lists['countries'] = JHtml::_('select.genericlist', $countries, 'filter_country', array('class'=>'inputbox'), 'value', 'text', $filter_country);
unset($countries);
// city filter
if ($filter_country) {
$cities = array();
$cities[] = JHtml::_('select.option', '', JText::_('COM_JEM_SELECT_CITY'));
$cities = array_merge($cities, $this->get('CityOptions'));
$lists['cities'] = JHtml::_('select.genericlist', $cities, 'filter_city', array('class'=>'inputbox'), 'value', 'text', $filter_city);
unset($cities);
}
$this->lists = $lists;
$this->action = $uri->toString();
$this->rows = $rows;
$this->task = $task;
$this->noevents = $noevents;
$this->params = $params;
$this->pagination = $pagination;
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->permissions = $permissions;
$this->pagetitle = $pagetitle;
$this->filter_continent = $filter_continent;
$this->filter_country = $filter_country;
$this->document = $document;
$this->pageclass_sfx = htmlspecialchars($pageclass_sfx);
parent::display($tpl);
}
/**
* Method to build the sortlists
*
* @access private
* @return array
*
*/
protected function _buildSortLists()
{
$app = JFactory::getApplication();
$task = $app->input->get('task', '');
$filter_order = $app->input->getCmd('filter_order', 'a.dates');
$filter_order_DirDefault = 'ASC';
// Reverse default order for dates in archive mode
if ($task == 'archive' && $filter_order == 'a.dates') {
$filter_order_DirDefault = 'DESC';
}
$filter_order_Dir = $app->input->get('filter_order_Dir', $filter_order_DirDefault);
$filter = $app->getUserStateFromRequest('com_jem.search.filter_search', 'filter_search', '', 'string');
$filter_type = $app->input->getString('filter_type', '');
$sortselects = array();
$sortselects[] = JHtml::_('select.option', 'title', JText::_('COM_JEM_TABLE_TITLE'));
$sortselects[] = JHtml::_('select.option', 'venue', JText::_('COM_JEM_TABLE_LOCATION'));
$sortselect = JHtml::_('select.genericlist', $sortselects, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
$lists['filter'] = $filter;
$lists['filter_types'] = $sortselect;
return $lists;
}
}
?>