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,235 @@
<?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;
JHtml::_('behavior.tooltip');
?>
<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();
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 (1) {
$sort_by[] = JHtml::_('select.option', 'l.country ASC', JText::_('COM_JEM_COUNTRY') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
$sort_by[] = JHtml::_('select.option', 'l.country DESC', JText::_('COM_JEM_COUNTRY') . ' ' . 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']);
?>
<?php if (!$this->params->get('show_page_heading', 1)) : /* hide this if page heading is shown */ ?>
<h2><?php echo JText::_('COM_JEM_MY_VENUES'); ?></h2>
<?php endif; ?>
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm" name="adminForm">
<?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">
<label for="filter"><?php echo JText::_('COM_JEM_FILTER'); ?></label>
<?php echo $this->lists['filter'].'&nbsp;'; ?>
<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">
<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->venues_pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php
// calculate span of columns to show, summary must be 12
$default_span = array('check' => 1, /*'image' => 1,*/ 'venue' => 3, 'city' => 3, 'state' => 3, 'country' => 1, 'status' => 1);
$a_span = array('check' => $default_span['check'], 'venue' => $default_span['venue'], 'country' => $default_span['country'], 'status' => $default_span['status']); // always shown
/*if ($this->jemsettings->showeventimage == 1) {
$a_span['image'] = $default_span['image'];
}*/
if ($this->jemsettings->showcity == 1) {
$a_span['city'] = $default_span['city'];
}
if ($this->jemsettings->showstate == 1) {
$a_span['state'] = $default_span['state'];
}
$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('venue', $a_span)) {
++$a_span['venue'];
++$total;
}
if (($total < 12) && array_key_exists('city', $a_span)) {
++$a_span['city'];
++$total;
}
if (($total < 12) && array_key_exists('state', $a_span)) {
++$a_span['state'];
++$total;
}
} // while
}
?>
<div class="eventtable">
<div class="row-fluid sectiontableheader">
<?php if (empty($this->print) && !empty($this->permissions->canPublishVenue)) : ?>
<div class="span<?php echo $a_span['check']; ?> showalways"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo JText::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></div>
<?php endif; ?>
<?php if (array_key_exists('image', $a_span)) : ?>
<!-- div class="span<?php echo $a_span['image']; ?>"><?php echo JText::_('COM_JEM_TABLE_EVENTIMAGE'); ?></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('city', $a_span)) : ?>
<div class="span<?php echo $a_span['city']; ?>"><?php echo JText::_('COM_JEM_TABLE_CITY'); ?></div>
<?php endif; ?>
<?php if (array_key_exists('state', $a_span)) : ?>
<div class="span<?php echo $a_span['state']; ?>"><?php echo JText::_('COM_JEM_TABLE_STATE'); ?></div>
<?php endif; ?>
<?php if (array_key_exists('country', $a_span)) : ?>
<div class="span<?php echo $a_span['country']; ?>"><?php echo JText::_('COM_JEM_TABLE_COUNTRY'); ?></div>
<?php endif; ?>
<?php if (array_key_exists('status', $a_span)) : ?>
<div class="span<?php echo $a_span['status']; ?>"><?php echo JText::_('JSTATUS'); ?></div>
<?php endif; ?>
</div>
<?php if (empty($this->venues)) : ?>
<div class="row-fluid sectiontableentry<?php echo $this->params->get('pageclass_sfx'); ?>" >
<div class="span12">
<strong><i><?php echo JText::_('COM_JEM_NO_VENUES'); ?></i></strong>
</div>
</div>
<?php else : ?>
<?php foreach ($this->venues as $i => $row) : ?>
<div class="row-fluid sectiontableentry<?php echo $this->params->get('pageclass_sfx'); ?>">
<?php if (empty($this->print) && !empty($this->permissions->canPublishVenue)) : ?>
<div class="span<?php echo $a_span['check']; ?>">
<?php
if (!empty($row->params) && $row->params->get('access-change', false)) :
echo JHtml::_('grid.id', $i, $row->id);
endif;
?>
</div>
<?php endif; ?>
<?php if (array_key_exists('venue', $a_span)) : ?>
<div class="span<?php echo $a_span['venue']; ?> venue">
<?php
if (!empty($row->venue)) :
if (($this->jemsettings->showlinkvenue == 1) && !empty($row->venueslug)) :
echo "<a href='".JRoute::_(JemHelperRoute::getVenueRoute($row->venueslug))."'>".$this->escape($row->venue)."</a>";
else :
echo $this->escape($row->venue);
endif;
else :
echo '-';
endif;
?>
</div>
<?php endif; ?>
<?php if (array_key_exists('city', $a_span)) : ?>
<div class="span<?php echo $a_span['city']; ?> city">
<?php echo !empty($row->city) ? $this->escape($row->city) : '-'; ?>
</div>
<?php endif; ?>
<?php if (array_key_exists('state', $a_span)) : ?>
<div class="span<?php echo $a_span['state']; ?> state">
<?php echo !empty($row->state) ? $this->escape($row->state) : '-'; ?>
</div>
<?php endif; ?>
<?php if (array_key_exists('country', $a_span)) : ?>
<div class="span<?php echo $a_span['country']; ?> country">
<?php if (!empty($row->country)) :
$countryimg = JemHelperCountries::getCountryFlag($row->country);
if ($countryimg) :
echo $countryimg; ?><span class="info-text"><?php echo JemHelperCountries::getCountryName($row->country); ?></span><?php
else :
echo $this->escape($row->country);
endif;
else :
echo '-';
endif; ?>
</div>
<?php endif; ?>
<?php if (array_key_exists('status', $a_span)) : ?>
<div class="span<?php echo $a_span['status']; ?> status">
<?php // Ensure icon is not clickable if user isn't allowed to change state!
$enabled = empty($this->print) && !empty($row->params) && $row->params->get('access-change', false);
echo JHtml::_('jgrid.published', $row->published, $i, 'myvenues.', $enabled);
?>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php endif; /* noevents */ ?>
</div>
<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="boxchecked" value="0" />
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
<input type="hidden" name="option" value="com_jem" />
<?php echo JHtml::_('form.token'); ?>
</form>
<div class="pagination">
<?php echo $this->venues_pagination->getPagesLinks(); ?>
</div>

