primo commit
This commit is contained in:
1
components/com_jem/views/day/index.html
Normal file
1
components/com_jem/views/day/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
232
components/com_jem/views/day/tmpl/alternative/default_table.php
Normal file
232
components/com_jem/views/day/tmpl/alternative/default_table.php
Normal file
@ -0,0 +1,232 @@
|
||||
<?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']);
|
||||
?>
|
||||
|
||||
<?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'].' '; ?>
|
||||
<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->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// calculate span of columns to show, summary must be 12
|
||||
$default_span = array('date' => 2, 'title' => 3, 'venue' => 3, 'category' => 2, 'attendees' => 2);
|
||||
$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'];
|
||||
}
|
||||
if ($this->jemsettings->showatte == 1) {
|
||||
$a_span['attendees'] = $default_span['attendees'];
|
||||
}
|
||||
$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; ?>
|
||||
<?php if (array_key_exists('attendees', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['attendees']; ?>"><?php echo JText::_('COM_JEM_TABLE_ATTENDEES'); ?></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'); ?></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; ?>
|
||||
|
||||
<?php if (array_key_exists('attendees', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['attendees']; ?> users">
|
||||
<?php echo !empty($row->regCount) ? $this->escape($row->regCount) : '-'; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; /* noevents */ ?>
|
||||
</div>
|
||||
|
||||
65
components/com_jem/views/day/tmpl/default.php
Normal file
65
components/com_jem/views/day/tmpl/default.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?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_day<?php echo $this->pageclass_sfx;?>">
|
||||
<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; ?>
|
||||
|
||||
<div class="clr"> </div>
|
||||
|
||||
<?php if (isset($this->showdaydate)) : ?>
|
||||
<h2 class="jem">
|
||||
<?php echo $this->daydate; ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<?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 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="" />
|
||||
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
|
||||
<input type="hidden" name="view" value="day" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<?php if ($this->params->get('showfootertext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('footertext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--footer-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer( ); ?>
|
||||
</div>
|
||||
</div>
|
||||
85
components/com_jem/views/day/tmpl/default.xml
Normal file
85
components/com_jem/views/day/tmpl/default.xml
Normal file
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_JEM_DAY_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_JEM_DAY_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="days" type="text"
|
||||
default="0"
|
||||
size="2"
|
||||
label="COM_JEM_DAYS_FIELD"
|
||||
description="COM_JEM_DAYS_FIELD_DESC"
|
||||
/>
|
||||
|
||||
<field name="onlyfeatured" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_DISPLAY_FEATUREDONLY"
|
||||
description="COM_JEM_DISPLAY_FEATUREDONLY_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacer1" hr="true" />
|
||||
<field name="introtext" type="editor"
|
||||
filter="safehtml"
|
||||
hide="readmore,pagebreak,module,menu,fields,contact,article"
|
||||
default=""
|
||||
rows="8"
|
||||
cols="30"
|
||||
height="300px"
|
||||
label="COM_JEM_INTROTEXT_FIELD"
|
||||
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">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacer2" hr="true" />
|
||||
<field name="categoryswitch" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_CATEGORYSWITCH"
|
||||
description="COM_JEM_CATEGORYSWITCH_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">COM_JEM_INCLUDE</option>
|
||||
<option value="0">COM_JEM_EXCLUDE</option>
|
||||
</field>
|
||||
<field name="categoryswitchcats" type="text"
|
||||
default=""
|
||||
label="COM_JEM_CATEGORYSWITCHCATS"
|
||||
description="COM_JEM_CATEGORYSWITCHCATS_DESC"
|
||||
/>
|
||||
|
||||
<field type="spacer" name="spacer3" hr="true" />
|
||||
<field name="footertext" type="editor"
|
||||
filter="safehtml"
|
||||
hide="readmore,pagebreak,module,menu,fields,contact,article"
|
||||
default=""
|
||||
rows="8"
|
||||
cols="30"
|
||||
height="300px"
|
||||
label="COM_JEM_GLOBAL_FIELD_FOOTERTEXT"
|
||||
description="COM_JEM_GLOBAL_FIELD_FOOTERTEXT_DESC"
|
||||
/>
|
||||
<field name="showfootertext" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_GLOBAL_FIELD_SHOW_FOOTERTEXT"
|
||||
description="COM_JEM_GLOBAL_FIELD_SHOW_FOOTERTEXT_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
162
components/com_jem/views/day/tmpl/default_table.php
Normal file
162
components/com_jem/views/day/tmpl/default_table.php
Normal file
@ -0,0 +1,162 @@
|
||||
<?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>
|
||||
|
||||
<?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'].' '; ?>
|
||||
<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 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'); ?></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>
|
||||
1
components/com_jem/views/day/tmpl/index.html
Normal file
1
components/com_jem/views/day/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
65
components/com_jem/views/day/tmpl/responsive/default.php
Normal file
65
components/com_jem/views/day/tmpl/responsive/default.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?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_day<?php echo $this->pageclass_sfx;?>">
|
||||
<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; ?>
|
||||
|
||||
<div class="clr"> </div>
|
||||
|
||||
<?php if (isset($this->showdaydate)) : ?>
|
||||
<h2 class="jem">
|
||||
<?php echo $this->daydate; ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--introtext-->
|
||||
|
||||
<?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 echo $this->loadTemplate('events_table'); ?>
|
||||
<p>
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="" />
|
||||
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
|
||||
<input type="hidden" name="view" value="day" />
|
||||
</p>
|
||||
</form>
|
||||
<?php if ($this->params->get('showfootertext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('footertext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!--footer-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer( ); ?>
|
||||
</div>
|
||||
</div>
|
||||
1
components/com_jem/views/day/tmpl/responsive/index.html
Normal file
1
components/com_jem/views/day/tmpl/responsive/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
83
components/com_jem/views/day/view.feed.php
Normal file
83
components/com_jem/views/day/view.feed.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?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\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/**
|
||||
* Day-Feed
|
||||
*/
|
||||
class JemViewDay extends HtmlView
|
||||
{
|
||||
/**
|
||||
* Creates the Event Feed
|
||||
*/
|
||||
public function display($cachable = false, $urlparams = false)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$jemsettings = JemHelper::config();
|
||||
|
||||
// Get some data from the model
|
||||
$app->input->set('limit', $app->get('feed_limit'));
|
||||
$rows = $this->get('Items');
|
||||
|
||||
if (!empty($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
// strip html from feed item title
|
||||
$title = $this->escape($row->title);
|
||||
$title = html_entity_decode($title);
|
||||
|
||||
// strip html from feed item category
|
||||
if (!empty($row->categories)) {
|
||||
$category = array();
|
||||
foreach ($row->categories AS $category2) {
|
||||
$category[] = $category2->catname;
|
||||
}
|
||||
|
||||
// ading the , to the list when there are multiple category's
|
||||
$category = $this->escape(implode(', ', $category));
|
||||
$category = html_entity_decode($category);
|
||||
} else {
|
||||
$category = '';
|
||||
}
|
||||
|
||||
// Format date and time
|
||||
$displaydate = JemOutput::formatLongDateTime($row->dates, $row->times,$row->enddates, $row->endtimes, $jemsettings->showtime);
|
||||
|
||||
// url link to event
|
||||
$link = Route::_(JemHelperRoute::getEventRoute($row->id));
|
||||
|
||||
// feed item description text
|
||||
$description = Text::_('COM_JEM_TITLE').': '.$title.'<br />';
|
||||
$description .= Text::_('COM_JEM_VENUE').': '.$row->venue.($row->city ? (' / '.$row->city) : '').'<br />';
|
||||
$description .= Text::_('COM_JEM_CATEGORY').': '.$category.'<br />';
|
||||
$description .= Text::_('COM_JEM_DATE').': '.$displaydate.'<br />';
|
||||
$description .= Text::_('COM_JEM_DESCRIPTION').': '.$row->fulltext;
|
||||
|
||||
$created = ($row->created ? date('r', strtotime($row->created)) : '');
|
||||
|
||||
// load individual item creator class
|
||||
$item = new JFeedItem();
|
||||
$item->title = $title;
|
||||
$item->link = $link;
|
||||
$item->description = $description;
|
||||
$item->date = $created;
|
||||
$item->category = $category;
|
||||
|
||||
// loads item info into rss array
|
||||
$document->addItem($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
186
components/com_jem/views/day/view.html.php
Normal file
186
components/com_jem/views/day/view.html.php
Normal file
@ -0,0 +1,186 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Day-View
|
||||
*/
|
||||
class JemViewDay extends JemView
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
|
||||
// additional path for common templates + corresponding override path
|
||||
$this->addCommonTemplatePath();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the Day View
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Initialize variables
|
||||
$app = Factory::getApplication();
|
||||
$jemsettings = JemHelper::config();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$document = $app->getDocument();
|
||||
$params = $app->getParams();
|
||||
$uri = Uri::getInstance();
|
||||
$jinput = $app->input;
|
||||
$task = $jinput->getCmd('task', '');
|
||||
$print = $jinput->getBool('print', false);
|
||||
$pathway = $app->getPathWay();
|
||||
$user = JemFactory::getUser();
|
||||
$itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
|
||||
|
||||
// Decide which parameters should take priority
|
||||
$useMenuItemParams = ($menuitem && $menuitem->query['option'] == 'com_jem'
|
||||
&& $menuitem->query['view'] == 'day'
|
||||
&& !isset($menuitem->query['id']));
|
||||
|
||||
// Retrieving data
|
||||
$requestVenueId = $jinput->getInt('locid', 0);
|
||||
$requestCategoryId = $jinput->getInt('catid', 0);
|
||||
$requestDate = $jinput->getInt('id', 0);
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
if ($print) {
|
||||
JemHelper::loadCss('print');
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
// get variables
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.filter_order', 'filter_order', 'a.dates', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
$filter_type = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.filter_type', 'filter_type', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.day.'.$itemid.'.filter_search', 'filter_search', '', 'string');
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
// Get data from model
|
||||
$rows = $this->get('Items');
|
||||
$day = $this->get('Day');
|
||||
|
||||
$daydate = JemOutput::formatdate($day);
|
||||
$showdaydate = true; // show by default
|
||||
|
||||
// Are events available?
|
||||
$noevents = (!$rows) ? 1 : 0;
|
||||
|
||||
// Show page heading specified on menu item or TODAY as heading - idea taken from com_content.
|
||||
if ($useMenuItemParams) {
|
||||
$pagetitle = $params->get('page_title', $menuitem->title);
|
||||
$params->def('page_heading', $pagetitle);
|
||||
$pathwayKeys = array_keys($pathway->getPathway());
|
||||
$lastPathwayEntryIndex = end($pathwayKeys);
|
||||
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
|
||||
//$pathway->setItemName(1, $menuitem->title);
|
||||
} else {
|
||||
// TODO: If we can integrate $daydate into page_heading we should set $showdaydate to false.
|
||||
$pagetitle = Text::_('COM_JEM_DEFAULT_PAGE_TITLE_DAY');
|
||||
$params->set('page_heading', $pagetitle);
|
||||
$pathway->addItem($pagetitle);
|
||||
}
|
||||
$pageclass_sfx = $params->get('pageclass_sfx');
|
||||
|
||||
// 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);
|
||||
|
||||
if ($requestVenueId){
|
||||
$print_link = Route::_('index.php?option=com_jem&view=day&tmpl=component&print=1&locid='.$requestVenueId.'&id='.$requestDate);
|
||||
}
|
||||
elseif ($requestCategoryId){
|
||||
$print_link = Route::_('index.php?option=com_jem&view=day&tmpl=component&print=1&catid='.$requestCategoryId.'&id='.$requestDate);
|
||||
}
|
||||
else /*(!$requestCategoryId && !$requestVenueId)*/ {
|
||||
$print_link = Route::_('index.php?option=com_jem&view=day&tmpl=component&print=1&id='.$requestDate);
|
||||
}
|
||||
|
||||
// Check if the user has permission to add things
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddEvent = $user->can('add', 'event');
|
||||
$permissions->canAddVenue = $user->can('add', 'venue');
|
||||
|
||||
// add alternate feed link (w/o specific date)
|
||||
$link = 'index.php?option=com_jem&view=day&format=feed';
|
||||
$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
|
||||
$document->addHeadLink(Route::_($link.'&type=rss'), 'alternate', 'rel', $attribs);
|
||||
$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');
|
||||
$document->addHeadLink(Route::_($link.'&type=atom'), 'alternate', 'rel', $attribs);
|
||||
|
||||
// search filter
|
||||
$filters = array();
|
||||
|
||||
if ($jemsettings->showtitle == 1) {
|
||||
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_TITLE'));
|
||||
}
|
||||
if ($jemsettings->showlocate == 1 && !($requestVenueId)) {
|
||||
$filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_VENUE'));
|
||||
}
|
||||
if ($jemsettings->showcity == 1 && !($requestVenueId)) {
|
||||
$filters[] = HTMLHelper::_('select.option', '3', Text::_('COM_JEM_CITY'));
|
||||
}
|
||||
if ($jemsettings->showcat == 1 && !($requestCategoryId)) {
|
||||
$filters[] = HTMLHelper::_('select.option', '4', Text::_('COM_JEM_CATEGORY'));
|
||||
}
|
||||
if ($jemsettings->showstate == 1 && !($requestVenueId)) {
|
||||
$filters[] = HTMLHelper::_('select.option', '5', Text::_('COM_JEM_STATE'));
|
||||
}
|
||||
$lists['filter'] = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'form-select'), 'value', 'text', $filter_type);
|
||||
$lists['search'] = $search;
|
||||
|
||||
// Create the pagination object
|
||||
$pagination = $this->get('Pagination');
|
||||
|
||||
$this->lists = $lists;
|
||||
$this->rows = $rows;
|
||||
$this->noevents = $noevents;
|
||||
$this->print_link = $print_link;
|
||||
$this->params = $params;
|
||||
$this->dellink = $permissions->canAddEvent; // deprecated
|
||||
$this->pagination = $pagination;
|
||||
$this->action = $uri->toString();
|
||||
$this->task = $task;
|
||||
$this->jemsettings = $jemsettings;
|
||||
$this->settings = $settings;
|
||||
$this->permissions = $permissions;
|
||||
$this->daydate = $daydate;
|
||||
$this->showdaydate = $showdaydate; // if true daydate will be shown as h2 sub heading
|
||||
$this->pageclass_sfx =$pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
|
||||
// Doesn't really help - each view has less or more specific needs.
|
||||
//$this->prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user