View File

@ -0,0 +1,45 @@
<?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;
?>
<div id="jem" class="jem_myvenues<?php echo $this->pageclass_sfx;?>">
<?php if ($this->needLoginFirst) {
$uri = Uri::getInstance();
$returnUrl = $uri->toString();
$urlLogin = 'index.php?option=com_users&view=login&return=' . base64_encode($returnUrl); ?>
<button class="btn btn-warning" onclick="location.href='<?php echo $uri->root() . $urlLogin; ?>'"
type="button"><?php echo Text::_('COM_JEM_LOGIN_TO_ACCESS'); ?></button>
<?php } else { ?>
<div class="buttons">
<?php
$btn_params = array('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; ?>
<!--table-->
<?php echo $this->loadTemplate('venues');?>
<!--footer-->
<div class="copyright">
<?php echo JEMOutput::footer( ); ?>
</div>
<?php } ?>
</div>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_JEM_MYVENUES_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_JEM_MYVENUES_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>

View File

@ -0,0 +1,167 @@
<?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>
<style>
div#jem_filter select {
width: auto;
margin-right:10px;
border: 1px solid #808080;
background-color: #C6CCBE;
cursor: pointer;
}
</style>
<?php if (!$this->params->get('show_page_heading', 1)) : /* hide this if page heading is shown */ ?>
<h2><?php echo Text::_('COM_JEM_MY_VENUES'); ?></h2>
<?php endif; ?>
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm" name="adminForm">
<?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">
<label for="filter"><?php echo Text::_('COM_JEM_FILTER'); ?></label>
<?php echo $this->lists['filter'].'&nbsp;'; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search'];?>" class="inputbox" onchange="document.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>
</div>
<?php endif; ?>
<?php if ($this->settings->get('global_display',1)) : ?>
<div class="jem_fright">
<label for="limit"><?php echo Text::_('COM_JEM_DISPLAY_NUM'); ?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="table-responsive">
<table class="eventtable jem-myvenues" style="width:<?php echo $this->jemsettings->tablewidth; ?>;" summary="Venues">
<colgroup>
<?php if (empty($this->print) && !empty($this->permissions->canPublishVenue)) : ?>
<col width="1%" class="jem_col_checkall" />
<?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; ?>
<col width="1%" class="jem_col_status" />
</colgroup>
<thead>
<tr>
<?php if (empty($this->print) && !empty($this->permissions->canPublishVenue)) : ?>
<th class="sectiontableheader center"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></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; ?>
<th id="jem_status" class="sectiontableheader center" nowrap="nowrap"><?php echo Text::_('JSTATUS'); ?></th>
</tr>
</thead>
<tbody>
<?php if (empty($this->venues)) : ?>
<tr class="no_events"><td colspan="20"><?php echo Text::_('COM_JEM_NO_VENUES'); ?></td></tr>
<?php else : ?>
<?php foreach ($this->venues as $i => $row) : ?>
<tr class="row<?php echo $i % 2 . ' venue_id' . $this->escape($row->id); ?>">
<?php if (empty($this->print) && !empty($this->permissions->canPublishVenue)) : ?>
<td class="center">
<?php
if (!empty($row->params) && $row->params->get('access-change', false)) :
echo HTMLHelper::_('grid.id', $i, $row->id);
endif;
?>
</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; ?>
<td class="center">
<?php // Ensure icon is not clickable if user isn't allowed to change state!
$enabled = empty($this->print) && !empty($row->params) && $row->params->get('access-change', false);
echo HTMLHelper::_('jgrid.published', $row->published, $i, 'myvenues.', $enabled);
?>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
<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="boxchecked" value="0" />
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
<input type="hidden" name="option" value="com_jem" />
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>

View File

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

View File

@ -0,0 +1,45 @@
<?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;
?>
<div id="jem" class="jem_myvenues<?php echo $this->pageclass_sfx;?>">
<?php if ($this->needLoginFirst) {
$uri = Uri::getInstance();
$returnUrl = $uri->toString();
$urlLogin = 'index.php?option=com_users&view=login&return=' . base64_encode($returnUrl); ?>
<button class="btn btn-warning" onclick="location.href='<?php echo $uri->root() . $urlLogin; ?>'"
type="button"><?php echo Text::_('COM_JEM_LOGIN_TO_ACCESS'); ?></button>
<?php } else { ?>
<div class="buttons">
<?php
$btn_params = array('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; ?>
<!--table-->
<?php echo $this->loadTemplate('venues');?>
<!--footer-->
<div class="copyright">
<?php echo JEMOutput::footer( ); ?>
</div>
<?php } ?>
</div>

View File

@ -0,0 +1,201 @@
<?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;
?>
<?php if (!$this->params->get('show_page_heading', 1)) :
/* hide this if page heading is shown */ ?>
<h2><?php echo Text::_('COM_JEM_MY_VENUES'); ?></h2>
<?php endif; ?>
<style>
<?php if (!empty($this->jemsettings->tablewidth)) : ?>
#jem #adminForm {
width: <?php echo ($this->jemsettings->tablewidth); ?>;
}
<?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.jem_myvenues .jem-myvenues-check {
flex: 0 1%;
}
#jem.jem_myvenues .jem-myvenues-status {
flex: 0 1%;
}
</style>
<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>
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm" name="adminForm">
<?php if ($this->settings->get('global_show_filter',1) || $this->settings->get('global_display',1)) : ?>
<?php if ($this->settings->get('global_show_filter',1)) : ?>
<div id="jem_filter" class="floattext jem-form jem-row jem-justify-start">
<div>
<?php echo '<label for="filter">'.Text::_('COM_JEM_FILTER').'</label>'; ?>
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<?php echo $this->lists['filter']; ?>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search'];?>" class="inputbox form-control" onchange="document.adminForm.submit();" />
</div>
<div class="jem-row jem-justify-start jem-nowrap">
<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>
</div>
<?php if ($this->settings->get('global_display',1)) : ?>
<div class="jem-row jem-justify-start jem-nowrap">
<label for="limit"><?php echo Text::_('COM_JEM_DISPLAY_NUM'); ?></label>&nbsp;
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="jem-sort jem-sort-small">
<div class="jem-list-row jem-small-list">
<?php if (empty($this->print) && !empty($this->permissions->canPublishVenue)) : ?>
<div class="sectiontableheader jem-myvenues-check">
<input type="checkbox" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" />
</div>
<?php endif; ?>
<?php if ($this->jemsettings->showlocate == 1) : ?>
<div id="jem_location" class="sectiontableheader">&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">&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">&nbsp;<?php echo HTMLHelper::_('grid.sort', 'COM_JEM_TABLE_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></div>
<?php endif; ?>
<div class="jem-myvenues-status" ><?php echo Text::_('JSTATUS'); ?></div>
</div>
</div>
<ul class="eventlist">
<?php if (count((array)$this->venues) == 0) : ?>
<li class="jem-event"><?php echo Text::_('COM_JEM_NO_VENUES'); ?></li>
<?php else :?>
<?php foreach ($this->venues as $i => $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') . ' venue_id' . $this->escape($row->id); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
<?php else : ?>
<li class="jem-event jem-list-row jem-small-list jem-odd<?php echo ($i % 2) . $this->params->get('pageclass_sfx') . ' venue_id' . $this->escape($row->id); ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
<?php endif; ?>
<?php if (empty($this->print) && $this->permissions->canPublishVenue) : ?>
<div class="jem-event-info-small jem-myevents-check" >
<?php
if (!empty($row->params) && $row->params->get('access-change', false)) :
echo HTMLHelper::_('grid.id', $i, $row->id) . '&nbsp;';
endif;
?>
</div>
<?php endif; ?>
<?php if ($this->jemsettings->showlocate == 1) : ?>
<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 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; ?>
<div class="jem-event-info-small jem-myvenues-status">
<?php // Ensure icon is not clickable if user isn't allowed to change state!
$enabled = empty($this->print) && !empty($row->params) && $row->params->get('access-change', false);
echo HTMLHelper::_('jgrid.published', $row->published, $i, 'myvenues.', $enabled);
?>
</div>
</li>
<?php $i = 1 - $i; ?>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<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="boxchecked" value="0" />
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
<input type="hidden" name="option" value="com_jem" />
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>

View File

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

View File

@ -0,0 +1,175 @@
<?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;
/**
* View: MyVenues
*/
class JemViewMyvenues extends JemView
{
/**
* Creates the Myvenues View
*/
public function display($tpl = null)
{
// Get data from model
$venues = $this->get('Venues');
$pagination = $this->get('VenuesPagination');
// 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();
$user = JemFactory::getUser();
$userId = $user->get('id');
$pathway = $app->getPathWay();
$jinput = $app->input;
$print = $jinput->getBool('print', false);
$task = $jinput->getCmd('task', '');
// redirect if not logged in
$this->needLoginFirst = 0;
if (!$user->get('id')) {
$app->enqueueMessage(Text::_('COM_JEM_NEED_LOGGED_IN'), 'error');
$this->needLoginFirst=1;
}else {
// Decide which parameters should take priority
$useMenuItemParams = ($menuitem && $menuitem->query['option'] == 'com_jem'
&& $menuitem->query['view'] == 'myvenues');
// Load css
JemHelper::loadCss('jem');
JemHelper::loadCustomCss();
JemHelper::loadCustomTag();
if ($print) {
JemHelper::loadCss('print');
$document->setMetaData('robots', 'noindex, nofollow');
}
// are no venues available?
$novenues = (!$venues) ? 1 : 0;
// get variables
$filter_order = $app->getUserStateFromRequest('com_jem.myvenues.filter_order', 'filter_order', 'l.venue', 'cmd');
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.myvenues.filter_order_Dir', 'filter_order_Dir', '', 'word');
// $filter_state = $app->getUserStateFromRequest('com_jem.myvenues.filter_state', 'filter_state', '*', 'word');
$filter = $app->getUserStateFromRequest('com_jem.myvenues.filter', 'filter', 0, 'int');
$search = $app->getUserStateFromRequest('com_jem.myvenues.filter_search', 'filter_search', '', 'string');
// search filter
$filters = array();
// Workaround issue #557: Show venue name always.
$jemsettings->showlocate = 1;
//if ($jemsettings->showtitle == 1) {
// $filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_TITLE'));
//}
if ($jemsettings->showlocate == 1) {
$filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_VENUE'));
}
if ($jemsettings->showcity == 1) {
$filters[] = HTMLHelper::_('select.option', '3', Text::_('COM_JEM_CITY'));
}
//if ($jemsettings->showcat == 1) {
// $filters[] = HTMLHelper::_('select.option', '4', Text::_('COM_JEM_CATEGORY'));
//}
if ($jemsettings->showstate == 1) {
$filters[] = HTMLHelper::_('select.option', '5', Text::_('COM_JEM_STATE'));
}
$lists['filter'] = HTMLHelper::_('select.genericlist', $filters, 'filter', array('size' => '1', 'class' => 'form-select'), 'value', 'text', $filter);
// search filter
$lists['search'] = $search;
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// pathway
if ($menuitem) {
$pathwayKeys = array_keys($pathway->getPathway());
$lastPathwayEntryIndex = end($pathwayKeys);
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
//$pathway->setItemName(1, $menuitem->title);
}
// Set Page title
$pagetitle = Text::_('COM_JEM_MY_VENUES');
$pageheading = $pagetitle;
$pageclass_sfx = '';
// Check to see which parameters should take priority
if ($useMenuItemParams) {
// Menu item params take priority
$params->def('page_title', $menuitem->title);
$pagetitle = $params->get('page_title', Text::_('COM_JEM_MY_VENUES'));
$pageheading = $params->get('page_heading', $pagetitle);
$pageclass_sfx = $params->get('pageclass_sfx');
}
// ($task == 'archive') useless
$print_link = Route::_(JemHelperRoute::getMyVenuesRoute() . '&print=1&tmpl=component');
$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'));
}
$document->setTitle($pagetitle);
$document->setMetaData('title', $pagetitle);
// Should we show publish buttons?
$canPublishVenue = false;
foreach ($venues as $venue) {
$canPublishVenue |= $venue->params->get('access-change');
if ($canPublishVenue) break;
}
//Check if the user has permission to add things
$permissions = new stdClass();
$permissions->canAddEvent = $user->can('add', 'event');
$permissions->canAddVenue = $user->can('add', 'venue');
$permissions->canPublishVenue = $canPublishVenue;
$this->action = $uri->toString();
$this->venues = $venues;
$this->task = $task;
$this->print = $print;
$this->params = $params;
$this->pagination = $pagination;
$this->jemsettings = $jemsettings;
$this->settings = $settings;
$this->pagetitle = $pagetitle;
$this->lists = $lists;
$this->novenues = $novenues;
$this->permissions = $permissions;
$this->print_link = $print_link;
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
}
parent::display($tpl);
}
}
?>