primo commit
This commit is contained in:
1
components/com_jem/views/attendees/index.html
Normal file
1
components/com_jem/views/attendees/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
162
components/com_jem/views/attendees/tmpl/addusers.php
Normal file
162
components/com_jem/views/attendees/tmpl/addusers.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\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Form\Form;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectUsers');
|
||||
$checked = 0;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
// Get the form.
|
||||
Form::addFormPath(JPATH_COMPONENT . '/models/forms');
|
||||
$form = Form::getInstance('com_jem.addusers', 'addusers');
|
||||
|
||||
if (empty($form)) {
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
|
||||
<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>
|
||||
<script>
|
||||
function checkList(form)
|
||||
{
|
||||
var r='', i, n, e;
|
||||
for (i=0, n=form.elements.length; i<n; i++)
|
||||
{
|
||||
e = form.elements[i];
|
||||
if (e.type == 'checkbox' && e.id.indexOf('cb') === 0 && e.checked)
|
||||
{
|
||||
if (r) { r += ','; }
|
||||
r += e.value;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_select_users">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_USERS_AND_STATUS'); ?>
|
||||
</h1>
|
||||
|
||||
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=attendees&layout=addusers&tmpl=component&function='.$this->escape($function).'&id='.$this->event->id.'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<?php if(1) : ?>
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label> ';
|
||||
echo $this->searchfilter.' ';
|
||||
?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<div class="jem_fright">
|
||||
<?php
|
||||
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> ';
|
||||
echo $this->pagination->getLimitBox();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="eventtable table table-striped" style="width:100%" summary="jem">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="sectiontableheader"><?php echo Text::_('COM_JEM_NUM'); ?></th>
|
||||
<th width="1%" class="center"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></th>
|
||||
<th align="left" class="sectiontableheader"><?php echo Text::_('COM_JEM_NAME'); ?></th>
|
||||
<th width="10%" class="center"><?php echo Text::_('COM_JEM_STATUS'); ?></th>
|
||||
<th width="10%" class="center"><?php echo Text::_('COM_JEM_PLACES'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<tr align="center"><td colspan="0"><?php echo Text::_('COM_JEM_NOUSERS'); ?></td></tr>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
|
||||
<td class="center"><?php echo HTMLHelper::_('grid.id', $i, $row->id); ?></td>
|
||||
<td align="left"><?php echo $this->escape($row->name); ?></td>
|
||||
<td class="center"><?php echo jemhtml::toggleAttendanceStatus(0, $row->status, false); ?></td>
|
||||
<td class="center"><?php echo $this->escape($row->places); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
if($this->event->maxbookeduser != 0)
|
||||
{
|
||||
$placesavailableuser = $this->event->maxbookeduser;
|
||||
}else{
|
||||
$placesavailableuser= null;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="jem-row jem-justify-start valign-baseline">
|
||||
<div class="choose-status">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?> <?php echo $form->getLabel('status'); ?> <?php echo $form->getInput('status'); ?>
|
||||
</div>
|
||||
<div class="choose-places">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?> <?php echo Text::_('COM_JEM_PLACES'); ?>
|
||||
</div>
|
||||
<div style="padding-right:10px;">
|
||||
<input id="places" name="places" type="number" style="text-align: center; width:auto;" value="<?php echo $this->event->minbookeduser; ?>" max="<?php echo ($placesavailableuser > 0 ? $placesavailableuser : ($placesavailableuser ?? '')); ?>" min="<?php echo $this->event->minbookeduser; ?>">
|
||||
</div>
|
||||
<?php if ($this->event->recurrence_type && $this->event->seriesbooking): ?>
|
||||
<div class="choose-places">
|
||||
<?php echo Text::_('COM_JEM_SERIES_BOOKED').':'; ?>
|
||||
<input type="checkbox" id="seriesbooking" name="seriesbooking" />
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<input type="hidden" name="seriesbooking" value=-1 />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="selectusers" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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="<?php echo $checked; ?>" />
|
||||
</form>
|
||||
<div class="jem_fright">
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>_newusers(checkList(document.adminForm), document.adminForm.boxchecked.value, document.adminForm.status.value, document.adminForm.places.value, <?php echo $this->event->id; ?>, document.adminForm.seriesbooking.value, '<?php echo Session::getFormToken(); ?>');">
|
||||
<?php echo Text::_('COM_JEM_SAVE'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
</div>
|
||||
253
components/com_jem/views/attendees/tmpl/alternative/default.php
Normal file
253
components/com_jem/views/attendees/tmpl/alternative/default.php
Normal file
@ -0,0 +1,253 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.6
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2022 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');
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
$colspan = ($this->event->waitinglist ? 10 : 9);
|
||||
|
||||
$detaillink = JRoute::_(JemHelperRoute::getEventRoute($this->event->id.':'.$this->event->alias));
|
||||
|
||||
$namefield = $this->settings->get('global_regname', '1') ? 'name' : 'username';
|
||||
$namelabel = $this->settings->get('global_regname', '1') ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME';
|
||||
?>
|
||||
<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>
|
||||
<script type="text/javascript">
|
||||
function jSelectUsers_newusers(ids, count, status, eventid, token) {
|
||||
document.location.href = 'index.php?option=com_jem&task=attendees.attendeeadd&id='+eventid+'&status='+status+'&uids='+ids+'&'+token+'=1';
|
||||
SqueezeBox.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$sort_by = array();
|
||||
if ($this->settings->get('global_regname', '1')) {
|
||||
$sort_by[] = JHtml::_('select.option', 'u.name ASC', JText::_('COM_JEM_NAME') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'u.name DESC', JText::_('COM_JEM_NAME') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
} else {
|
||||
$sort_by[] = JHtml::_('select.option', 'u.username ASC', JText::_('COM_JEM_USERNAME') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'u.username DESC', JText::_('COM_JEM_USERNAME') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
}
|
||||
$sort_by[] = JHtml::_('select.option', 'r.uregdate ASC', JText::_('COM_JEM_REGDATE') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'r.uregdate DESC', JText::_('COM_JEM_REGDATE') . ' ' . JText::_('COM_JEM_ORDER_DESCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'r.status ASC', JText::_('COM_JEM_STATUS') . ' ' . JText::_('COM_JEM_ORDER_ASCENDING'));
|
||||
$sort_by[] = JHtml::_('select.option', 'r.status DESC', JText::_('COM_JEM_STATUS') . ' ' . 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" class="jem_attendees<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddUsers = true;
|
||||
$btn_params = array('print_link' => $this->print_link, 'id' => $this->event->id);
|
||||
echo JemOutput::createButtonBar($this->getName(), $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 ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo $this->escape($this->event->title); ?></h2>
|
||||
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div>
|
||||
<b><?php echo JText::_('COM_JEM_TITLE').':'; ?></b>
|
||||
<a href="<?php echo $detaillink ; ?>"><?php echo $this->escape($this->event->title); ?></a>
|
||||
<br />
|
||||
<b><?php echo JText::_('COM_JEM_DATE').':'; ?></b>
|
||||
<?php echo JemOutput::formatLongDateTime($this->event->dates, $this->event->times, $this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?>
|
||||
<?php
|
||||
$g_reg = $this->jemsettings->showfroregistra;
|
||||
$e_reg = $this->event->registra;
|
||||
if (($g_reg < 1) || (($g_reg == 2) && (($e_reg & 1) == 0))) :
|
||||
?>
|
||||
<br />
|
||||
<br />
|
||||
<b><?php echo JHtml::_('image', 'com_jem/icon-16-warning.png', null, 'class="icon-inline-left"', true) . JText::_('COM_JEM_REGISTRATION_DISABLED'); ?></b><br />
|
||||
<?php echo JText::_(($g_reg < 1) ? 'COM_JEM_REGISTRATION_DISABLED_GLOBAL_HINT' : 'COM_JEM_REGISTRATION_DISABLED_EVENT_HINT'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
|
||||
<div class="eventtable">
|
||||
<strong><i><?php echo JText::_('COM_JEM_ATTENDEES_EMPTY_YET'); ?></i></strong>
|
||||
</div>
|
||||
|
||||
<?php else : /* empty($this->rows) */ ?>
|
||||
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<label for="filter"><?php echo JText::_('COM_JEM_SEARCH'); ?></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>
|
||||
<div class="jem_fleft" style="white-space:nowrap;">
|
||||
<?php echo JText::_('COM_JEM_STATUS').' '.$this->lists['status']; ?>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<?php $del_link = 'index.php?option=com_jem&view=attendees&task=attendees.attendeeremove&id='.$this->event->id.(!empty($this->item->id)?'&Itemid='.$this->item->id:'').'&'.JSession::getFormToken().'=1'; ?>
|
||||
|
||||
<?php
|
||||
$default_span = array('number' => 1, 'user' => 2, 'email' => 2, 'date' => 2, 'status' => 1, 'comment' => 2, 'remove' => 2);
|
||||
$a_span = array('number' => $default_span['number'], 'user' => $default_span['user']); // always shown
|
||||
if ($this->enableemailaddress == 1) {
|
||||
$a_span['email'] = $default_span['email'];
|
||||
}
|
||||
$a_span['date'] = $default_span['date']; // always shown
|
||||
$a_span['status'] = $default_span['status']; // always shown
|
||||
if (!empty($this->jemsettings->regallowcomments)) {
|
||||
$a_span['comment'] = $default_span['comment'];
|
||||
}
|
||||
$a_span['remove'] = $default_span['remove']; // always shown
|
||||
$total = array_sum($a_span);
|
||||
while ($total < 12) {
|
||||
if (array_key_exists('comment', $a_span)) {
|
||||
++$a_span['comment'];
|
||||
++$total;
|
||||
}
|
||||
if ($total < 12 && ($a_span['date'] <= $default_span['date'])) {
|
||||
++$a_span['date'];
|
||||
++$total;
|
||||
}
|
||||
if (($total < 12) && array_key_exists('user', $a_span)) {
|
||||
++$a_span['user'];
|
||||
++$total;
|
||||
}
|
||||
if (($total < 12) && array_key_exists('email', $a_span)) {
|
||||
++$a_span['email'];
|
||||
++$total;
|
||||
}
|
||||
} // while
|
||||
?>
|
||||
<div class="eventtable">
|
||||
<div class="row-fluid sectiontableheader">
|
||||
<div class="span<?php echo $a_span['number']; ?>"><?php echo JText::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="span<?php echo $a_span['user']; ?>"><?php echo JText::_($namelabel); ?></div>
|
||||
<?php if (array_key_exists('email', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['email']; ?>"><?php echo JText::_('COM_JEM_EMAIL'); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="span<?php echo $a_span['date']; ?>"><?php echo JText::_('COM_JEM_REGDATE'); ?></div>
|
||||
<div class="span<?php echo $a_span['status']; ?>"><?php echo JText::_('COM_JEM_STATUS'); ?></div>
|
||||
<?php if (array_key_exists('comment', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['comment']; ?>"><?php echo JText::_('COM_JEM_COMMENT'); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="span<?php echo $a_span['remove']; ?>"><?php echo JText::_('COM_JEM_REMOVE_USER'); ?></div>
|
||||
</div>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<div class="row-fluid sectiontableentry<?php echo $this->params->get('pageclass_sfx'); ?>">
|
||||
<div class="span<?php echo $a_span['number']; ?> number"><?php echo $this->pagination->getRowOffset($i); ?></div>
|
||||
<div class="span<?php echo $a_span['user']; ?> user">
|
||||
<?php echo $row->$namefield; ?>
|
||||
</div>
|
||||
<?php if (array_key_exists('email', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['email']; ?> email">
|
||||
<a href="mailto:<?php echo $row->email; ?>"><?php echo $row->email; ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="span<?php echo $a_span['date']; ?> date">
|
||||
<?php if (!empty($row->uregdate)) { echo JHtml::_('date', $row->uregdate, JText::_('DATE_FORMAT_LC2')); } ?>
|
||||
</div>
|
||||
<div class="span<?php echo $a_span['status']; ?> status">
|
||||
<?php
|
||||
$status = (int)$row->status;
|
||||
if ($status === 1 && $row->waiting == 1) { $status = 2; }
|
||||
echo JHtml::_('jemhtml.toggleAttendanceStatus', $row->id, $status, true);
|
||||
?><span class="info-text"><?php
|
||||
echo JHtml::_('jemhtml.getAttendanceStatusText', $row->id, $status, false, true);
|
||||
?></span>
|
||||
</div>
|
||||
<?php if (array_key_exists('comment', $a_span)) : ?>
|
||||
<div class="span<?php echo $a_span['comment']; ?> comment">
|
||||
<?php $cmnt = (\Joomla\String\StringHelper::strlen($row->comment) > 16) ? (\Joomla\String\StringHelper::substr($row->comment, 0, 14).'…') : $row->comment; ?>
|
||||
<?php if (!empty($cmnt)) { echo JHtml::_('tooltip', $row->comment, null, null, $cmnt, null, null); } ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="span<?php echo $a_span['remove']; ?> remove">
|
||||
<a href="<?php echo JRoute::_($del_link.'&cid[]='.$row->id); ?>"><?php
|
||||
echo JHtml::_('image','com_jem/publish_r.png', JText::_('COM_JEM_ATTENDEES_DELETE'), array('title' => JText::_('COM_JEM_ATTENDEES_DELETE'), 'class' => (version_compare(JVERSION, '3.3', 'lt')) ? 'hasTip' : 'hasTooltip'), true);
|
||||
?></a><span class="info-text"><?php
|
||||
echo JText::_('COM_JEM_ATTENDEES_DELETE');
|
||||
?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php endif; /* empty($this->rows) */ ?>
|
||||
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="view" value="attendees" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->event->id; ?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->item->id;?>" />
|
||||
<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="enableemailaddress" value="<?php echo $this->enableemailaddress; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
188
components/com_jem/views/attendees/tmpl/default.php
Normal file
188
components/com_jem/views/attendees/tmpl/default.php
Normal file
@ -0,0 +1,188 @@
|
||||
<?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;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
$colspan = ($this->event->waitinglist ? 10 : 9);
|
||||
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($this->event->id.':'.$this->event->alias));
|
||||
|
||||
$namefield = $this->settings->get('global_regname', '1') ? 'name' : 'username';
|
||||
$namelabel = $this->settings->get('global_regname', '1') ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME';
|
||||
?>
|
||||
<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>
|
||||
<script>
|
||||
function jSelectUsers_newusers(ids, count, status, places, eventid, seriesbooking, token) {
|
||||
document.location.href = 'index.php?option=com_jem&task=attendees.attendeeadd&id='+eventid+'&status='+status+'&places='+places+'&uids='+ids+'&series='+seriesbooking+'&'+token+'=1';
|
||||
SqueezeBox.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_attendees<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddUsers = true;
|
||||
$btn_params = array('print_link' => $this->print_link, 'id' => $this->event->id);
|
||||
echo JemOutput::createButtonBar($this->getName(), $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 ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo $this->escape($this->event->title); ?></h2>
|
||||
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<table class="adminlist">
|
||||
<tr>
|
||||
<td width="80%">
|
||||
<b><?php echo Text::_('COM_JEM_TITLE').':'; ?></b>
|
||||
<a href="<?php echo $detaillink ; ?>"><?php echo $this->escape($this->event->title); ?></a> <?php echo $this->event->recurrence_type? '<i class="fa fa-fw fa-refresh jem-recurrenceicon"></i>':'' ;?>
|
||||
<br />
|
||||
<b><?php echo Text::_('COM_JEM_DATE').':'; ?></b> <?php
|
||||
echo JemOutput::formatLongDateTime($this->event->dates, $this->event->times, $this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
|
||||
<div class="eventtable">
|
||||
<strong><i><?php echo Text::_('COM_JEM_ATTENDEES_EMPTY_YET'); ?></i></strong>
|
||||
</div>
|
||||
|
||||
<?php else : /* empty($this->rows) */ ?>
|
||||
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<label for="filter"><?php echo Text::_('COM_JEM_SEARCH'); ?></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>
|
||||
<br><br><br>
|
||||
<div class="jem_fleft" style="white-space:nowrap;">
|
||||
<?php echo Text::_('COM_JEM_STATUS').' '.$this->lists['status']; ?>
|
||||
</div>
|
||||
<div class="jem_fright">
|
||||
<label for="limit"><?php echo Text::_('COM_JEM_DISPLAY_NUM'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $del_link = 'index.php?option=com_jem&view=attendees&task=attendees.attendeeremove&id='.$this->event->id.(!empty($this->item->id)?'&Itemid='.$this->item->id:'').'&'.Session::getFormToken().'=1'; ?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="eventtable table table-striped" style="margin: 20px 0 0 0;" id="articleList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="center"><?php echo Text::_('COM_JEM_NUM'); ?></th>
|
||||
<!--th width="1%" class="center"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></th-->
|
||||
<th class="title"><?php echo HTMLHelper::_('grid.sort', $namelabel, 'u.'.$namefield, $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_EMAIL'); ?></th>
|
||||
<?php endif; ?>
|
||||
<th class="title"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_REGDATE', 'r.uregdate', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<th class="center"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATUS', 'r.status', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<th class="center"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_PLACES', 'r.places', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_COMMENT'); ?></th>
|
||||
<?php endif;?>
|
||||
<th class="center"><?php echo Text::_('COM_JEM_REMOVE_USER'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="center"><?php echo $this->pagination->getRowOffset($i); ?></td>
|
||||
<!--td class="center"><?php echo HTMLHelper::_('grid.id', $i, $row->id); ?></td-->
|
||||
<td><?php echo $row->$namefield; ?></td>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<td><a href="mailto:<?php echo $row->email; ?>"><?php echo $row->email; ?></a></td>
|
||||
<?php endif; ?>
|
||||
<td><?php if (!empty($row->uregdate)) { echo HTMLHelper::_('date', $row->uregdate, Text::_('DATE_FORMAT_LC5')); } ?></td>
|
||||
<td class="center">
|
||||
<?php
|
||||
$status = (int)$row->status;
|
||||
if($this->event->waitinglist) {
|
||||
if ($status === 1 && $row->waiting == 1) { $status = 2; }
|
||||
echo jemhtml::toggleAttendanceStatus($row->id, $status, true);
|
||||
}else{
|
||||
echo jemhtml::toggleAttendanceStatus($row->id, $status, false);
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="center"><?php echo $row->places; ?></td>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<?php $cmnt = (\Joomla\String\StringHelper::strlen($row->comment) > 16) ? (\Joomla\String\StringHelper::substr($row->comment, 0, 14).'…') : $row->comment; ?>
|
||||
<td><?php if (!empty($cmnt)) { echo HTMLHelper::_('tooltip', $row->comment, null, null, $cmnt, null, null); } ?></td>
|
||||
<?php endif;?>
|
||||
<td class="center">
|
||||
<a href="<?php echo Route::_($del_link.'&cid[]='.$row->id); ?>">
|
||||
<?php echo JemOutput::removebutton(Text::_('COM_JEM_ATTENDEES_DELETE'), array('title' => Text::_('COM_JEM_ATTENDEES_DELETE'), 'class' => 'hasTooltip')); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php endif; /* empty($this->rows) */ ?>
|
||||
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="view" value="attendees" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->event->id; ?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->item->id;?>" />
|
||||
<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="enableemailaddress" value="<?php echo $this->enableemailaddress; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
1
components/com_jem/views/attendees/tmpl/index.html
Normal file
1
components/com_jem/views/attendees/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
97
components/com_jem/views/attendees/tmpl/print.php
Normal file
97
components/com_jem/views/attendees/tmpl/print.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?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;
|
||||
?>
|
||||
|
||||
<table class="table" style="width: 100%">
|
||||
<tr>
|
||||
<td class="sectionname" width="100%"><span
|
||||
style="color: #C24733; font-size: 18px; font-weight: bold;"><?php echo Text::_( 'COM_JEM_REGISTERED_USER' ); ?>
|
||||
</span>
|
||||
</td>
|
||||
<td><div class="button2-left">
|
||||
<div class="blank">
|
||||
<a href="#" onclick="window.print();return false;"><span class="icon icon-print"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table class="adminlist">
|
||||
<tr>
|
||||
<td align="left"><b><?php echo Text::_( 'COM_JEM_TITLE' ).':'; ?> </b> <?php echo $this->escape($this->event->title); ?><br />
|
||||
<b><?php echo Text::_( 'COM_JEM_DATE' ).':'; ?> </b> <?php echo JEMOutput::formatLongDateTime($this->event->dates, $this->event->times,
|
||||
$this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<?php $regname = $this->settings->get('global_regname', '1'); ?>
|
||||
<table class="table table-striped" id="articleList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_NUM' ); ?></th>
|
||||
<th class="title"><?php echo Text::_( $regname ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME' ); ?></th>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_EMAIL' ); ?></th>
|
||||
<?php endif; ?>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_REGDATE' ); ?></th>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_STATUS' ); ?></th>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_PLACES' ); ?></th>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_COMMENT'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$k = 0;
|
||||
$i = 0;
|
||||
foreach ($this->rows as $row) :
|
||||
?>
|
||||
<tr class="<?php echo "row$k"; ?>">
|
||||
<td><?php echo ++$i; ?></td>
|
||||
<td><?php echo $regname ? $row->name : $row->username; ?></td>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<td><?php echo $row->email; ?></td>
|
||||
<?php endif; ?>
|
||||
<td><?php if (!empty($row->uregdate)) { echo HTMLHelper::_('date', $row->uregdate, Text::_('DATE_FORMAT_LC5')); } ?></td>
|
||||
<?php
|
||||
switch ($row->status) :
|
||||
case -1: // explicitely unregistered
|
||||
$text = 'COM_JEM_ATTENDEES_NOT_ATTENDING';
|
||||
break;
|
||||
case 0: // invited, not answered yet
|
||||
$text = 'COM_JEM_ATTENDEES_INVITED';
|
||||
break;
|
||||
case 1: // registered
|
||||
$text = $row->waiting ? 'COM_JEM_ATTENDEES_ON_WAITINGLIST' : 'COM_JEM_ATTENDEES_ATTENDING';
|
||||
break;
|
||||
default: // oops...
|
||||
$text = 'COM_JEM_ATTENDEES_STATUS_UNKNOWN';
|
||||
break;
|
||||
endswitch; ?>
|
||||
<td><?php echo Text::_($text); ?></td>
|
||||
<td><?php echo $row->places; ?></td>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<td><?php echo $row->comment; ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php $k = 1 - $k;
|
||||
endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
186
components/com_jem/views/attendees/tmpl/responsive/addusers.php
Normal file
186
components/com_jem/views/attendees/tmpl/responsive/addusers.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\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\CMS\Form\Form;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectUsers');
|
||||
$checked = 0;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
// Get the form.
|
||||
Form::addFormPath(JPATH_COMPONENT . '/models/forms');
|
||||
$form = Form::getInstance('com_jem.addusers', 'addusers');
|
||||
|
||||
if (empty($form)) {
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
|
||||
<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>
|
||||
<script>
|
||||
function checkList(form)
|
||||
{
|
||||
var r='', i, n, e;
|
||||
for (i=0, n=form.elements.length; i<n; i++)
|
||||
{
|
||||
e = form.elements[i];
|
||||
if (e.type == 'checkbox' && e.id.indexOf('cb') === 0 && e.checked)
|
||||
{
|
||||
if (r) { r += ','; }
|
||||
r += e.value;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_select_users">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_USERS_AND_STATUS'); ?>
|
||||
</h1>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=attendees&layout=addusers&tmpl=component&function='.$this->escape($function).'&id='.$this->event->id.'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
|
||||
<?php if(1) : ?>
|
||||
<div class="jem-row valign-baseline">
|
||||
<div id="jem_filter" class="jem-form jem-row jem-justify-start">
|
||||
<div>
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>';
|
||||
?>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->searchfilter; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<div>
|
||||
<?php echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> '; ?>
|
||||
</div>
|
||||
<div> </div>
|
||||
<div>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<div class="jem-sort jem-sort-small">
|
||||
<div class="jem-list-row jem-small-list">
|
||||
<div class="sectiontableheader jem-users-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="sectiontableheader jem-users-checkall"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></div>
|
||||
<div class="sectiontableheader jem-users-name"><?php echo Text::_('COM_JEM_NAME'); ?></div>
|
||||
<div class="sectiontableheader jem-users-state"><?php echo Text::_('COM_JEM_STATUS'); ?></div>
|
||||
<div class="sectiontableheader jem-users-state"><?php echo Text::_('COM_JEM_PLACES'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist eventtable">
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list"><?php echo Text::_('COM_JEM_NOUSERS'); ?></li>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
|
||||
<div class="jem-event-info-small jem-users-number">
|
||||
<?php echo $this->pagination->getRowOffset( $i ); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-checkall">
|
||||
<?php echo HTMLHelper::_('grid.id', $i, $row->id); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-name">
|
||||
<?php echo $this->escape($row->name); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-state">
|
||||
<?php echo jemhtml::toggleAttendanceStatus( 0, $row->status, false); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-places">
|
||||
<?php echo $this->escape($row->places); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<?php
|
||||
if($this->event->maxbookeduser!=0)
|
||||
{
|
||||
$placesavailableuser = $this->event->maxbookeduser;
|
||||
}else{
|
||||
$placesavailableuser= null;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="jem-row jem-justify-start valign-baseline">
|
||||
<div class="choose-status">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?> <?php echo $form->getLabel('status'); ?> <?php echo $form->getInput('status'); ?>
|
||||
</div>
|
||||
<div class="choose-places">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?> <?php echo Text::_('COM_JEM_PLACES'); ?> <input id="places" name="places" type="number" style="text-align: center; width:auto;" value="<?php echo $this->event->minbookeduser; ?>" max="<?php echo ($placesavailableuser > 0 ? $placesavailableuser : ($placesavailableuser ?? '')); ?>" min="<?php echo $this->event->minbookeduser; ?>">
|
||||
</div>
|
||||
<?php if ($this->event->recurrence_type && $this->event->seriesbooking): ?>
|
||||
<div class="choose-places">
|
||||
<?php echo Text::_('COM_JEM_SERIES_BOOKED').':'; ?>
|
||||
<input type="checkbox" id="seriesbooking" name="seriesbooking" />
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<input type="hidden" name="seriesbooking" value=-1 />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="selectusers" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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="<?php echo $checked; ?>" />
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-row jem-justify-end">
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>_newusers(checkList(document.adminForm),document.adminForm.boxchecked.value,document.adminForm.status.value, document.adminForm.places.value, <?php echo $this->event->id; ?>, document.adminForm.seriesbooking.value, '<?php echo Session::getFormToken(); ?>');">
|
||||
<?php echo Text::_('COM_JEM_SAVE'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
216
components/com_jem/views/attendees/tmpl/responsive/default.php
Normal file
216
components/com_jem/views/attendees/tmpl/responsive/default.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?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;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
|
||||
$colspan = ($this->event->waitinglist ? 10 : 9);
|
||||
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($this->event->id.':'.$this->event->alias));
|
||||
|
||||
$namefield = $this->settings->get('global_regname', '1') ? 'name' : 'username';
|
||||
$namelabel = $this->settings->get('global_regname', '1') ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME';
|
||||
|
||||
?>
|
||||
<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>
|
||||
<script>
|
||||
function jSelectUsers_newusers(ids, count, status, places, eventid, seriesbooking, token) {
|
||||
document.location.href = 'index.php?option=com_jem&task=attendees.attendeeadd&id='+eventid+'&status='+status+'&places='+places+'&uids='+ids+'&series='+seriesbooking+'&'+token+'=1';
|
||||
SqueezeBox.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_attendees <?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddUsers = true;
|
||||
$btn_params = array('print_link' => $this->print_link, 'id' => $this->event->id);
|
||||
echo JemOutput::createButtonBar($this->getName(), $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 ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2><?php echo $this->escape($this->event->title); ?></h2>
|
||||
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<dl class="jem-dl">
|
||||
<dt class="jem-title"><?php echo Text::_('COM_JEM_TITLE').':'; ?></dt>
|
||||
<a href="<?php echo $detaillink ; ?>"><?php echo $this->escape($this->event->title); ?></a> <?php echo $this->event->recurrence_type? '<i class="fa fa-fw fa-refresh jem-recurrenceicon"></i>':'' ?>
|
||||
<dt class="jem-date"><?php echo Text::_('COM_JEM_DATE').':'; ?></dt>
|
||||
<dd class="jem-date">
|
||||
<?php echo JemOutput::formatLongDateTime($this->event->dates, $this->event->times, $this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<div id="jem_filter" class="jem-dl">
|
||||
<div class="row jem-row">
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="wauto-minwmax">
|
||||
<div class="input-group">
|
||||
<?php echo '<label for="filter_search">'.Text::_('COM_JEM_SEARCH').'</label>'; ?>
|
||||
<?php echo $this->lists['filter']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="row mb-12">
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group" style="margin-top:6px;">
|
||||
<?php echo '<label for="filter_status">'.Text::_('COM_JEM_STATUS').'</label>'; ?>
|
||||
<?php echo $this->lists['status']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="row ">
|
||||
<div class="wauto-minwmax">
|
||||
<div class=" float-end">
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<div style="padding-bottom: 8px;">
|
||||
<strong><i><?php echo Text::_('COM_JEM_ATTENDEES_EMPTY_YET'); ?></i></strong>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
<div class="jem-sort jem-sort-small" id="articleList">
|
||||
<div class="jem-list-row jem-small-list">
|
||||
<div class="sectiontableheader jem-attendee-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="sectiontableheader jem-attendee-name"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_USERNAME', 'u.'.$namefield, $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<?php if ($this->enableemailaddress == 1) :?>
|
||||
<div class="sectiontableheader jem-attendee-email"><?php echo Text::_('COM_JEM_EMAIL'); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="sectiontableheader jem-attendee-regdate"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_REGDATE', 'r.uregdate', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<div class="sectiontableheader jem-attendee-status"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATUS', 'r.status', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<div class="sectiontableheader jem-attendee-places"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_PLACES', 'r.places', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<div class="sectiontableheader jem-attendee-comment"><?php echo Text::_('COM_JEM_COMMENT'); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="sectiontableheader jem-attendee-remove"><?php echo Text::_('COM_JEM_REMOVE_USER'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist eventtable">
|
||||
<?php $del_link = 'index.php?option=com_jem&view=attendees&task=attendees.attendeeremove&id='.$this->event->id.(!empty($this->item->id)?'&Itemid='.$this->item->id:'').'&'.Session::getFormToken().'=1';
|
||||
?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
|
||||
<div class="jem-event-info-small jem-attendee-number">
|
||||
<?php echo $this->pagination->getRowOffset($i); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-attendee-name">
|
||||
<?php echo $row->$namefield; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->enableemailaddress == 1) :?>
|
||||
<div class="jem-event-info-small jem-attendee-email">
|
||||
<a href="mailto:<?php echo $row->email; ?>"><?php echo $row->email; ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="jem-event-info-small jem-attendee-regdate">
|
||||
<?php if (!empty($row->uregdate)) { echo HTMLHelper::_('date', $row->uregdate, Text::_('DATE_FORMAT_LC5')); } ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-attendee-status">
|
||||
<?php
|
||||
$status = (int)$row->status;
|
||||
if($this->event->waitinglist) {
|
||||
if ($status === 1 && $row->waiting == 1) { $status = 2; }
|
||||
echo jemhtml::toggleAttendanceStatus($row->id, $status, true);
|
||||
}else{
|
||||
echo jemhtml::toggleAttendanceStatus($row->id, $status, false);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="jem-event-info-small jem-attendee-places">
|
||||
<?php echo $row->places; ?>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<?php $cmnt = (\Joomla\String\StringHelper::strlen($row->comment) > 16) ? (\Joomla\String\StringHelper::substr($row->comment, 0, 14).'…') : $row->comment; ?>
|
||||
<div class="jem-event-info-small jem-attendee-comment">
|
||||
<?php if (!empty($cmnt)) { echo HTMLHelper::_('tooltip', $row->comment, null, null, $cmnt, null, null); } ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<div class="jem-event-info-small jem-attendee-remove">
|
||||
<div class="center">
|
||||
<a href="<?php echo Route::_($del_link.'&cid[]='.$row->id); ?>">
|
||||
<?php echo JemOutput::removebutton(Text::_('COM_JEM_ATTENDEES_DELETE'), array('title' => Text::_('COM_JEM_ATTENDEES_DELETE'), 'class' => 'hasTooltip')); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="view" value="attendees" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->event->id; ?>" />
|
||||
<input type="hidden" name="Itemid" value="<?php echo $this->item->id;?>" />
|
||||
<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="enableemailaddress" value="<?php echo $this->enableemailaddress; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
98
components/com_jem/views/attendees/tmpl/responsive/print.php
Normal file
98
components/com_jem/views/attendees/tmpl/responsive/print.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?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;
|
||||
?>
|
||||
|
||||
<table class="table" style="width: 100%">
|
||||
<tr>
|
||||
<td class="sectionname" width="100%"><span
|
||||
style="color: #C24733; font-size: 18px; font-weight: bold;"><?php echo Text::_( 'COM_JEM_REGISTERED_USER' ); ?>
|
||||
</span>
|
||||
</td>
|
||||
<td><div class="button2-left">
|
||||
<div class="blank">
|
||||
<a href="#" onclick="window.print();return false;"><span class="icon icon-print"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<table class="adminlist">
|
||||
<tr>
|
||||
<td align="left"><b><?php echo Text::_( 'COM_JEM_TITLE' ).':'; ?> </b> <?php echo $this->escape($this->event->title); ?><br />
|
||||
<b><?php echo Text::_( 'COM_JEM_DATE' ).':'; ?> </b> <?php echo JEMOutput::formatLongDateTime($this->event->dates, $this->event->times,
|
||||
$this->event->enddates, $this->event->endtimes, $this->settings->get('global_show_timedetails', 1)); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<?php $regname = $this->settings->get('global_regname', '1'); ?>
|
||||
<table class="table table-striped" id="articleList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_NUM' ); ?></th>
|
||||
<th class="title"><?php echo Text::_( $regname ? 'COM_JEM_NAME' : 'COM_JEM_USERNAME' ); ?></th>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_EMAIL' ); ?></th>
|
||||
<?php endif; ?>
|
||||
<th class="title"><?php echo Text::_( 'COM_JEM_REGDATE' ); ?></th>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_STATUS' ); ?></th>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_PLACES' ); ?></th>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<th class="title"><?php echo Text::_('COM_JEM_COMMENT'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$regname = $this->settings->get('global_regname', '1');
|
||||
$k = 0;
|
||||
$i = 0;
|
||||
foreach ($this->rows as $row) :
|
||||
?>
|
||||
<tr class="<?php echo "row$k"; ?>">
|
||||
<td><?php echo ++$i; ?></td>
|
||||
<td><?php echo $regname ? $row->name : $row->username; ?></td>
|
||||
<?php if ($this->enableemailaddress == 1) : ?>
|
||||
<td><?php echo $row->email; ?></td>
|
||||
<?php endif; ?>
|
||||
<td><?php if (!empty($row->uregdate)) { echo HTMLHelper::_('date', $row->uregdate, Text::_('DATE_FORMAT_LC5')); } ?></td>
|
||||
<?php
|
||||
switch ($row->status) :
|
||||
case -1: // explicitely unregistered
|
||||
$text = 'COM_JEM_ATTENDEES_NOT_ATTENDING';
|
||||
break;
|
||||
case 0: // invited, not answered yet
|
||||
$text = 'COM_JEM_ATTENDEES_INVITED';
|
||||
break;
|
||||
case 1: // registered
|
||||
$text = $row->waiting ? 'COM_JEM_ATTENDEES_ON_WAITINGLIST' : 'COM_JEM_ATTENDEES_ATTENDING';
|
||||
break;
|
||||
default: // oops...
|
||||
$text = 'COM_JEM_ATTENDEES_STATUS_UNKNOWN';
|
||||
break;
|
||||
endswitch; ?>
|
||||
<td><?php echo Text::_($text); ?></td>
|
||||
<td><?php echo $row->places; ?></td>
|
||||
<?php if (!empty($this->jemsettings->regallowcomments)) : ?>
|
||||
<td><?php echo (strlen($row->comment) > 256) ? (substr($row->comment, 0, 254).'…') : $row->comment; ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php $k = 1 - $k;
|
||||
endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
238
components/com_jem/views/attendees/view.html.php
Normal file
238
components/com_jem/views/attendees/view.html.php
Normal file
@ -0,0 +1,238 @@
|
||||
<?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\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/**
|
||||
* Attendees-view
|
||||
* @todo fix view
|
||||
*/
|
||||
class JemViewAttendees extends JemView
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
//redirect if not logged in
|
||||
if (!$user->get('id')) {
|
||||
$app->enqueueMessage(Text::_('COM_JEM_NEED_LOGGED_IN'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->settings = JemHelper::globalattribs();
|
||||
$this->jemsettings = JemHelper::config();
|
||||
|
||||
if ($this->getLayout() == 'print') {
|
||||
$this->_displayprint($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->getLayout() == 'addusers') {
|
||||
$this->returnto = base64_decode($app->input->get('return', '', 'base64'));
|
||||
$this->_displayaddusers($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
//initialise variables
|
||||
$document = $app->getDocument();
|
||||
$settings = $this->settings;
|
||||
$params = $app->getParams();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$uri = Uri::getInstance();
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
//get vars
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.attendees.filter_order', 'filter_order', 'u.username', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.attendees.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
$filter_status = $app->getUserStateFromRequest('com_jem.attendees.filter_status', 'filter_status', -2, 'int');
|
||||
$filter = $app->getUserStateFromRequest('com_jem.attendees.filter', 'filter', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.attendees.filter_search', 'filter_search', '', 'string');
|
||||
|
||||
// Get data from the model
|
||||
$rows = $this->get('Data');
|
||||
$pagination = $this->get('Pagination');
|
||||
$event = $this->get('Event');
|
||||
|
||||
// Merge params.
|
||||
// Because this view is not useable for menu item we always overwrite $params.
|
||||
$pagetitle = Text::_('COM_JEM_MYEVENT_MANAGEATTENDEES') . ' - ' . $event->title;
|
||||
$params->set('page_heading', Text::_('COM_JEM_MYEVENT_MANAGEATTENDEES')); // event title is shown separate
|
||||
//$params->set('show_page_heading', 1); // always show?
|
||||
$params->set('introtext', ''); // there can't be an introtext
|
||||
$params->set('showintrotext', 0);
|
||||
$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'));
|
||||
}
|
||||
|
||||
$document->setTitle($pagetitle);
|
||||
|
||||
$pathway = $app->getPathWay();
|
||||
if($menuitem) {
|
||||
//https://www.joomlaeventmanager.net/forum/jem-2-2-x-on-joomla-3/10474-category-name-doubled-in-breadcrumb
|
||||
$pathwayKeys = array_keys($pathway->getPathway()); //
|
||||
$lastPathwayEntryIndex = end($pathwayKeys);
|
||||
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
|
||||
//$pathway->setItemName(1, $menuitem->title);
|
||||
}
|
||||
$pathway->addItem('Att:'.$event->title);
|
||||
|
||||
// Emailaddress
|
||||
$enableemailaddress = $params->get('enableemailaddress', 0);
|
||||
|
||||
$print_link = 'index.php?option=com_jem&view=attendees&layout=print&task=print&tmpl=component&id='.$event->id;
|
||||
$backlink = 'attendees';
|
||||
|
||||
|
||||
//build filter selectlist
|
||||
$filters = array();
|
||||
if ($settings->get('global_regname', '1')) {
|
||||
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_NAME'));
|
||||
} else {
|
||||
$filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_USERNAME'));
|
||||
}
|
||||
$lists['filter'] = HTMLHelper::_('select.genericlist', $filters, 'filter', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter);
|
||||
|
||||
// search filter
|
||||
$lists['search'] = $search;
|
||||
|
||||
// attendee status
|
||||
$options = array(HTMLHelper::_('select.option', -2, Text::_('COM_JEM_ATT_FILTER_ALL')),
|
||||
HTMLHelper::_('select.option', 0, Text::_('COM_JEM_ATT_FILTER_INVITED')),
|
||||
HTMLHelper::_('select.option', -1, Text::_('COM_JEM_ATT_FILTER_NOT_ATTENDING')),
|
||||
HTMLHelper::_('select.option', 1, Text::_('COM_JEM_ATT_FILTER_ATTENDING')),
|
||||
HTMLHelper::_('select.option', 2, Text::_('COM_JEM_ATT_FILTER_WAITING'))) ;
|
||||
$lists['status'] = HTMLHelper::_('select.genericlist', $options, 'filter_status', array('class'=>'inputbox','onChange'=>'this.form.submit();'), 'value', 'text', $filter_status);
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
//assign to template
|
||||
$this->params = $params;
|
||||
$this->lists = $lists;
|
||||
$this->enableemailaddress = $enableemailaddress;
|
||||
$this->rows = $rows;
|
||||
$this->pagination = $pagination;
|
||||
$this->event = $event;
|
||||
$this->pagetitle = $pagetitle;
|
||||
$this->backlink = $backlink;
|
||||
$this->print_link = $print_link;
|
||||
$this->item = $menuitem;
|
||||
$this->action = $uri->toString();
|
||||
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the print screen
|
||||
*
|
||||
* @param $tpl
|
||||
*/
|
||||
protected function _displayprint($tpl = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$params = $app->getParams();
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('backend');
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCss('print');
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
|
||||
// Emailaddress
|
||||
$enableemailaddress = $params->get('enableemailaddress', 0);
|
||||
|
||||
$rows = $this->get('Data');
|
||||
$event = $this->get('Event');
|
||||
|
||||
//assign data to template
|
||||
$this->rows = $rows;
|
||||
$this->event = $event;
|
||||
$this->enableemailaddress = $enableemailaddress;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the output for the users select listing
|
||||
*/
|
||||
protected function _displayaddusers($tpl)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$jinput = $app->input;
|
||||
// $db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$model = $this->getModel();
|
||||
$event = $this->get('Event');
|
||||
|
||||
// no filters, hard-coded
|
||||
$filter_order = 'usr.name';
|
||||
$filter_order_Dir = '';
|
||||
$filter_type = '';
|
||||
$search = $app->getUserStateFromRequest('com_jem.selectusers.filter_search', 'filter_search', '', 'string');
|
||||
// $limitstart = $jinput->get('limitstart', '0', 'int');
|
||||
// $limit = $app->getUserStateFromRequest('com_jem.selectusers.limit', 'limit', $this->jemsettings->display_num, 'int');
|
||||
// $eventId = !empty($event->id) ? $event->id : 0;
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
|
||||
$document->setTitle(Text::_('COM_JEM_SELECT_USERS_AND_STATUS'));
|
||||
|
||||
// Get/Create the model
|
||||
// $model->setState('event.id', $eventId);
|
||||
$rows = $this->get('Users');
|
||||
$pagination = $this->get('UsersPagination');
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
//Build search filter - unused
|
||||
$filters = array();
|
||||
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_NAME'));
|
||||
$searchfilter = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
|
||||
|
||||
// search filter - unused
|
||||
$lists['search'] = $search;
|
||||
|
||||
//assign data to template
|
||||
$this->searchfilter = $searchfilter;
|
||||
$this->lists = $lists;
|
||||
$this->rows = $rows;
|
||||
$this->pagination = $pagination;
|
||||
$this->event = $event;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
235
components/com_jem/views/attendees/view.html.php.bak
Normal file
235
components/com_jem/views/attendees/view.html.php.bak
Normal file
@ -0,0 +1,235 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* Attendees-view
|
||||
* @todo fix view
|
||||
*/
|
||||
class JemViewAttendees extends JemView
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$user = JemFactory::getUser();
|
||||
|
||||
//redirect if not logged in
|
||||
if (!$user->get('id')) {
|
||||
$app->enqueueMessage(JText::_('COM_JEM_NEED_LOGGED_IN'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->settings = JemHelper::globalattribs();
|
||||
$this->jemsettings = JemHelper::config();
|
||||
|
||||
if ($this->getLayout() == 'print') {
|
||||
$this->_displayprint($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->getLayout() == 'addusers') {
|
||||
$this->returnto = base64_decode($app->input->get('return', '', 'base64'));
|
||||
$this->_displayaddusers($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
//initialise variables
|
||||
$document = JFactory::getDocument();
|
||||
$settings = $this->settings;
|
||||
$params = $app->getParams();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$uri = JFactory::getURI();
|
||||
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.modal', 'a.flyermodal');
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
//get vars
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.attendees.filter_order', 'filter_order', 'u.username', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.attendees.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
$filter_status = $app->getUserStateFromRequest('com_jem.attendees.filter_status', 'filter_status', -2, 'int');
|
||||
$filter = $app->getUserStateFromRequest('com_jem.attendees.filter', 'filter', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.attendees.filter_search', 'filter_search', '', 'string');
|
||||
|
||||
// Get data from the model
|
||||
$rows = $this->get('Data');
|
||||
$pagination = $this->get('Pagination');
|
||||
$event = $this->get('Event');
|
||||
|
||||
// Merge params.
|
||||
// Because this view is not useable for menu item we always overwrite $params.
|
||||
$pagetitle = JText::_('COM_JEM_MYEVENT_MANAGEATTENDEES') . ' - ' . $event->title;
|
||||
$params->set('page_heading', JText::_('COM_JEM_MYEVENT_MANAGEATTENDEES')); // event title is shown separate
|
||||
//$params->set('show_page_heading', 1); // always show?
|
||||
$params->set('introtext', ''); // there can't be an introtext
|
||||
$params->set('showintrotext', 0);
|
||||
$pageclass_sfx = $params->get('pageclass_sfx');
|
||||
|
||||
// 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'));
|
||||
}
|
||||
|
||||
$document->setTitle($pagetitle);
|
||||
|
||||
$pathway = $app->getPathWay();
|
||||
if($menuitem) {
|
||||
//https://www.joomlaeventmanager.net/forum/jem-2-2-x-on-joomla-3/10474-category-name-doubled-in-breadcrumb
|
||||
$pathwayKeys = array_keys($pathway->getPathway()); //
|
||||
$lastPathwayEntryIndex = end($pathwayKeys);
|
||||
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
|
||||
//$pathway->setItemName(1, $menuitem->title);
|
||||
}
|
||||
$pathway->addItem('Att:'.$event->title);
|
||||
|
||||
// Emailaddress
|
||||
$enableemailaddress = $params->get('enableemailaddress', 0);
|
||||
|
||||
$print_link = 'index.php?option=com_jem&view=attendees&layout=print&task=print&tmpl=component&id='.$event->id;
|
||||
$backlink = 'attendees';
|
||||
|
||||
|
||||
//build filter selectlist
|
||||
$filters = array();
|
||||
if ($settings->get('global_regname', '1')) {
|
||||
$filters[] = JHtml::_('select.option', '1', JText::_('COM_JEM_NAME'));
|
||||
} else {
|
||||
$filters[] = JHtml::_('select.option', '2', JText::_('COM_JEM_USERNAME'));
|
||||
}
|
||||
$lists['filter'] = JHtml::_('select.genericlist', $filters, 'filter', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter);
|
||||
|
||||
// search filter
|
||||
$lists['search'] = $search;
|
||||
|
||||
// attendee status
|
||||
$options = array(JHtml::_('select.option', -2, JText::_('COM_JEM_ATT_FILTER_ALL')),
|
||||
JHtml::_('select.option', 0, JText::_('COM_JEM_ATT_FILTER_INVITED')),
|
||||
JHtml::_('select.option', -1, JText::_('COM_JEM_ATT_FILTER_NOT_ATTENDING')),
|
||||
JHtml::_('select.option', 1, JText::_('COM_JEM_ATT_FILTER_ATTENDING')),
|
||||
JHtml::_('select.option', 2, JText::_('COM_JEM_ATT_FILTER_WAITING'))) ;
|
||||
$lists['status'] = JHtml::_('select.genericlist', $options, 'filter_status', array('class'=>'inputbox','onChange'=>'this.form.submit();'), 'value', 'text', $filter_status);
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
//assign to template
|
||||
$this->params = $params;
|
||||
$this->lists = $lists;
|
||||
$this->enableemailaddress = $enableemailaddress;
|
||||
$this->rows = $rows;
|
||||
$this->pagination = $pagination;
|
||||
$this->event = $event;
|
||||
$this->pagetitle = $pagetitle;
|
||||
$this->backlink = $backlink;
|
||||
$this->print_link = $print_link;
|
||||
$this->item = $menuitem;
|
||||
$this->action = $uri->toString();
|
||||
$this->pageclass_sfx = htmlspecialchars($pageclass_sfx);
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the print screen
|
||||
*
|
||||
* @param $tpl
|
||||
*/
|
||||
protected function _displayprint($tpl = null)
|
||||
{
|
||||
$document = JFactory::getDocument();
|
||||
$app = JFactory::getApplication();
|
||||
$params = $app->getParams();
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('backend');
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCss('print');
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
|
||||
// Emailaddress
|
||||
$enableemailaddress = $params->get('enableemailaddress', 0);
|
||||
|
||||
$rows = $this->get('Data');
|
||||
$event = $this->get('Event');
|
||||
|
||||
//assign data to template
|
||||
$this->rows = $rows;
|
||||
$this->event = $event;
|
||||
$this->enableemailaddress = $enableemailaddress;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the output for the users select listing
|
||||
*/
|
||||
protected function _displayaddusers($tpl)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$jinput = $app->input;
|
||||
// $db = JFactory::getDBO();
|
||||
$document = JFactory::getDocument();
|
||||
$model = $this->getModel();
|
||||
$event = $this->get('Event');
|
||||
|
||||
// no filters, hard-coded
|
||||
$filter_order = 'usr.name';
|
||||
$filter_order_Dir = '';
|
||||
$filter_type = '';
|
||||
$search = $app->getUserStateFromRequest('com_jem.selectusers.filter_search', 'filter_search', '', 'string');
|
||||
// $limitstart = $jinput->get('limitstart', '0', 'int');
|
||||
// $limit = $app->getUserStateFromRequest('com_jem.selectusers.limit', 'limit', $this->jemsettings->display_num, 'int');
|
||||
// $eventId = !empty($event->id) ? $event->id : 0;
|
||||
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.modal', 'a.flyermodal');
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
|
||||
$document->setTitle(JText::_('COM_JEM_SELECT_USERS_AND_STATUS'));
|
||||
|
||||
// Get/Create the model
|
||||
// $model->setState('event.id', $eventId);
|
||||
$rows = $this->get('Users');
|
||||
$pagination = $this->get('UsersPagination');
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
//Build search filter - unused
|
||||
$filters = array();
|
||||
$filters[] = JHtml::_('select.option', '1', JText::_('COM_JEM_NAME'));
|
||||
$searchfilter = JHtml::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
|
||||
|
||||
// search filter - unused
|
||||
$lists['search'] = $search;
|
||||
|
||||
//assign data to template
|
||||
$this->searchfilter = $searchfilter;
|
||||
$this->lists = $lists;
|
||||
$this->rows = $rows;
|
||||
$this->pagination = $pagination;
|
||||
$this->event = $event;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
1
components/com_jem/views/calendar/index.html
Normal file
1
components/com_jem/views/calendar/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
424
components/com_jem/views/calendar/tmpl/default.php
Normal file
424
components/com_jem/views/calendar/tmpl/default.php
Normal file
@ -0,0 +1,424 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
?>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'ical_link' => $this->ical_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day . $this->param_topcat);
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="catz" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$color = '<div id="eventcontenttop" class="eventcontenttop">';
|
||||
$color .= $colorpic;
|
||||
$color .= '</div>';
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor).'">';
|
||||
} else {
|
||||
$content .= '">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton();
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons">
|
||||
<div class="calendarButtonsToggle">
|
||||
<div id="buttonshowall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</div>
|
||||
<div id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons">
|
||||
<div class="calendarButtonsToggle">
|
||||
<div id="buttonshowall" class="btn btn-outline-dark me-2">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</div>
|
||||
<div id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends mt-4">
|
||||
<?php
|
||||
if ($displayLegend == 1) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark me-2" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
149
components/com_jem/views/calendar/tmpl/default.xml
Normal file
149
components/com_jem/views/calendar/tmpl/default.xml
Normal file
@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_JEM_CALENDAR_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_JEM_CALENDAR_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=""
|
||||
rows="8"
|
||||
cols="30"
|
||||
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">COM_JEM_SHOW</option>
|
||||
<option value="0">COM_JEM_HIDE</option>
|
||||
</field>
|
||||
<field type="spacer" name="myspacer2" hr="true" />
|
||||
<field name="show_archived_events" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOW_ARCHIVED_EVENTS"
|
||||
description="COM_JEM_SHOW_ARCHIVED_EVENTS_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="top_category" type="categories"
|
||||
default="0"
|
||||
label="COM_JEM_SELECT_TOP_CATEGORY"
|
||||
description="COM_JEM_SELECT_TOP_CATEGORY_DESC"
|
||||
/>
|
||||
<field name="displayLegend" type="list"
|
||||
default="1"
|
||||
label="COM_JEM_DISPLAY_LEGEND"
|
||||
description="COM_JEM_DISPLAY_LEGEND_DESC"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="2">COM_JEM_ABOVE</option>
|
||||
<option value="1">COM_JEM_BELOW</option>
|
||||
</field>
|
||||
<field name="show_only_start" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWONLYSTARTDAY"
|
||||
description="COM_JEM_SHOWONLYSTARTDAY_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="firstweekday" type="list"
|
||||
default="1"
|
||||
label="COM_JEM_SELECTFIRSTWEEKDAY"
|
||||
description="COM_JEM_SELECTFIRSTWEEKDAYDESC"
|
||||
>
|
||||
<option value="0">COM_JEM_SUNDAY</option>
|
||||
<option value="1">COM_JEM_MONDAY</option>
|
||||
</field>
|
||||
<field name="daylimit" type="text"
|
||||
default="10"
|
||||
label="COM_JEM_MAX_EVENTS_PER_DAY"
|
||||
description="COM_JEM_MAX_EVENTS_PER_DAY_DESC"
|
||||
/>
|
||||
<field name="show_addevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWADDEVENTICON"
|
||||
description="COM_JEM_SHOWADDEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="show_editevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWEDITEVENTICON"
|
||||
description="COM_JEM_SHOWEDITEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="show_copyevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWCOPYEVENTICON"
|
||||
description="COM_JEM_SHOWCOPYEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field type="spacer" name="myspacer3" hr="true" />
|
||||
<field name="eventlinkcolor" type="color"
|
||||
default="#000000"
|
||||
label="COM_JEM_CALENDAR_EVENTLINKCOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTLINKCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventbackgroundcolor" type="color"
|
||||
default="#FFFF00"
|
||||
label="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventbg_usecatcolor" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_CALENDAR_USECATCOLOR"
|
||||
description="COM_JEM_CALENDAR_USECATCOLOR_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="currentdaycolor" type="color"
|
||||
default="#CCCC99"
|
||||
label="COM_JEM_CALENDAR_CURRENTDAYCOLOR"
|
||||
description="COM_JEM_CALENDAR_CURRENTDAYCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventandmorecolor" type="color"
|
||||
default="#FFFF00"
|
||||
label="COM_JEM_CALENDAR_EVENTANDMORECOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTANDMORECOLOR_DESC"
|
||||
/>
|
||||
<field name="usefeaturedborder" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_CALENDAR_USEFEATUREDBORDER"
|
||||
description="COM_JEM_CALENDAR_USEFEATUREDBORDER_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="featuredbordercolor" type="color"
|
||||
default="#000080"
|
||||
label="COM_JEM_CALENDAR_FEATUREDBORDERCOLOR"
|
||||
description="COM_JEM_CALENDAR_FEATUREDBORDERCOLOR_DESC"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
1
components/com_jem/views/calendar/tmpl/index.html
Normal file
1
components/com_jem/views/calendar/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
425
components/com_jem/views/calendar/tmpl/responsive/default.php
Normal file
425
components/com_jem/views/calendar/tmpl/responsive/default.php
Normal file
@ -0,0 +1,425 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
?>
|
||||
|
||||
<style>
|
||||
td.today div.daynum::before,
|
||||
td.today div.daynum::after {
|
||||
background-color: <?php echo $this->params->get('currentdaycolor'); ?>;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'ical_link' => $this->ical_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day . $this->param_topcat);
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="catz" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$color = '<div id="eventcontenttop" class="eventcontenttop">';
|
||||
$color .= $colorpic;
|
||||
$color .= '</div>';
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = '<i class="fa fa-step-backward" aria-hidden="true"></i>';
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = '<i class="fas fa-arrows-alt-h"></i>';
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = '<i class="fa fa-step-forward" aria-hidden="true"></i>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor);
|
||||
$content .= '" onclick="location.href=\''.$detaillink.'\'">';
|
||||
} else {
|
||||
$content .= '" onclick="location.href=\''.$detaillink.'\'">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton();
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<button id="buttonshowall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
if ($displayLegend == 1) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
142
components/com_jem/views/calendar/view.html.php
Normal file
142
components/com_jem/views/calendar/view.html.php
Normal file
@ -0,0 +1,142 @@
|
||||
<?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\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
/**
|
||||
* Calendar-View
|
||||
*/
|
||||
class JemViewCalendar extends JemView
|
||||
{
|
||||
/**
|
||||
* Creates the Calendar View
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
|
||||
// initialize variables
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$jemsettings = JemHelper::config();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$params = $app->getParams();
|
||||
$top_category = (int)$params->get('top_category', 0);
|
||||
$jinput = $app->input;
|
||||
$print = $jinput->getBool('print', false);
|
||||
|
||||
$this->param_topcat = $top_category > 0 ? ('&topcat='.$top_category) : '';
|
||||
$url = Uri::root();
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCss('calendar');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
if ($print) {
|
||||
JemHelper::loadCss('print');
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
$evlinkcolor = $params->get('eventlinkcolor');
|
||||
$evbackgroundcolor = $params->get('eventbackgroundcolor');
|
||||
$currentdaycolor = $params->get('currentdaycolor');
|
||||
$eventandmorecolor = $params->get('eventandmorecolor');
|
||||
|
||||
$style = '
|
||||
div#jem .eventcontentinner a,
|
||||
div#jem .eventandmore a {
|
||||
color:' . $evlinkcolor . ';
|
||||
}
|
||||
.eventcontentinner {
|
||||
background-color:'.$evbackgroundcolor .';
|
||||
}
|
||||
.eventandmore {
|
||||
background-color:'.$eventandmorecolor .';
|
||||
}
|
||||
|
||||
.today .daynum {
|
||||
background-color:'.$currentdaycolor.';
|
||||
}';
|
||||
|
||||
$document->addStyleDeclaration($style);
|
||||
$document->addScript($url.'media/com_jem/js/calendar.js');
|
||||
|
||||
$year = (int)$jinput->getInt('yearID', date("Y"));
|
||||
$month = (int)$jinput->getInt('monthID', date("m"));
|
||||
|
||||
// get data from model and set the month
|
||||
$model = $this->getModel();
|
||||
$model->setDate(mktime(0, 0, 1, $month, 1, $year));
|
||||
|
||||
$rows = $this->get('Items');
|
||||
|
||||
// Set Page title
|
||||
$pagetitle = $params->def('page_title', $menuitem->title);
|
||||
$params->def('page_heading', $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'));
|
||||
}
|
||||
|
||||
$document->setTitle($pagetitle);
|
||||
$document->setMetaData('title', $pagetitle);
|
||||
|
||||
// Check if the user has permission to add things
|
||||
$permissions = new stdClass();
|
||||
$catIds = $model->getCategories('all');
|
||||
$permissions->canAddEvent = $user->can('add', 'event', false, false, $catIds);
|
||||
$permissions->canAddVenue = $user->can('add', 'venue', false, false, $catIds);
|
||||
|
||||
$itemid = $jinput->getInt('Itemid', 0);
|
||||
|
||||
$partItemid = ($itemid > 0) ? '&Itemid=' . $itemid : '';
|
||||
$partDate = ($year ? ('&yearID=' . $year) : '') . ($month ? ('&monthID=' . $month) : '');
|
||||
$url_base = 'index.php?option=com_jem&view=calendar';
|
||||
|
||||
$print_link = Route::_($url_base . $partItemid. $partDate . '&print=1&tmpl=component');
|
||||
$ical_link = $partDate;
|
||||
//http://localhost/jl500rc2/index.php/jem/calendar?format=raw&layout=ics
|
||||
|
||||
// init calendar
|
||||
$cal = new JemCalendar($year, $month, 0);
|
||||
$cal->enableMonthNav($url_base . ($print ? '&print=1&tmpl=component' : ''));
|
||||
$cal->setFirstWeekDay($params->get('firstweekday', 1));
|
||||
$cal->enableDayLinks('index.php?option=com_jem&view=day' . $this->param_topcat);
|
||||
|
||||
$this->rows = $rows;
|
||||
$this->catIds = $catIds;
|
||||
$this->params = $params;
|
||||
$this->jemsettings = $jemsettings;
|
||||
$this->settings = $settings;
|
||||
$this->permissions = $permissions;
|
||||
$this->cal = $cal;
|
||||
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
$this->print_link = $print_link;
|
||||
$this->print = $print;
|
||||
$this->ical_link = $ical_link;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
55
components/com_jem/views/calendar/view.raw.php
Normal file
55
components/com_jem/views/calendar/view.raw.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?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\MVC\View\HtmlView;
|
||||
|
||||
/**
|
||||
* Raw: Calendar
|
||||
*/
|
||||
class JemViewCalendar extends HtmlView
|
||||
{
|
||||
/**
|
||||
* Creates the output for the Calendar view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$settings = JemHelper::config();
|
||||
$settings2 = JemHelper::globalattribs();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
|
||||
$year = (int)$jinput->getInt('yearID', date("Y"));
|
||||
$month = (int)$jinput->getInt('monthID', date("m"));
|
||||
|
||||
if ($settings2->get('global_show_ical_icon','0')==1) {
|
||||
// Get data from the model
|
||||
$model = $this->getModel();
|
||||
$model->setState('list.start',0);
|
||||
$model->setState('list.limit',$settings->ical_max_items);
|
||||
$model->setDate(mktime(0, 0, 1, $month, 1, $year));
|
||||
|
||||
$rows = $model->getItems();
|
||||
|
||||
// initiate new CALENDAR
|
||||
$vcal = JemHelper::getCalendarTool();
|
||||
$vcal->setConfig("filename", "events_month_". $year . $month . ".ics");
|
||||
|
||||
if (!empty($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
JemHelper::icalAddEvent($vcal, $row);
|
||||
}
|
||||
}
|
||||
|
||||
// generate and redirect output to user browser
|
||||
$vcal->returnCalendar();
|
||||
}
|
||||
}
|
||||
}
|
||||
1
components/com_jem/views/categories/index.html
Normal file
1
components/com_jem/views/categories/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,154 @@
|
||||
<?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;
|
||||
?>
|
||||
|
||||
<?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 (0 && $this->jemsettings->showcat == 1) { // doesn't make sense
|
||||
$a_span['category'] = $default_span['category'];
|
||||
}
|
||||
if (0 && $this->jemsettings->showatte == 1) { // never shown here
|
||||
$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->catrow->events)) : ?>
|
||||
<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->catrow->events 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>
|
||||
|
||||
98
components/com_jem/views/categories/tmpl/default.php
Normal file
98
components/com_jem/views/categories/tmpl/default.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?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;
|
||||
|
||||
?>
|
||||
<div id="jem" class="jem_categories<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('id' => $this->id, 'task' => $this->task, 'print_link' => $this->print_link, 'archive_link' => $this->archive_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->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 foreach ($this->rows as $row) : ?>
|
||||
<div class="jem cat_id<?php echo $row->id; ?>">
|
||||
<h2>
|
||||
<?php echo HTMLHelper::_('link', Route::_($row->linktarget), $this->escape($row->catname)); ?>
|
||||
</h2>
|
||||
|
||||
<div class="floattext">
|
||||
<?php if ($this->jemsettings->discatheader) { ?>
|
||||
<div class="catimg">
|
||||
<?php // flyer
|
||||
if (empty($row->image)) {
|
||||
$jemsettings = JemHelper::config();
|
||||
$imgattribs['width'] = $jemsettings->imagewidth;
|
||||
$imgattribs['height'] = $jemsettings->imagehight;
|
||||
|
||||
echo HTMLHelper::_('image', 'com_jem/noimage.png', $row->catname, $imgattribs, true);
|
||||
} else {
|
||||
$cimage = JemImage::flyercreator($row->image, 'category');
|
||||
echo JemOutput::flyer($row, $cimage, 'category');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="description cat<?php echo $row->id; ?>">
|
||||
<?php echo $row->description; ?>
|
||||
<p>
|
||||
<?php echo HTMLHelper::_('link', Route::_($row->linktarget), $row->linktext); ?>
|
||||
(<?php echo $row->assignedevents ? $row->assignedevents : '0'; ?>)
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($i = count($row->subcats)) : ?>
|
||||
<div class="subcategories">
|
||||
<?php echo Text::_('COM_JEM_SUBCATEGORIES'); ?>
|
||||
</div>
|
||||
<div class="subcategorieslist">
|
||||
<?php foreach ($row->subcats as $sub) : ?>
|
||||
<strong>
|
||||
<a href="<?php echo Route::_(JemHelperRoute::getCategoryRoute($sub->slug, $this->task)); ?>">
|
||||
<?php echo $this->escape($sub->catname); ?></a>
|
||||
</strong> <?php echo '(' . ($sub->assignedevents != null ? $sub->assignedevents : 0) . (--$i ? '),' : ')'); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--table-->
|
||||
<?php
|
||||
if ($this->params->get('detcat_nr', 0) > 0) {
|
||||
$this->catrow = $row;
|
||||
echo $this->loadTemplate('table');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<!--pagination-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<!--copyright-->
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer( ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
65
components/com_jem/views/categories/tmpl/default.xml
Normal file
65
components/com_jem/views/categories/tmpl/default.xml
Normal file
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_JEM_CATEGORIES_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_JEM_CATEGORIES_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
addfieldpath="/administrator/components/com_jem/models/fields"
|
||||
>
|
||||
<field name="id" type="categories"
|
||||
default="1"
|
||||
label="COM_JEM_SELECTTOPCAT"
|
||||
description="COM_JEM_SELECTTOPCATDESC"
|
||||
required="false"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="showemptycats" type="radio"
|
||||
default="1"
|
||||
label="COM_JEM_SHOWEMPTYCATS"
|
||||
description="COM_JEM_SHOWEMPTYCATSDESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="cat_num" type="text"
|
||||
size="2"
|
||||
default="4"
|
||||
label="COM_JEM_CAT_DISPLAY"
|
||||
description="COM_JEM_CAT_DISPLAY_DESC"
|
||||
/>
|
||||
<field name="detcat_nr" type="text"
|
||||
size="1"
|
||||
default="3"
|
||||
label="COM_JEM_DET_CATEGORIES_PREVIEW"
|
||||
description="COM_JEM_DET_CATEGORIES_PREVIEW_DESC"
|
||||
/>
|
||||
<field name="usecat" type="radio"
|
||||
default="1"
|
||||
label="COM_JEM_DISPLAYCHILDS"
|
||||
description="COM_JEM_DISPLAYCHILDSDESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="showemptychilds" type="radio"
|
||||
default="1"
|
||||
label="COM_JEM_SHOWEMPTYCHILD"
|
||||
description="COM_JEM_SHOWEMPTYCHILDDESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
129
components/com_jem/views/categories/tmpl/default_table.php
Normal file
129
components/com_jem/views/categories/tmpl/default_table.php
Normal file
@ -0,0 +1,129 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
?>
|
||||
|
||||
<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_cat<?php echo $this->catrow->id; ?>" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_TABLE_DATE'); ?></th>
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<th id="jem_title_cat<?php echo $this->catrow->id; ?>" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_TABLE_TITLE'); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showlocate == 1) : ?>
|
||||
<th id="jem_location_cat<?php echo $this->catrow->id; ?>" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_TABLE_LOCATION'); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<th id="jem_city_cat<?php echo $this->catrow->id; ?>" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_TABLE_CITY'); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<th id="jem_state_cat<?php echo $this->catrow->id; ?>" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_TABLE_STATE'); ?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<th id="jem_category_cat<?php echo $this->catrow->id; ?>" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_TABLE_CATEGORY'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php if (empty($this->catrow->events)) : ?>
|
||||
<tr class="no_events"><td colspan="20"><?php echo Text::_('COM_JEM_NO_EVENTS'); ?></td></tr>
|
||||
<?php else : ?>
|
||||
<?php $odd = 0; ?>
|
||||
<?php foreach ($this->catrow->events as $row) : ?>
|
||||
<?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') . ' event_id' . $row->id; ?>" itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
<?php endif; ?>
|
||||
|
||||
<td headers="jem_date_cat<?php echo $this->catrow->id; ?>" 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_cat<?php echo $this->catrow->id; ?>" 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_cat<?php echo $this->catrow->id; ?>" 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_cat<?php echo $this->catrow->id; ?>" 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_cat<?php echo $this->catrow->id; ?>" 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_cat<?php echo $this->catrow->id; ?>" 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_cat<?php echo $this->catrow->id; ?>" align="left" valign="top">
|
||||
<?php echo implode(", ", JemOutput::getCategoryList($row->categories, $this->jemsettings->catlinklist)); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php $odd = 1 - $odd; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
1
components/com_jem/views/categories/tmpl/index.html
Normal file
1
components/com_jem/views/categories/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
107
components/com_jem/views/categories/tmpl/responsive/default.php
Normal file
107
components/com_jem/views/categories/tmpl/responsive/default.php
Normal file
@ -0,0 +1,107 @@
|
||||
<?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;
|
||||
?>
|
||||
<div id="jem" class="jem_categories<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('id' => $this->id, 'task' => $this->task, 'print_link' => $this->print_link, 'archive_link' => $this->archive_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ($this->rows as $row) : ?>
|
||||
<div class="jem cat_id<?php echo $row->id; ?>">
|
||||
<h2>
|
||||
<?php echo HTMLHelper::_('link', Route::_($row->linktarget), $this->escape($row->catname)); ?>
|
||||
</h2>
|
||||
|
||||
<?php if (($this->jemsettings->discatheader) && (!empty($row->image))) : ?>
|
||||
<div class="jem-catimg">
|
||||
<?php $cimage = JemImage::flyercreator($row->image, 'category'); ?>
|
||||
<?php echo JemOutput::flyer($row, $cimage, 'category'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="description">
|
||||
<?php echo $row->description; ?>
|
||||
<?php if ($i = count($row->subcats)) : ?>
|
||||
<h3 class="subcategories">
|
||||
<?php echo Text::_('COM_JEM_SUBCATEGORIES'); ?>
|
||||
</h3>
|
||||
<div class="subcategorieslist">
|
||||
<?php foreach ($row->subcats as $sub) : ?>
|
||||
<strong>
|
||||
<a href="<?php echo Route::_(JemHelperRoute::getCategoryRoute($sub->slug, $this->task)); ?>">
|
||||
<?php echo $this->escape($sub->catname); ?></a>
|
||||
</strong> <?php echo '(' . ($sub->assignedevents != null ? $sub->assignedevents : 0) . (--$i ? '),' : ')'); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-clear">
|
||||
</div>
|
||||
|
||||
<!--table-->
|
||||
<?php
|
||||
if ($this->params->get('detcat_nr', 0) > 0) {
|
||||
$this->catrow = $row;
|
||||
echo '<h3>'.TEXT::_('COM_JEM_EVENTS').'</h3>';
|
||||
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;
|
||||
}
|
||||
?>
|
||||
<div class="jem-readmore">
|
||||
<a href="<?php echo Route::_($row->linktarget); ?>" title="<?php echo Text::_('COM_JEM_CALENDAR_SHOWALL'); ?>">
|
||||
<button class="buttonfilter btn">
|
||||
<?php echo Text::_('COM_JEM_CALENDAR_SHOWALL') ?>
|
||||
<?php if ($row->assignedevents > 1) :
|
||||
echo ' - '.$row->assignedevents.' '.TEXT::_('COM_JEM_EVENTS');
|
||||
elseif ($row->assignedevents == 1) :
|
||||
echo ' - '.$row->assignedevents.' '.TEXT::_('COM_JEM_EVENT');
|
||||
else :
|
||||
echo '- 0 '.TEXT::_('COM_JEM_EVENTS');
|
||||
endif;
|
||||
?>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($row !== end($this->rows)) :
|
||||
echo '<hr class="jem-hr">';
|
||||
endif;
|
||||
|
||||
endforeach; ?>
|
||||
|
||||
<!--pagination-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<!--copyright-->
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer( ); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,249 @@
|
||||
<?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\Router\Route;
|
||||
|
||||
$uri = Uri::getInstance();
|
||||
if (empty($this->catrow->events)) { return; }
|
||||
?>
|
||||
|
||||
<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 (empty($this->catrow->events)) : ?>
|
||||
<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 foreach ($this->catrow->events as $row) : ?>
|
||||
<?php if (!empty($row->featured)) : ?>
|
||||
<li class="jem-event jem-row jem-justify-start 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 : ?>
|
||||
<?php $odd = 0; ?>
|
||||
<li class="jem-event jem-row jem-justify-start jem-odd<?php echo ($odd +1) . ' event_id' . $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 endif; ?>
|
||||
|
||||
<?php if (($this->jemsettings->showeventimage == 1) && (!empty($row->datimage))): ?>
|
||||
<div headers="jem_eventimage" class="jem-list-img" >
|
||||
<?php
|
||||
$dimage = JemImage::flyercreator($row->datimage, 'event');
|
||||
echo JemOutput::flyer($row, $dimage, 'event');
|
||||
?>
|
||||
</div>
|
||||
<?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); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (($this->jemsettings->showlocate == 1) && (!empty($row->locid))) : ?>
|
||||
<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) : ?>
|
||||
<?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>
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
@ -0,0 +1,232 @@
|
||||
<?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\Router\Route;
|
||||
|
||||
$uri = Uri::getInstance();
|
||||
if (empty($this->catrow->events)) { return; }
|
||||
?>
|
||||
|
||||
<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 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> <?php echo Text::_('COM_JEM_TABLE_DATE'); ?></div>
|
||||
<?php if ($this->jemsettings->showtitle == 1) : ?>
|
||||
<div id="jem_title" class="sectiontableheader"><i class="fa fa-comment" aria-hidden="true"></i> <?php echo Text::_('COM_JEM_TABLE_TITLE'); ?></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> <?php echo Text::_('COM_JEM_TABLE_LOCATION'); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcity == 1) : ?>
|
||||
<div id="jem_city" class="sectiontableheader"><i class="fa fa-building" aria-hidden="true"></i> <?php echo Text::_('COM_JEM_TABLE_CITY'); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showstate == 1) : ?>
|
||||
<div id="jem_state" class="sectiontableheader"><i class="fa fa-map" aria-hidden="true"></i> <?php echo Text::_('COM_JEM_TABLE_STATE'); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->jemsettings->showcat == 1) : ?>
|
||||
<div id="jem_category" class="sectiontableheader"><i class="fa fa-tag" aria-hidden="true"></i> <?php echo Text::_('COM_JEM_TABLE_CATEGORY'); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist">
|
||||
<?php if (empty($this->catrow->events)) : ?>
|
||||
<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 foreach ($this->catrow->events 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 jem-odd<?php echo ($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->locid)) : ?>
|
||||
<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) : ?>
|
||||
<?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>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
121
components/com_jem/views/categories/view.html.php
Normal file
121
components/com_jem/views/categories/view.html.php
Normal file
@ -0,0 +1,121 @@
|
||||
<?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;
|
||||
/**
|
||||
* Categories-View
|
||||
*/
|
||||
class JemViewCategories extends JemView
|
||||
{
|
||||
/**
|
||||
* Creates the Categories-View
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$document = $app->getDocument();
|
||||
$jemsettings = JemHelper::config();
|
||||
$user = JemFactory::getUser();
|
||||
$print = $app->input->getBool('print', false);
|
||||
$task = $app->input->getCmd('task', '');
|
||||
$id = $app->input->getInt('id', 1);
|
||||
$model = $this->getModel();
|
||||
$uri = Uri::getInstance();
|
||||
$rows = $this->get('Data');
|
||||
$pagination = $this->get('Pagination');
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
if ($print) {
|
||||
JemHelper::loadCss('print');
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
// get menu information
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$params = $app->getParams('com_jem');
|
||||
|
||||
$pagetitle = $params->def('page_title', $menuitem->title);
|
||||
$pageheading = $params->def('page_heading', $params->get('page_title'));
|
||||
$pageclass_sfx = $params->get('pageclass_sfx');
|
||||
|
||||
// pathway
|
||||
$pathway = $app->getPathWay();
|
||||
if ($menuitem) {
|
||||
$pathwayKeys = array_keys($pathway->getPathway());
|
||||
$lastPathwayEntryIndex = end($pathwayKeys);
|
||||
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
|
||||
//$pathway->setItemName(1, $menuitem->title);
|
||||
}
|
||||
|
||||
if ($task == 'archive') {
|
||||
$pathway->addItem(Text::_('COM_JEM_ARCHIVE'), Route::_('index.php?option=com_jem&view=categories&id='.$id.'&task=archive'));
|
||||
$print_link = Route::_('index.php?option=com_jem&view=categories&id='.$id.'&task=archive&print=1&tmpl=component');
|
||||
$pagetitle .= ' - ' . Text::_('COM_JEM_ARCHIVE');
|
||||
$pageheading .= ' - ' . Text::_('COM_JEM_ARCHIVE');
|
||||
$archive_link = Route::_('index.php?option=com_jem&view=categories');
|
||||
$params->set('page_heading', $pageheading);
|
||||
} else {
|
||||
$print_link = Route::_('index.php?option=com_jem&view=categories&id='.$id.'&print=1&tmpl=component');
|
||||
$archive_link = $uri->toString();
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
// Check if the user has permission to add things
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddEvent = $user->can('add', 'event');
|
||||
$permissions->canAddVenue = $user->can('add', 'venue');
|
||||
|
||||
// Get events if requested
|
||||
if (!empty($rows) && $params->get('detcat_nr', 0) > 0) {
|
||||
foreach($rows as $row) {
|
||||
$row->events = $model->getEventdata($row->id);
|
||||
}
|
||||
}
|
||||
|
||||
$this->rows = $rows;
|
||||
$this->task = $task;
|
||||
$this->params = $params;
|
||||
$this->dellink = $permissions->canAddEvent; // deprecated
|
||||
$this->pagination = $pagination;
|
||||
$this->item = $menuitem;
|
||||
$this->jemsettings = $jemsettings;
|
||||
$this->pagetitle = $pagetitle;
|
||||
$this->print_link = $print_link;
|
||||
$this->archive_link = $archive_link;
|
||||
$this->model = $model;
|
||||
$this->id = $id;
|
||||
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
$this->permissions = $permissions;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
1
components/com_jem/views/category/index.html
Normal file
1
components/com_jem/views/category/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
7
components/com_jem/views/category/metadata.xml
Normal file
7
components/com_jem/views/category/metadata.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<view
|
||||
title="Category">
|
||||
<message><![CDATA[COM_JEM_CATEGORY_VIEW_LAYOUT_DESC]]></message>
|
||||
</view>
|
||||
</metadata>
|
||||
415
components/com_jem/views/category/tmpl/calendar.php
Normal file
415
components/com_jem/views/category/tmpl/calendar.php
Normal file
@ -0,0 +1,415 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
?>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'ical_link' => $this->ical_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day.'&catid='.$this->catid);
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
/**
|
||||
* $cal->setEventContent($year,$month,$day,$content,[$contentUrl,$id])
|
||||
*
|
||||
* Info from: https://www.micronetwork.de/activecalendar/demo/doc/doc_en.html
|
||||
*
|
||||
* Call this method, if you want the class to create a new HTML table within the date specified by the parameters $year, $month, $day.
|
||||
* The parameter $content can be a string or an array.
|
||||
* If $content is a string, then the new generated table will contain one row with the value of $content.
|
||||
* If it is an array, the generated table will contain as many rows as the array length and each row will contain the value of each array item.
|
||||
* The parameter $contentUrl is optional: If you set a $contentUrl, an event content specific link (..href='$contentUrl'..) will be generated
|
||||
* in the 'event content' table row(s), even if the method $cal->enableDayLinks($link) was not called.
|
||||
* The parameter $id is optional as well: if you set an $id, a HTML class='$id' will be generated for each event content (default: 'eventcontent').
|
||||
*/
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="scat" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor).'">';
|
||||
} else {
|
||||
$content .= '">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton('catid='.$this->catid);
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
# skip foreign categories - we are restricted to one
|
||||
if ($cat->id != $this->catid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if ($displayLegend == 1) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
# skip foreign categories - we are restricted to one
|
||||
if ($cat->id != $this->catid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
155
components/com_jem/views/category/tmpl/calendar.xml
Normal file
155
components/com_jem/views/category/tmpl/calendar.xml
Normal file
@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_JEM_CATEGORY_CALENDAR_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_JEM_CATEGORY_CALENDAR_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
addfieldpath="/administrator/components/com_jem/models/fields"
|
||||
>
|
||||
<field name="id" type="categories"
|
||||
default=""
|
||||
label="COM_JEM_SELECT_CATEGORY"
|
||||
description="COM_JEM_SELECT_CATEGORY_DESC"
|
||||
required="true"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="introtext" type="textarea"
|
||||
filter="safehtml"
|
||||
default=""
|
||||
rows="8"
|
||||
cols="30"
|
||||
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">COM_JEM_SHOW</option>
|
||||
<option value="0">COM_JEM_HIDE</option>
|
||||
</field>
|
||||
<field type="spacer" name="myspacer2" hr="true" />
|
||||
<field name="show_archived_events" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOW_ARCHIVED_EVENTS"
|
||||
description="COM_JEM_SHOW_ARCHIVED_EVENTS_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="displayLegend" type="list"
|
||||
default="1"
|
||||
label="COM_JEM_DISPLAY_LEGEND"
|
||||
description="COM_JEM_DISPLAY_LEGEND_DESC"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="2">COM_JEM_ABOVE</option>
|
||||
<option value="1">COM_JEM_BELOW</option>
|
||||
</field>
|
||||
<field name="show_only_start" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWONLYSTARTDAY"
|
||||
description="COM_JEM_SHOWONLYSTARTDAY_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="firstweekday" type="list"
|
||||
default="1"
|
||||
label="COM_JEM_SELECTFIRSTWEEKDAY"
|
||||
description="COM_JEM_SELECTFIRSTWEEKDAYDESC"
|
||||
>
|
||||
<option value="0">COM_JEM_SUNDAY</option>
|
||||
<option value="1">COM_JEM_MONDAY</option>
|
||||
</field>
|
||||
<field name="daylimit" type="text"
|
||||
default="10"
|
||||
label="COM_JEM_MAX_EVENTS_PER_DAY"
|
||||
description="COM_JEM_MAX_EVENTS_PER_DAY_DESC"
|
||||
/>
|
||||
<field name="show_addevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWADDEVENTICON"
|
||||
description="COM_JEM_SHOWADDEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="show_editevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWEDITEVENTICON"
|
||||
description="COM_JEM_SHOWEDITEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="show_copyevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWCOPYEVENTICON"
|
||||
description="COM_JEM_SHOWCOPYEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field type="spacer" name="myspacer3" hr="true" />
|
||||
<field name="eventlinkcolor" type="color"
|
||||
default="#000000"
|
||||
label="COM_JEM_CALENDAR_EVENTLINKCOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTLINKCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventbackgroundcolor" type="color"
|
||||
default="#FFFF00"
|
||||
label="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventbg_usecatcolor" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_CALENDAR_USECATCOLOR"
|
||||
description="COM_JEM_CALENDAR_USECATCOLOR_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="currentdaycolor" type="color"
|
||||
default="#CCCC99"
|
||||
label="COM_JEM_CALENDAR_CURRENTDAYCOLOR"
|
||||
description="COM_JEM_CALENDAR_CURRENTDAYCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventandmorecolor" type="color"
|
||||
default="#FFFF00"
|
||||
label="COM_JEM_CALENDAR_EVENTANDMORECOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTANDMORECOLOR_DESC"
|
||||
/>
|
||||
<field name="usefeaturedborder" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_CALENDAR_USEFEATUREDBORDER"
|
||||
description="COM_JEM_CALENDAR_USEFEATUREDBORDER_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="featuredbordercolor" type="color"
|
||||
default="#000080"
|
||||
label="COM_JEM_CALENDAR_FEATUREDBORDERCOLOR"
|
||||
description="COM_JEM_CALENDAR_FEATUREDBORDERCOLOR_DESC"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
106
components/com_jem/views/category/tmpl/default.php
Normal file
106
components/com_jem/views/category/tmpl/default.php
Normal file
@ -0,0 +1,106 @@
|
||||
<?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;
|
||||
?>
|
||||
<div id="jem" class="jem_category<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('id' => $this->category->slug, 'slug' => $this->category->slug, 'task' => $this->task, 'print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h1 class='componentheading'>
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="floattext">
|
||||
<?php if ($this->jemsettings->discatheader) : ?>
|
||||
<div class="catimg">
|
||||
<?php
|
||||
// flyer
|
||||
if (empty($this->category->image)) {
|
||||
$jemsettings = JEMHelper::config();
|
||||
$imgattribs['width'] = $jemsettings->imagewidth;
|
||||
$imgattribs['height'] = $jemsettings->imagehight;
|
||||
|
||||
echo HTMLHelper::_('image', 'com_jem/noimage.png', $this->category->catname, $imgattribs, true);
|
||||
}
|
||||
else {
|
||||
echo JemOutput::flyer($this->category, $this->cimage, 'category');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="description">
|
||||
<p><?php echo $this->description; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--subcategories-->
|
||||
<?php
|
||||
if ($this->showsubcats && $this->maxLevel != 0 && !empty($this->category->id) && !empty($this->children[$this->category->id])) :
|
||||
$countsubcats = 0;
|
||||
foreach ($this->children[$this->category->id] as $id => $child) :
|
||||
// Do we have any non-empty subcategory or should generally show empty subcategories?
|
||||
// Note: We also show empty subcategories if they have at least one non-empty subsubcategory.
|
||||
if ($this->showemptysubcats || ($child->getNumItems(true) > 0)) :
|
||||
++$countsubcats;
|
||||
endif;
|
||||
endforeach;
|
||||
if ($countsubcats) :
|
||||
?>
|
||||
<div class="cat-children">
|
||||
<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
|
||||
<h3>
|
||||
<?php echo TEXT::_('COM_JEM_SUBCATEGORIES'); ?>
|
||||
</h3>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->loadTemplate('subcategories'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm">
|
||||
<!--table-->
|
||||
<?php echo $this->loadTemplate('events_table'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="view" value="category" />
|
||||
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->category->id; ?>" />
|
||||
</form>
|
||||
|
||||
<!--pagination-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<!-- iCal -->
|
||||
<div id="iCal" class="iCal">
|
||||
<?php echo JemOutput::icalbutton($this->category->id, 'category'); ?>
|
||||
</div>
|
||||
|
||||
<!-- copyright -->
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer( ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
44
components/com_jem/views/category/tmpl/default.xml
Normal file
44
components/com_jem/views/category/tmpl/default.xml
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_JEM_CATEGORY_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_JEM_CATEGORY_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
|
||||
<fields name="request">
|
||||
<fieldset name="request"
|
||||
addfieldpath="/administrator/components/com_jem/models/fields"
|
||||
>
|
||||
<field name="id" type="categories"
|
||||
default=""
|
||||
label="COM_JEM_SELECT_CATEGORY"
|
||||
description="COM_JEM_SELECT_CATEGORY_DESC"
|
||||
required="true"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="usecat" type="radio"
|
||||
default="1"
|
||||
label="COM_JEM_DISPLAYCHILDS"
|
||||
description="COM_JEM_DISPLAYCHILDSDESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="showemptychilds" type="radio"
|
||||
default="1"
|
||||
label="COM_JEM_SHOWEMPTYCHILD"
|
||||
description="COM_JEM_SHOWEMPTYCHILDDESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
@ -0,0 +1,94 @@
|
||||
<?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;
|
||||
|
||||
$class = ' class="first"';
|
||||
?>
|
||||
|
||||
<?php /*
|
||||
<div class="subcategories">
|
||||
<?php //echo Text::_('COM_JEM_SUBCATEGORIES'); ?>
|
||||
</div>
|
||||
*/ ?>
|
||||
|
||||
<?php if (array_key_exists($this->category->id, $this->children) && (count($this->children[$this->category->id]) > 0)) : ?>
|
||||
<?php
|
||||
$lastid = 0;
|
||||
foreach ($this->children[$this->category->id] as $id => $child) :
|
||||
if ($this->params->get('showemptychilds', 1) || ($child->getNumItems(true) > 0)) :
|
||||
$lastid = $id;
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
<ul>
|
||||
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
|
||||
|
||||
<?php
|
||||
// Note: We don't skip empty subcategories if they have at least one non-empty subsubcategory.
|
||||
if (!$this->params->get('showemptychilds', 1) && ($child->getNumItems(true) <= 0)) :
|
||||
continue; // skip this subcat
|
||||
endif;
|
||||
|
||||
if ($id == $lastid) :
|
||||
$class = ' class="last"';
|
||||
endif;
|
||||
?>
|
||||
|
||||
<li<?php echo $class; ?>>
|
||||
<?php $class = ''; ?>
|
||||
<span class="item-title">
|
||||
<a href="<?php echo Route::_(JemHelperRoute::getCategoryRoute($child->id, $this->task)); ?>">
|
||||
<?php echo $this->escape($child->catname); ?>
|
||||
</a>
|
||||
</span>
|
||||
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
|
||||
<?php if ($child->description) : ?>
|
||||
<div class="category-desc">
|
||||
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ( $this->params->get('show_cat_num_articles', 1)) : ?>
|
||||
<dl>
|
||||
<dt>
|
||||
<?php echo Text::_('COM_JEM_EVENTS') . ':' ; ?>
|
||||
</dt>
|
||||
<dd>
|
||||
<?php echo $child->getNumItems(false); /* count direct events only, not recursive */ ?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
<?php elseif ($this->params->get('show_cat_num_articles', 1)) : ?>
|
||||
<?php echo ' (' . $child->getNumItems(false) . ')'; /* count direct events only, not recursive */ ?>
|
||||
<?php /* experimental * /
|
||||
$count = $child->getNumItemsByState(false);
|
||||
echo ' (' . $count['published'] . ' + ' . $count['unpublished'] . ' / ' . $count['archived'] . ' - ' . $count['trashed'] . ')';
|
||||
/**/
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($child->getChildren()) > 0 ) :
|
||||
$this->children[$child->id] = $child->getChildren();
|
||||
$this->category = $child;
|
||||
$this->maxLevel--;
|
||||
if ($this->maxLevel != 0) :
|
||||
echo $this->loadTemplate('subcategories');
|
||||
endif;
|
||||
$this->category = $child->getParent();
|
||||
$this->maxLevel++;
|
||||
endif; ?>
|
||||
</li>
|
||||
<?php // endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
1
components/com_jem/views/category/tmpl/index.html
Normal file
1
components/com_jem/views/category/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
433
components/com_jem/views/category/tmpl/responsive/calendar.php
Normal file
433
components/com_jem/views/category/tmpl/responsive/calendar.php
Normal file
@ -0,0 +1,433 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
?>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link, 'ical_link' => $this->ical_link);
|
||||
echo JemOutput::createButtonBar($this->getName().'-cal', $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = date('Y', strtotime($row->dates));
|
||||
$month = date('m', strtotime($row->dates));
|
||||
$day = date('d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = Route::_('index.php?option=com_jem&view=day&id='.$year.$month.$day.'&catid='.$this->catid);
|
||||
$var1b = Text::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
/**
|
||||
* $cal->setEventContent($year,$month,$day,$content,[$contentUrl,$id])
|
||||
*
|
||||
* Info from: https://www.micronetwork.de/activecalendar/demo/doc/doc_en.html
|
||||
*
|
||||
* Call this method, if you want the class to create a new HTML table within the date specified by the parameters $year, $month, $day.
|
||||
* The parameter $content can be a string or an array.
|
||||
* If $content is a string, then the new generated table will contain one row with the value of $content.
|
||||
* If it is an array, the generated table will contain as many rows as the array length and each row will contain the value of each array item.
|
||||
* The parameter $contentUrl is optional: If you set a $contentUrl, an event content specific link (..href='$contentUrl'..) will be generated
|
||||
* in the 'event content' table row(s), even if the method $cal->enableDayLinks($link) was not called.
|
||||
* The parameter $id is optional as well: if you set an $id, a HTML class='$id' will be generated for each event content (default: 'eventcontent').
|
||||
*/
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.Text::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
$eventid = $this->escape($row->id);
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = Route::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="scat" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = HTMLHelper::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.Text::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.Text::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= Text::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= Text::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= Text::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= Text::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.Text::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//get border for featured event
|
||||
$usefeaturedborder = $this->params->get('usefeaturedborder', 0);
|
||||
$featuredbordercolor = $this->params->get('featuredbordercolor', 0);
|
||||
$featuredclass = '';
|
||||
$featuredstyle ='';
|
||||
if($usefeaturedborder && $row->featured){
|
||||
$featuredclass="borderfeatured";
|
||||
$featuredstyle="border-color:" . $featuredbordercolor;
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
$content .= '<div class="eventcontentinner event_id' . $eventid . ' cat_id' . $category->id . ' ' . $featuredclass . '" style="' . $featuredstyle;
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '; background-color:'.array_pop($catcolor);
|
||||
$content .= '" onclick="location.href=\''.$detaillink.'\'">';
|
||||
} else {
|
||||
$content .= '" onclick="location.href=\''.$detaillink.'\'">' . $colorpic;
|
||||
}
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton('catid='.$this->catid);
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
# skip foreign categories - we are restricted to one
|
||||
if ($cat->id != $this->catid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if ($displayLegend == 1) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo Text::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
# skip foreign categories - we are restricted to one
|
||||
if ($cat->id != $this->catid) {
|
||||
continue;
|
||||
}
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
114
components/com_jem/views/category/tmpl/responsive/default.php
Normal file
114
components/com_jem/views/category/tmpl/responsive/default.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?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;
|
||||
|
||||
?>
|
||||
<div id="jem" class="jem_category<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('id' => $this->category->slug, 'slug' => $this->category->slug, 'task' => $this->task, 'print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h1 class='componentheading'>
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->escape($this->params->get('page_heading')) != $this->escape($this->category->title)) : ?>
|
||||
<?php if ($this->params->get('show_page_heading', 1)) : ?>
|
||||
<h2 class="jem-category-title">
|
||||
<?php echo $this->escape($this->category->title);?>
|
||||
</h2>
|
||||
<?php else : ?>
|
||||
<h1 class="jem-category-title">
|
||||
<?php echo $this->escape($this->category->title);?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<style>
|
||||
.jem-catimg {
|
||||
flex-basis: <?php echo $this->jemsettings->imagewidth; ?>px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php if (($this->jemsettings->discatheader) && (!empty($this->category->image))) : ?>
|
||||
<div class="jem-catimg">
|
||||
<?php echo JemOutput::flyer($this->category, $this->cimage, 'category'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="description">
|
||||
<p><?php echo $this->description; ?></p>
|
||||
</div>
|
||||
|
||||
<div class="jem-clear">
|
||||
</div>
|
||||
|
||||
<!--subcategories-->
|
||||
<?php
|
||||
if ($this->showsubcats && $this->maxLevel != 0 && !empty($this->category->id) && !empty($this->children[$this->category->id])) :
|
||||
$countsubcats = 0;
|
||||
foreach ($this->children[$this->category->id] as $id => $child) :
|
||||
// Do we have any non-empty subcategory or should generally show empty subcategories?
|
||||
// Note: We also show empty subcategories if they have at least one non-empty subsubcategory.
|
||||
if ($this->showemptysubcats || ($child->getNumItems(true) > 0)) :
|
||||
++$countsubcats;
|
||||
endif;
|
||||
endforeach;
|
||||
if ($countsubcats) :
|
||||
?>
|
||||
<div class="cat-children">
|
||||
<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
|
||||
<h2>
|
||||
<?php echo Text::_('COM_JEM_SUBCATEGORIES'); ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->loadTemplate('subcategories'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>
|
||||
<?php echo Text::_('COM_JEM_EVENTS'); ?>
|
||||
</h2>
|
||||
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" id="adminForm">
|
||||
<!--table-->
|
||||
<?php echo $this->loadTemplate('events_table'); ?>
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="view" value="category" />
|
||||
<input type="hidden" name="task" value="<?php echo $this->task; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $this->category->id; ?>" />
|
||||
</form>
|
||||
|
||||
<!--pagination-->
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<!-- iCal -->
|
||||
<div id="iCal" class="iCal">
|
||||
<?php echo JemOutput::icalbutton($this->category->id, 'category'); ?>
|
||||
</div>
|
||||
|
||||
<!-- copyright -->
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo JemOutput::lightbox(); ?>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
83
components/com_jem/views/category/view.feed.php
Normal file
83
components/com_jem/views/category/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\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
/**
|
||||
* Category-Feed
|
||||
*/
|
||||
class JemViewCategory extends HtmlView
|
||||
{
|
||||
/**
|
||||
* Creates the Event Feed of the Category
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$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;
|
||||
}
|
||||
|
||||
// adding 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
352
components/com_jem/views/category/view.html.php
Normal file
352
components/com_jem/views/category/view.html.php
Normal file
@ -0,0 +1,352 @@
|
||||
<?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;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
|
||||
/**
|
||||
* Category-View
|
||||
*/
|
||||
class JemViewCategory extends JemView
|
||||
{
|
||||
protected $state;
|
||||
protected $items;
|
||||
protected $category;
|
||||
protected $children;
|
||||
protected $pagination;
|
||||
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
|
||||
// additional path for common templates + corresponding override path
|
||||
$this->addCommonTemplatePath();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the Category View
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
if ($this->getLayout() == 'calendar')
|
||||
{
|
||||
### Category Calendar view ###
|
||||
|
||||
//initialize variables
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$jemsettings = JemHelper::config();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$params = $app->getParams();
|
||||
$uri = Uri::getInstance();
|
||||
$pathway = $app->getPathWay();
|
||||
$print = $app->input->getBool('print', false);
|
||||
$url = Uri::root();
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCss('calendar');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
if ($print) {
|
||||
JemHelper::loadCss('print');
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
$evlinkcolor = $params->get('eventlinkcolor');
|
||||
$evbackgroundcolor = $params->get('eventbackgroundcolor');
|
||||
$currentdaycolor = $params->get('currentdaycolor');
|
||||
$eventandmorecolor = $params->get('eventandmorecolor');
|
||||
|
||||
$style = '
|
||||
div#jem .eventcontentinner a, div#jem .eventandmore a {color:' . $evlinkcolor . ';}
|
||||
.eventcontentinner {background-color:'.$evbackgroundcolor .';}
|
||||
.eventandmore {background-color:'.$eventandmorecolor .';}
|
||||
.today .daynum {background-color:'.$currentdaycolor.';}';
|
||||
$document->addStyleDeclaration($style);
|
||||
|
||||
// add javascript (using full path - see issue #590)
|
||||
// HTMLHelper::_('script', 'media/com_jem/js/calendar.js');
|
||||
$document->addScript($url.'media/com_jem/js/calendar.js');
|
||||
|
||||
// Retrieve date variables
|
||||
$year = (int)$app->input->getInt('yearID', date("Y"));
|
||||
$month = (int)$app->input->getInt('monthID', date("m"));
|
||||
|
||||
$catid = $app->input->getInt('id', 0);
|
||||
if (empty($catid)) {
|
||||
$catid = $params->get('id');
|
||||
}
|
||||
|
||||
// get data from model and set the month
|
||||
$model = $this->getModel('CategoryCal');
|
||||
$model->setDate(mktime(0, 0, 1, $month, 1, $year));
|
||||
|
||||
$category = $this->get('Category', 'CategoryCal');
|
||||
$rows = $this->get('Items', 'CategoryCal');
|
||||
|
||||
// Set Page title
|
||||
$pagetitle = $params->def('page_title', $menuitem->title);
|
||||
$params->def('page_heading', $params->get('page_title'));
|
||||
$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'));
|
||||
}
|
||||
|
||||
$document->setTitle($pagetitle);
|
||||
$document->setMetaData('title', $pagetitle);
|
||||
|
||||
// Check if the user has permission to add things
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddEvent = $user->can('add', 'event', false, false, $catid);
|
||||
$permissions->canAddVenue = $user->can('add', 'venue', false, false, $catid);
|
||||
|
||||
$itemid = $app->input->getInt('Itemid', 0);
|
||||
$partItemid = ($itemid > 0) ? '&Itemid='.$itemid : '';
|
||||
$partCatid = ($catid > 0) ? '&id=' . $catid : '';
|
||||
$url_base = 'index.php?option=com_jem&view=category&layout=calendar' . $partCatid . $partItemid;
|
||||
$partDate = ($year ? ('&yearID=' . $year) : '') . ($month ? ('&monthID=' . $month) : '');
|
||||
|
||||
$print_link = Route::_($url_base . $partDate . '&print=1&tmpl=component');
|
||||
|
||||
// init calendar
|
||||
$cal = new JemCalendar($year, $month, 0);
|
||||
$cal->enableMonthNav($url_base . ($print ? '&print=1&tmpl=component' : ''));
|
||||
$cal->setFirstWeekDay($params->get('firstweekday', 1));
|
||||
$cal->enableDayLinks('index.php?option=com_jem&view=day&catid='.$catid);
|
||||
|
||||
$this->rows = $rows;
|
||||
$this->catid = $catid;
|
||||
$this->params = $params;
|
||||
$this->jemsettings = $jemsettings;
|
||||
$this->settings = $settings;
|
||||
$this->permissions = $permissions;
|
||||
$this->cal = $cal;
|
||||
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
|
||||
$this->print_link = $print_link;
|
||||
$this->print = $print;
|
||||
$this->ical_link = $partDate;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
### Category List view ###
|
||||
|
||||
//initialize variables
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$jemsettings = JemHelper::config();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$print = $app->input->getBool('print', false);
|
||||
|
||||
// get menu information
|
||||
$uri = Uri::getInstance();
|
||||
$pathway = $app->getPathWay();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
if ($print) {
|
||||
JemHelper::loadCss('print');
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
// get data from model
|
||||
$state = $this->get('State');
|
||||
$params = $state->params;
|
||||
$items = $this->get('Items');
|
||||
$category = $this->get('Category');
|
||||
$children = $this->get('Children');
|
||||
$parent = $this->get('Parent');
|
||||
|
||||
if ($category == false)
|
||||
{
|
||||
throw new Exception(Text::_('JGLOBAL_CATEGORY_NOT_FOUND'), 404);
|
||||
}
|
||||
|
||||
// are events available?
|
||||
$noevents = (!$items) ? 1 : 0;
|
||||
|
||||
// Decide which parameters should take priority
|
||||
$useMenuItemParams = ($menuitem && $menuitem->query['option'] == 'com_jem'
|
||||
&& $menuitem->query['view'] == 'category'
|
||||
&& (!isset($menuitem->query['layout']) || $menuitem->query['layout'] == 'default')
|
||||
&& $menuitem->query['id'] == $category->id);
|
||||
|
||||
// get variables
|
||||
$itemid = $app->input->getInt('id', 0) . ':' . $app->input->getInt('Itemid', 0);
|
||||
|
||||
$this->showsubcats = (bool)$params->get('usecat', 1);
|
||||
$this->showemptysubcats = (bool)$params->get('showemptychilds', 1);
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_order', 'filter_order', 'a.dates', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
$filter_type = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_filtertype', 'filter_type', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_search', 'filter_search', '', 'string');
|
||||
$search_month = $app->getUserStateFromRequest('com_jem.category.'.$itemid.'.filter_month', 'filter_month', '', 'string');
|
||||
$task = $app->input->get('task', '');
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
// search filter
|
||||
$filters = array();
|
||||
|
||||
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_type', array('size'=>'1','class'=>'form-select'), 'value', 'text', $filter_type);
|
||||
|
||||
// search filter
|
||||
$lists['search'] = $search;
|
||||
|
||||
// don't show column "Category" on Category view
|
||||
$lists['hide'] = array('category' => 1);
|
||||
|
||||
// Add feed links
|
||||
$link = '&format=feed&id='.$category->id.'&limitstart=';
|
||||
$attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0');
|
||||
$this->document->addHeadLink(Route::_($link . '&type=rss'), 'alternate', 'rel', $attribs);
|
||||
$attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0');
|
||||
$this->document->addHeadLink(Route::_($link . '&type=atom'), 'alternate', 'rel', $attribs);
|
||||
|
||||
// create the pathway
|
||||
$cats = new JemCategories($category->id);
|
||||
$parents = $cats->getParentlist();
|
||||
|
||||
foreach ($parents as $parent) {
|
||||
$pathway->addItem($this->escape($parent->catname), Route::_(JemHelperRoute::getCategoryRoute($parent->slug)) );
|
||||
}
|
||||
|
||||
// Show page heading specified on menu item or category title as heading - idea taken from com_content.
|
||||
//
|
||||
// Check to see which parameters should take priority
|
||||
// If the current view is the active menuitem and an category view for this category, then the menu item params take priority
|
||||
if ($useMenuItemParams) {
|
||||
$pagetitle = $params->get('page_title', $menuitem->title ? $menuitem->title : $category->catname);
|
||||
$pageheading = $params->get('page_heading', $pagetitle);
|
||||
$pathwayKeys = array_keys($pathway->getPathway());
|
||||
$lastPathwayEntryIndex = end($pathwayKeys);
|
||||
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
|
||||
//$pathway->setItemName(1, $menuitem->title);
|
||||
} else {
|
||||
$pagetitle = $category->catname;
|
||||
$pageheading = $pagetitle;
|
||||
$params->set('show_page_heading', 1); // ensure page heading is shown
|
||||
$pathway->addItem($category->catname, Route::_(JemHelperRoute::getCategoryRoute($category->slug)) );
|
||||
}
|
||||
$pageclass_sfx = $params->get('pageclass_sfx');
|
||||
|
||||
if ($task == 'archive') {
|
||||
$pathway->addItem(Text::_('COM_JEM_ARCHIVE'), Route::_(JemHelperRoute::getCategoryRoute($category->slug).'&task=archive'));
|
||||
$print_link = Route::_(JemHelperRoute::getCategoryRoute($category->id) .'&task=archive&print=1&tmpl=component');
|
||||
$pagetitle .= ' - '.Text::_('COM_JEM_ARCHIVE');
|
||||
$pageheading .= ' - '.Text::_('COM_JEM_ARCHIVE');
|
||||
} else {
|
||||
$print_link = Route::_(JemHelperRoute::getCategoryRoute($category->id) .'&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'));
|
||||
}
|
||||
|
||||
// Set Page title & Meta data
|
||||
$this->document->setTitle($pagetitle);
|
||||
$document->setMetaData('title', $pagetitle);
|
||||
$document->setMetadata('keywords', $category->meta_keywords);
|
||||
$document->setDescription(strip_tags($category->meta_description));
|
||||
|
||||
// Check if the user has permission to add things
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddEvent = $user->can('add', 'event', false, false, $category->id);
|
||||
$permissions->canAddVenue = $user->can('add', 'venue', false, false, $category->id);
|
||||
|
||||
// Create the pagination object
|
||||
$pagination = $this->get('Pagination');
|
||||
|
||||
// Generate Categorydescription
|
||||
if (empty ($category->description)) {
|
||||
$description = Text::_('COM_JEM_NO_DESCRIPTION');
|
||||
} else {
|
||||
// execute plugins
|
||||
$category->text = $category->description;
|
||||
$category->title = $category->catname;
|
||||
PluginHelper::importPlugin('content');
|
||||
$app->triggerEvent('onContentPrepare', array('com_jem.category', &$category, &$params, 0));
|
||||
$description = $category->text;
|
||||
}
|
||||
|
||||
$cimage = JemImage::flyercreator($category->image,'category');
|
||||
|
||||
$this->lists = $lists;
|
||||
$this->action = $uri->toString();
|
||||
$this->cimage = $cimage;
|
||||
$this->rows = $items;
|
||||
$this->noevents = $noevents;
|
||||
$this->print_link = $print_link;
|
||||
$this->print = $print;
|
||||
$this->params = $params;
|
||||
$this->dellink = $permissions->canAddEvent; // deprecated
|
||||
$this->permissions = $permissions;
|
||||
$this->task = $task;
|
||||
$this->description = $description;
|
||||
$this->pagination = $pagination;
|
||||
$this->jemsettings = $jemsettings;
|
||||
$this->settings = $settings;
|
||||
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
$this->maxLevel = $params->get('maxLevel', -1);
|
||||
$this->category = $category;
|
||||
$this->children = array($category->id => $children);
|
||||
$this->parent = $parent;
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
56
components/com_jem/views/category/view.raw.php
Normal file
56
components/com_jem/views/category/view.raw.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?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\MVC\View\HtmlView;
|
||||
|
||||
/**
|
||||
* Raw: Category
|
||||
*/
|
||||
class JemViewCategory extends HtmlView
|
||||
{
|
||||
/**
|
||||
* Creates the output for the Category view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$settings = JemHelper::config();
|
||||
$settings2 = JemHelper::globalattribs();
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
|
||||
$year = (int)$jinput->getInt('yearID', date("Y"));
|
||||
$month = (int)$jinput->getInt('monthID', date("m"));
|
||||
$catid = (int)$jinput->getInt('id', 0);
|
||||
|
||||
if ($settings2->get('global_show_ical_icon','0')==1) {
|
||||
// Get data from the model
|
||||
$model = $this->getModel('CategoryCal');
|
||||
$model->setState('list.start',0);
|
||||
$model->setState('list.limit',$settings->ical_max_items);
|
||||
$model->setDate(mktime(0, 0, 1, $month, 1, $year));
|
||||
|
||||
$rows = $model->getItems();
|
||||
|
||||
// initiate new CALENDAR
|
||||
$vcal = JemHelper::getCalendarTool();
|
||||
$vcal->setConfig("filename", "events_category_" . $catid . "_". $year . $month . ".ics");
|
||||
|
||||
if (!empty($rows)) {
|
||||
foreach ($rows as $row) {
|
||||
JemHelper::icalAddEvent($vcal, $row);
|
||||
}
|
||||
}
|
||||
|
||||
// generate and redirect output to user browser
|
||||
$vcal->returnCalendar();
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
393
components/com_jem/views/default.php
Normal file
393
components/com_jem/views/default.php
Normal file
@ -0,0 +1,393 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.1
|
||||
* @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::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
|
||||
// Create shortcuts to some parameters.
|
||||
$params = $this->item->params;
|
||||
$images = json_decode($this->item->datimage);
|
||||
$attribs = json_decode($this->item->attribs);
|
||||
$user = JemFactory::getUser();
|
||||
$jemsettings = JemHelper::config();
|
||||
$document = JFactory::getDocument();
|
||||
|
||||
// Add expiration date, if old events will be archived or removed
|
||||
if ($jemsettings->oldevent > 0) {
|
||||
$enddate = strtotime($this->item->enddates?:$this->item->dates);
|
||||
$expDate = date("D, d M Y H:i:s", strtotime('+1 day', $enddate));
|
||||
$document->addCustomTag('<meta http-equiv="expires" content="' . $expDate . '"/>');
|
||||
}
|
||||
|
||||
JHtml::_('behavior.modal', 'a.flyermodal');
|
||||
?>
|
||||
<?php if ($params->get('access-view')) { /* This will show nothings otherwise - ??? */ ?>
|
||||
<div id="jem" class="event_id<?php echo $this->item->did; ?> jem_event<?php echo $this->pageclass_sfx;?>"
|
||||
itemscope="itemscope" itemtype="https://schema.org/Event">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('slug' => $this->item->slug, 'print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="clr"> </div>
|
||||
|
||||
<?php if (!$this->params->get('show_page_heading', 1)) : ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
<?php echo $this->escape($this->params->get('page_heading')).' '.JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditEvent, 'editevent').' '.JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddEvent, 'editevent'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"> </div>
|
||||
|
||||
<!-- Event -->
|
||||
<h2 class="jem">
|
||||
<?php
|
||||
echo JText::_('COM_JEM_EVENT') . JemOutput::recurrenceicon($this->item);
|
||||
echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditEvent, 'editevent');
|
||||
echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddEvent, 'editevent');
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<?php echo JemOutput::flyer2($this->item, $this->dimage, 'event'); ?>
|
||||
|
||||
<dl class="event_info floattext">
|
||||
<?php if ($params->get('event_show_detailstitle',1)) : ?>
|
||||
<dt class="title"><?php echo JText::_('COM_JEM_TITLE'); ?>:</dt>
|
||||
<dd class="title" itemprop="name"><?php echo $this->escape($this->item->title); ?></dd>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<dt class="when"><?php echo JText::_('COM_JEM_WHEN'); ?>:</dt>
|
||||
<dd class="when">
|
||||
<?php
|
||||
echo JemOutput::formatLongDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
|
||||
echo JemOutput::formatSchemaOrgDateTime($this->item->dates, $this->item->times,$this->item->enddates, $this->item->endtimes);
|
||||
?>
|
||||
</dd>
|
||||
<?php if ($this->item->locid != 0) : ?>
|
||||
<dt class="where"><?php echo JText::_('COM_JEM_WHERE'); ?>:</dt>
|
||||
<dd class="where"><?php
|
||||
if (($params->get('event_show_detlinkvenue') == 1) && (!empty($this->item->url))) :
|
||||
?><a target="_blank" href="<?php echo $this->item->url; ?>"><?php echo $this->escape($this->item->venue); ?></a><?php
|
||||
elseif (($params->get('event_show_detlinkvenue') == 2) && (!empty($this->item->venueslug))) :
|
||||
?><a href="<?php echo JRoute::_(JemHelperRoute::getVenueRoute($this->item->venueslug)); ?>"><?php echo $this->item->venue; ?></a><?php
|
||||
else/*if ($params->get('event_show_detlinkvenue') == 0)*/ :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
|
||||
# will show "venue" or "venue - city" or "venue - city, state" or "venue, state"
|
||||
$city = $this->escape($this->item->city);
|
||||
$state = $this->escape($this->item->state);
|
||||
if ($city) { echo ' - ' . $city; }
|
||||
if ($state) { echo ', ' . $state; }
|
||||
?>
|
||||
</dd>
|
||||
<?php
|
||||
endif;
|
||||
$n = is_array($this->categories) ? count($this->categories) : 0;
|
||||
?>
|
||||
|
||||
<dt class="category"><?php echo $n < 2 ? JText::_('COM_JEM_CATEGORY') : JText::_('COM_JEM_CATEGORIES'); ?>:</dt>
|
||||
<dd class="category">
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ((array)$this->categories as $category) :
|
||||
?><a href="<?php echo JRoute::_(JemHelperRoute::getCategoryRoute($category->catslug)); ?>"><?php echo $this->escape($category->catname); ?></a><?php
|
||||
$i++;
|
||||
if ($i != $n) :
|
||||
echo ', ';
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->item->{'custom'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="'.$this->escape($currentRow).'" target="_blank">'.$this->escape($currentRow).'</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?>"><?php echo JText::_('COM_JEM_EVENT_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($params->get('event_show_hits')) : ?>
|
||||
<dt class="hits"><?php echo JText::_('COM_JEM_EVENT_HITS_LABEL'); ?>:</dt>
|
||||
<dd class="hits"><?php echo JText::sprintf('COM_JEM_EVENT_HITS', $this->item->hits); ?></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!-- AUTHOR -->
|
||||
<?php if ($params->get('event_show_author') && !empty($this->item->author)) : ?>
|
||||
<dt class="createdby"><?php echo JText::_('COM_JEM_EVENT_CREATED_BY_LABEL'); ?>:</dt>
|
||||
<dd class="createdby">
|
||||
<?php $author = $this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author; ?>
|
||||
<?php if (!empty($this->item->contactid2) && $params->get('event_link_author') == true) :
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->contactid2;
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
echo JText::sprintf('COM_JEM_EVENT_CREATED_BY', JHtml::_('link', JRoute::_($cntlink), $author));
|
||||
else :
|
||||
echo JText::sprintf('COM_JEM_EVENT_CREATED_BY', $author);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (!empty($this->showeventstate) && isset($this->item->published)) : ?>
|
||||
<dt class="published"><?php echo JText::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="published">
|
||||
<?php switch ($this->item->published) {
|
||||
case 1: echo JText::_('JPUBLISHED'); break;
|
||||
case 0: echo JText::_('JUNPUBLISHED'); break;
|
||||
case 2: echo JText::_('JARCHIVED'); break;
|
||||
case -2: echo JText::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<!-- DESCRIPTION -->
|
||||
<?php if ($params->get('event_show_description','1') && ($this->item->fulltext != '' && $this->item->fulltext != '<br />' || $this->item->introtext != '' && $this->item->introtext != '<br />')) { ?>
|
||||
<h2 class="description"><?php echo JText::_('COM_JEM_EVENT_DESCRIPTION'); ?></h2>
|
||||
<div class="description event_desc" itemprop="description">
|
||||
|
||||
<?php
|
||||
if ($params->get('access-view')) {
|
||||
echo $this->item->text;
|
||||
}
|
||||
/* optional teaser intro text for guests - NOT SUPPORTED YET */
|
||||
elseif (0 /*$params->get('event_show_noauth') == true and $user->get('guest')*/ ) {
|
||||
echo $this->item->introtext;
|
||||
// Optional link to let them register to see the whole event.
|
||||
if ($params->get('event_show_readmore') && $this->item->fulltext != null) {
|
||||
$link1 = JRoute::_('index.php?option=com_users&view=login');
|
||||
$link = new JUri($link1);
|
||||
echo '<p class="readmore">';
|
||||
echo '<a href="'.$link.'">';
|
||||
if ($params->get('event_alternative_readmore') == false) {
|
||||
echo JText::_('COM_JEM_EVENT_REGISTER_TO_READ_MORE');
|
||||
} elseif ($readmore = $params->get('alternative_readmore')) {
|
||||
echo $readmore;
|
||||
}
|
||||
|
||||
if ($params->get('event_show_readmore_title', 0) != 0) {
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('event_readmore_limit'));
|
||||
} elseif ($params->get('event_show_readmore_title', 0) == 0) {
|
||||
} else {
|
||||
echo JHtml::_('string.truncate', ($this->item->title), $params->get('event_readmore_limit'));
|
||||
} ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
} /* access_view / show_noauth */
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Contact -->
|
||||
<?php if ($params->get('event_show_contact') && !empty($this->item->conid )) : ?>
|
||||
|
||||
<h2 class="contact"><?php echo JText::_('COM_JEM_CONTACT') ; ?></h2>
|
||||
|
||||
<dl class="location floattext">
|
||||
<dt class="con_name"><?php echo JText::_('COM_JEM_NAME'); ?>:</dt>
|
||||
<dd class="con_name">
|
||||
<?php
|
||||
$contact = $this->item->conname;
|
||||
if ($params->get('event_link_contact') == true) :
|
||||
$needle = 'index.php?option=com_contact&view=contact&id=' . $this->item->conid;
|
||||
$menu = JFactory::getApplication()->getMenu();
|
||||
$item = $menu->getItems('link', $needle, true);
|
||||
$cntlink2 = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
|
||||
echo JText::sprintf('COM_JEM_EVENT_CONTACT', JHtml::_('link', JRoute::_($cntlink2), $contact));
|
||||
else :
|
||||
echo JText::sprintf('COM_JEM_EVENT_CONTACT', $contact);
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<?php if ($this->item->contelephone) : ?>
|
||||
<dt class="con_telephone"><?php echo JText::_('COM_JEM_TELEPHONE'); ?>:</dt>
|
||||
<dd class="con_telephone">
|
||||
<?php echo $this->escape($this->item->contelephone); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<?php endif ?>
|
||||
|
||||
<?php $this->attachments = $this->item->attachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
<!-- Venue -->
|
||||
<?php if (($this->item->locid != 0) && !empty($this->item->venue)) : ?>
|
||||
<p></p>
|
||||
<hr>
|
||||
|
||||
<div itemprop="location" itemscope="itemscope" itemtype="https://schema.org/Place">
|
||||
<h2 class="location">
|
||||
<?php
|
||||
echo JText::_('COM_JEM_VENUE') ;
|
||||
$itemid = $this->item ? $this->item->id : 0 ;
|
||||
echo JemOutput::editbutton($this->item, $params, $attribs, $this->permissions->canEditVenue, 'editvenue');
|
||||
echo JemOutput::copybutton($this->item, $params, $attribs, $this->permissions->canAddVenue, 'editvenue');
|
||||
?>
|
||||
</h2>
|
||||
<?php echo JemOutput::flyer2($this->item, $this->limage, 'venue'); ?>
|
||||
|
||||
<dl class="location">
|
||||
<dt class="venue"><?php echo JText::_('COM_JEM_LOCATION'); ?>:</dt>
|
||||
<dd class="venue">
|
||||
<?php
|
||||
if (!empty($this->item->venueslug)) :
|
||||
echo '<a href="' . JRoute::_(JemHelperRoute::getVenueRoute($this->item->venueslug)) . '">' . $this->escape($this->item->venue) . '</a>';
|
||||
else :
|
||||
echo $this->escape($this->item->venue);
|
||||
endif;
|
||||
if (!empty($this->item->url)) :
|
||||
echo ' - <a target="_blank" href="' . $this->item->url . '">' . JText::_('COM_JEM_WEBSITE') . '</a>';
|
||||
endif;
|
||||
?>
|
||||
</dd>
|
||||
</dl>
|
||||
<?php if ($params->get('event_show_detailsadress', '1')) : ?>
|
||||
<dl class="location floattext" itemprop="address" itemscope
|
||||
itemtype="https://schema.org/PostalAddress">
|
||||
<?php if ($this->item->street) : ?>
|
||||
<dt class="venue_street"><?php echo JText::_('COM_JEM_STREET'); ?>:</dt>
|
||||
<dd class="venue_street" itemprop="streetAddress">
|
||||
<?php echo $this->escape($this->item->street); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->postalCode) : ?>
|
||||
<dt class="venue_postalCode"><?php echo JText::_('COM_JEM_ZIP'); ?>:</dt>
|
||||
<dd class="venue_postalCode" itemprop="postalCode">
|
||||
<?php echo $this->escape($this->item->postalCode); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->city) : ?>
|
||||
<dt class="venue_city"><?php echo JText::_('COM_JEM_CITY'); ?>:</dt>
|
||||
<dd class="venue_city" itemprop="addressLocality">
|
||||
<?php echo $this->escape($this->item->city); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->state) : ?>
|
||||
<dt class="venue_state"><?php echo JText::_('COM_JEM_STATE'); ?>:</dt>
|
||||
<dd class="venue_state" itemprop="addressRegion">
|
||||
<?php echo $this->escape($this->item->state); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->country) : ?>
|
||||
<dt class="venue_country"><?php echo JText::_('COM_JEM_COUNTRY'); ?>:</dt>
|
||||
<dd class="venue_country">
|
||||
<?php echo $this->item->countryimg ? $this->item->countryimg : $this->item->country; ?>
|
||||
<meta itemprop="addressCountry" content="<?php echo $this->item->country; ?>" />
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PUBLISHING STATE -->
|
||||
<?php if (!empty($this->showvenuestate) && isset($this->item->locpublished)) : ?>
|
||||
<dt class="venue_published"><?php echo JText::_('JSTATUS'); ?>:</dt>
|
||||
<dd class="venue_published">
|
||||
<?php switch ($this->item->locpublished) {
|
||||
case 1: echo JText::_('JPUBLISHED'); break;
|
||||
case 0: echo JText::_('JUNPUBLISHED'); break;
|
||||
case 2: echo JText::_('JARCHIVED'); break;
|
||||
case -2: echo JText::_('JTRASHED'); break;
|
||||
} ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
for ($cr = 1; $cr <= 10; $cr++) {
|
||||
$currentRow = $this->item->{'venue'.$cr};
|
||||
if (preg_match('%^http(s)?://%', $currentRow)) {
|
||||
$currentRow = '<a href="' . $this->escape($currentRow) . '" target="_blank">' . $this->escape($currentRow) . '</a>';
|
||||
}
|
||||
if ($currentRow) {
|
||||
?>
|
||||
<dt class="custom<?php echo $cr; ?>"><?php echo JText::_('COM_JEM_VENUE_CUSTOM_FIELD'.$cr); ?>:</dt>
|
||||
<dd class="custom<?php echo $cr; ?>"><?php echo $currentRow; ?></dd>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 1) : ?>
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 2) : ?>
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('event_show_mapserv') == 3) : ?>
|
||||
<input type="hidden" id="latitude" value="<?php echo $this->item->latitude; ?>">
|
||||
<input type="hidden" id="longitude" value="<?php echo $this->item->longitude; ?>">
|
||||
|
||||
<input type="hidden" id="venue" value="<?php echo $this->item->venue; ?>">
|
||||
<input type="hidden" id="street" value="<?php echo $this->item->street; ?>">
|
||||
<input type="hidden" id="city" value="<?php echo $this->item->city; ?>">
|
||||
<input type="hidden" id="state" value="<?php echo $this->item->state; ?>">
|
||||
<input type="hidden" id="postalCode" value="<?php echo $this->item->postalCode; ?>">
|
||||
|
||||
<?php echo JemOutput::mapicon($this->item, 'event', $params); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; /* event_show_detailsadress */ ?>
|
||||
|
||||
<?php if ($params->get('event_show_locdescription', '1') && $this->item->locdescription != ''
|
||||
&& $this->item->locdescription != '<br />') : ?>
|
||||
<h2 class="location_desc"><?php echo JText::_('COM_JEM_VENUE_DESCRIPTION'); ?></h2>
|
||||
<div class="description location_desc" itemprop="description">
|
||||
<?php echo $this->item->locdescription; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->attachments = $this->item->vattachments; ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Registration -->
|
||||
<?php if ($this->showAttendees) : ?>
|
||||
<p></p>
|
||||
<hr>
|
||||
<h2 class="register"><?php echo JText::_('COM_JEM_REGISTRATION'); ?>:</h2>
|
||||
<?php echo $this->loadTemplate('attendees'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($this->item->pluginevent->onEventEnd)) : ?>
|
||||
<p></p>
|
||||
<hr>
|
||||
<?php echo $this->item->pluginevent->onEventEnd; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php }
|
||||
?>
|
||||
1
components/com_jem/views/editevent/index.html
Normal file
1
components/com_jem/views/editevent/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
112
components/com_jem/views/editevent/tmpl/choosecontact.php
Normal file
112
components/com_jem/views/editevent/tmpl/choosecontact.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?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\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectContact');
|
||||
?>
|
||||
|
||||
<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" class="jem_select_contact">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_CONTACT'); ?>
|
||||
</h1>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=choosecontact&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label> ';
|
||||
echo $this->searchfilter.' ';
|
||||
?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '<?php echo Text::_('COM_JEM_SELECT_CONTACT') ?>');"><?php echo Text::_('COM_JEM_NOCONTACT')?></button>
|
||||
</div>
|
||||
<div class="jem_fright">
|
||||
<?php
|
||||
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> ';
|
||||
echo $this->pagination->getLimitBox();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="eventtable table table-striped" style="width:100%" summary="jem">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="7" class="sectiontableheader"><?php echo Text::_('COM_JEM_NUM'); ?></th>
|
||||
<th align="left" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_NAME', 'con.name', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<?php if (0) : /* removed because it maybe forbidden to show */ ?>
|
||||
<th align="left" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_ADDRESS', 'con.address', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<?php endif; ?>
|
||||
<th align="left" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_CITY', 'con.suburb', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<th align="left" class="sectiontableheader"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATE', 'con.state', $this->lists['order_Dir'], $this->lists['order'] ); ?></th>
|
||||
<?php if (0) : /* removed because it maybe forbidden to show */ ?>
|
||||
<th align="left" class="sectiontableheader"><?php echo Text::_('COM_JEM_EMAIL'); ?></th>
|
||||
<th align="left" class="sectiontableheader"><?php echo Text::_('COM_JEM_TELEPHONE'); ?></th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<tr align="center"><td colspan="0"><?php echo Text::_('COM_JEM_NOCONTACTS'); ?></td></tr>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
|
||||
<td align="left">
|
||||
<span <?php echo JEMOutput::tooltip(Text::_('COM_JEM_SELECT'), $row->name, 'editlinktip'); ?>>
|
||||
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->name)); ?>');"><?php echo $this->escape($row->name); ?></a>
|
||||
</span>
|
||||
</td>
|
||||
<?php if (0) : /* removed because it maybe forbidden to show */ ?>
|
||||
<td align="left"><?php echo $this->escape($row->address); ?></td>
|
||||
<?php endif; ?>
|
||||
<td align="left"><?php echo $this->escape($row->suburb); ?></td>
|
||||
<td align="left"><?php echo $this->escape($row->state); ?></td>
|
||||
<?php if (0) : /* removed because it maybe forbidden to show */ ?>
|
||||
<td align="left"><?php echo $this->escape($row->email_to); ?></td>
|
||||
<td align="left"><?php echo $this->escape($row->telephone); ?></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="task" value="selectcontact" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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']; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
</div>
|
||||
145
components/com_jem/views/editevent/tmpl/chooseusers.php
Normal file
145
components/com_jem/views/editevent/tmpl/chooseusers.php
Normal file
@ -0,0 +1,145 @@
|
||||
<?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\Factory;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectUsers');
|
||||
$checked = 0;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
?>
|
||||
|
||||
<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>
|
||||
<script>
|
||||
function checkList(form)
|
||||
{
|
||||
var r='', i, n, e;
|
||||
for (i=0, n=form.elements.length; i<n; i++)
|
||||
{
|
||||
e = form.elements[i];
|
||||
if (e.type == 'checkbox' && e.id.indexOf('cb') === 0 && e.checked)
|
||||
{
|
||||
if (r) { r += ','; }
|
||||
r += e.value;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_select_users">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_USERS_TO_INVITE'); ?>
|
||||
</h1>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=chooseusers&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if(0) : ?>
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label> ';
|
||||
echo $this->searchfilter.' ';
|
||||
?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
<?php /*<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '0');"><?php echo Text::_('COM_JEM_NOUSERS')?></button>*/ ?>
|
||||
</div>
|
||||
<div class="jem_fright">
|
||||
<?php
|
||||
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> ';
|
||||
echo $this->pagination->getLimitBox();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<table class="eventtable table table-striped" style="width:100%" summary="jem">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="sectiontableheader"><?php echo Text::_('COM_JEM_NUM'); ?></th>
|
||||
<th width="1%" class="center"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></th>
|
||||
<th align="left" class="sectiontableheader"><?php echo Text::_('COM_JEM_NAME'); ?></th>
|
||||
<th width="10%" class="center"><?php echo Text::_('COM_JEM_STATUS'); ?></th>
|
||||
<th width="10%" class="center"><?php echo Text::_('COM_JEM_PLACES'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<tr align="center"><td colspan="0"><?php echo Text::_('COM_JEM_NOUSERS'); ?></td></tr>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="center"><?php echo $this->pagination->getRowOffset( $i ); ?></td>
|
||||
<td class="center"><?php
|
||||
//echo HTMLHelper::_('grid.id', $i, $row->id);
|
||||
$cb = HTMLHelper::_('grid.id', $i, $row->id);
|
||||
if ($row->status == 0) {
|
||||
// JemHelper::addLogEntry('before: '.$cb, __METHOD__);
|
||||
$cb = preg_replace('/(onclick=)/', 'checked $1', $cb);
|
||||
++$checked;
|
||||
// JemHelper::addLogEntry('after: '.$cb, __METHOD__);
|
||||
}
|
||||
echo $cb;
|
||||
?></td>
|
||||
<td align="left"><?php echo $this->escape($row->name); ?></td>
|
||||
<td class="center"><?php echo jemhtml::toggleAttendanceStatus( 0, $row->status, false); ?></td>
|
||||
<td align="left"><?php echo $this->escape($row->places); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="jem-row jem-justify-start valign-baseline">
|
||||
<div style="padding-right:5px;">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?>
|
||||
</div>
|
||||
<div style="padding-right:10px;">
|
||||
<?php echo Text::_('COM_JEM_PLACES'); ?>
|
||||
</div>
|
||||
<div style="padding-right:10px;">
|
||||
<input id="places" name="places" type="number" style="text-align: center; width:auto;" value="0" max="1" min="0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="selectusers" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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="<?php echo $checked; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem_fright">
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>(checkList(document.adminForm), document.adminForm.boxchecked.value);"><?php echo Text::_('COM_JEM_SAVE'); ?></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
100
components/com_jem/views/editevent/tmpl/choosevenue.php
Normal file
100
components/com_jem/views/editevent/tmpl/choosevenue.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectVenue');
|
||||
?>
|
||||
|
||||
<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" class="jem_select_venue">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_VENUE'); ?>
|
||||
</h1>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=choosevenue&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div id="jem_filter" class="floattext">
|
||||
<div class="jem_fleft">
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label> ';
|
||||
echo $this->searchfilter.' ';
|
||||
?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->filter;?>" class="inputbox" onchange="document.adminForm.submit();" />
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '<?php echo Text::_('COM_JEM_SELECT_VENUE') ?>');"><?php echo Text::_('COM_JEM_NOVENUE')?></button>
|
||||
</div>
|
||||
<div class="jem_fright">
|
||||
<?php
|
||||
echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> ';
|
||||
echo $this->pagination->getLimitBox();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="eventtable table table-striped" style="width:100%" summary="jem">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="7" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_NUM'); ?></th>
|
||||
<th align="left" class="sectiontableheader" align="left"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_VENUE', 'l.venue', $this->lists['order_Dir'], $this->lists['order'], 'selectvenue' ); ?></th>
|
||||
<th align="left" class="sectiontableheader" align="left"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order'], 'selectvenue' ); ?></th>
|
||||
<th align="left" class="sectiontableheader" align="left"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></th>
|
||||
<th align="left" class="sectiontableheader" align="left"><?php echo Text::_('COM_JEM_COUNTRY'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<tr align="center"><td colspan="0"><?php echo Text::_('COM_JEM_NOVENUES'); ?></td></tr>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td><?php echo $this->pagination->getRowOffset( $i ); ?></td>
|
||||
<td align="left">
|
||||
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->venue)); ?>');"><?php echo $this->escape($row->venue); ?></a>
|
||||
</td>
|
||||
<td align="left"><?php echo $this->escape($row->city); ?></td>
|
||||
<td align="left"><?php echo $this->escape($row->state); ?></td>
|
||||
<td align="left"><?php echo !empty($row->country) ? $this->escape($row->country) : ''; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<input type="hidden" name="task" value="selectvenue" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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']; ?>" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
</div>
|
||||
4
components/com_jem/views/editevent/tmpl/choosevenue.xml
Normal file
4
components/com_jem/views/editevent/tmpl/choosevenue.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout hidden="true" />
|
||||
</metadata>
|
||||
308
components/com_jem/views/editevent/tmpl/edit.php
Normal file
308
components/com_jem/views/editevent/tmpl/edit.php
Normal file
@ -0,0 +1,308 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$wa = $document->getWebAssetManager();
|
||||
$wa->useScript('keepalive')
|
||||
->useScript('form.validate');
|
||||
// Create shortcut to parameters.
|
||||
$params = $this->params;
|
||||
// $settings = json_decode($this->item->attribs);
|
||||
?>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
function checkmaxplaces(){
|
||||
var maxplaces = $('jform_maxplaces');
|
||||
|
||||
if (maxplaces != null){
|
||||
$('#jform_maxplaces').on('change', function(){
|
||||
if ($('#event-available')) {
|
||||
var val = parseInt($('#jform_maxplaces').val());
|
||||
var booked = parseInt($('#event-booked').val());
|
||||
$('event-available').val() = (val-booked);
|
||||
}
|
||||
});
|
||||
|
||||
$('#jform_maxplaces').on('keyup', function(){
|
||||
if ($('event-available')) {
|
||||
var val = parseInt($('jform_maxplaces').val());
|
||||
var booked = parseInt($('event-booked').val());
|
||||
$('event-available').val() = (val-booked);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
checkmaxplaces();
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var $registraCheckbox = $('input[name="jform[registra]"]');
|
||||
var $restOfContent = $(".jem-dl-rest").children("dd, dt");
|
||||
|
||||
$registraCheckbox.on("change", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$restOfContent.show();
|
||||
} else {
|
||||
$restOfContent.hide();
|
||||
}
|
||||
});
|
||||
|
||||
var $minBookedUserInput = $("#jform_minbookeduser");
|
||||
var $maxBookedUserInput = $("#jform_maxbookeduser");
|
||||
var $maxPlacesInput = $("#jform_maxplaces");
|
||||
var $reservedPlacesInput = $("#jform_reservedplaces");
|
||||
|
||||
$minBookedUserInput
|
||||
.add($maxBookedUserInput)
|
||||
.add($maxPlacesInput)
|
||||
.add($reservedPlacesInput)
|
||||
.on("change", function () {
|
||||
var minBookedUserValue = parseInt($minBookedUserInput.val());
|
||||
var maxBookedUserValue = parseInt($maxBookedUserInput.val());
|
||||
var maxPlacesValue = parseInt($maxPlacesInput.val());
|
||||
var reservedPlacesValue = parseInt($reservedPlacesInput.val());
|
||||
if (minBookedUserValue > maxPlacesValue && maxPlacesValue != 0) {
|
||||
$minBookedUserInput.val(maxPlacesValue);
|
||||
}
|
||||
if (maxBookedUserValue > maxPlacesValue && maxPlacesValue != 0) {
|
||||
$maxBookedUserInput.val(maxPlacesValue);
|
||||
}
|
||||
if (minBookedUserValue > maxBookedUserValue) {
|
||||
$minBookedUserInput.val(maxBookedUserValue);
|
||||
}
|
||||
if (reservedPlacesValue > maxPlacesValue && maxPlacesValue != 0) {
|
||||
$reservedPlacesInput.val(maxPlacesValue);
|
||||
}
|
||||
});
|
||||
|
||||
// Trigger the change event on page load to initialize the state
|
||||
$registraCheckbox.change();
|
||||
$minBookedUserInput.change();
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Joomla.submitbutton = function(task) {
|
||||
if (task == 'event.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) {
|
||||
<?php //echo $this->form->getField('articletext')->save(); ?>
|
||||
Joomla.submitform(task);
|
||||
} else {
|
||||
alert('<?php echo $this->escape(Text::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// window.addEvent('domready', function(){
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
var showUnregistraUntil = function(){
|
||||
var unregistra = $("#jform_unregistra");
|
||||
|
||||
var unregistramode = unregistra.val();
|
||||
|
||||
if (unregistramode == 2) {
|
||||
document.getElementById('unregistra_until').style.display = '';
|
||||
document.getElementById('jform_unregistra_until').style.display = '';
|
||||
document.getElementById('jform_unregistra_until2').style.display = '';
|
||||
} else {
|
||||
document.getElementById('unregistra_until').style.display = 'none';
|
||||
document.getElementById('jform_unregistra_until').style.display = 'none';
|
||||
document.getElementById('jform_unregistra_until2').style.display = 'none';
|
||||
}
|
||||
}
|
||||
$("#jform_unregistra").on('change', showUnregistraUntil);
|
||||
showUnregistraUntil();
|
||||
});
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
var showRegistraFrom = function(){
|
||||
var registra = $("#jform_registra");
|
||||
|
||||
var registramode = registra.val();
|
||||
|
||||
if (registramode == 2) {
|
||||
document.getElementById('registra_from').style.display = '';
|
||||
document.getElementById('registra_until').style.display = '';
|
||||
document.getElementById('jform_registra_from').style.display = '';
|
||||
document.getElementById('jform_registra_from2').style.display = '';
|
||||
document.getElementById('jform_registra_until').style.display = '';
|
||||
document.getElementById('jform_registra_until2').style.display = '';
|
||||
} else {
|
||||
document.getElementById('registra_from').style.display = 'none';
|
||||
document.getElementById('registra_until').style.display = 'none';
|
||||
document.getElementById('jform_registra_from').style.display = 'none';
|
||||
document.getElementById('jform_registra_from2').style.display = 'none';
|
||||
document.getElementById('jform_registra_until').style.display = 'none';
|
||||
document.getElementById('jform_registra_until2').style.display = 'none';
|
||||
|
||||
}
|
||||
}
|
||||
$("#jform_registra").on('change', showRegistraFrom);
|
||||
showRegistraFrom();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_editevent<?php echo $this->pageclass_sfx; ?>">
|
||||
<div class="edit item-page">
|
||||
<?php if ($params->get('show_page_heading')) : ?>
|
||||
<h1>
|
||||
<?php echo $this->escape($params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<form enctype="multipart/form-data" action="<?php echo Route::_('index.php?option=com_jem&a_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate">
|
||||
|
||||
<button type="submit" class="btn btn-primary" onclick="Joomla.submitbutton('event.save')"><?php echo Text::_('JSAVE') ?></button>
|
||||
<button type="cancel" class="btn btn-secondary" onclick="Joomla.submitbutton('event.cancel')"><?php echo Text::_('JCANCEL') ?></button>
|
||||
|
||||
<br>
|
||||
<?php if ($this->item->recurrence_type > 0) : ?>
|
||||
<div class="description warningrecurrence" style="clear: both;">
|
||||
<div style="float:left;">
|
||||
<?php echo JemOutput::recurrenceicon($this->item, false, false); ?>
|
||||
</div>
|
||||
<div class="floattext" style="margin-left:36px;">
|
||||
<strong><?php echo Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_TITLE'); ?></strong>
|
||||
<br>
|
||||
<?php
|
||||
if (!empty($this->item->recurrence_type) && empty($this->item->recurrence_first_id)) {
|
||||
echo nl2br(Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_FIRST_TEXT'));
|
||||
} else {
|
||||
echo nl2br(Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_TEXT'));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php //echo HTMLHelper::_('tabs.start', 'det-pane'); ?>
|
||||
|
||||
<!-- DETAILS TAB -->
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_INFO_TAB'), 'editevent-infotab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'editevent-infotab', 'recall' => true, 'breakpoint' => 768]); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-infotab', Text::_('COM_JEM_EDITEVENT_INFO_TAB')); ?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITEVENT_DETAILS_LEGEND'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<li><?php echo $this->form->getLabel('title'); ?><?php echo $this->form->getInput('title'); ?></li>
|
||||
<?php if (is_null($this->item->id)):?>
|
||||
<li><?php echo $this->form->getLabel('alias'); ?><?php echo $this->form->getInput('alias'); ?></li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->form->getLabel('dates'); ?><?php echo $this->form->getInput('dates'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('enddates'); ?><?php echo $this->form->getInput('enddates'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('times'); ?><?php echo $this->form->getInput('times'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('endtimes'); ?><?php echo $this->form->getInput('endtimes'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('cats'); ?><?php echo $this->form->getInput('cats'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('locid'); ?> <?php echo $this->form->getInput('locid'); ?></li>
|
||||
|
||||
</ul>
|
||||
</fieldset>
|
||||
<!-- EVENTDESCRIPTION -->
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EVENT_DESCRIPTION'); ?></legend>
|
||||
|
||||
<div class="clr"></div>
|
||||
<?php echo $this->form->getLabel('articletext'); ?>
|
||||
<div class="clr"><br></div>
|
||||
<?php echo $this->form->getInput('articletext'); ?>
|
||||
</fieldset>
|
||||
|
||||
<!-- IMAGE -->
|
||||
<?php if ($this->item->datimage || $this->jemsettings->imageenabled != 0) : ?>
|
||||
<fieldset class="jem_fldst_image">
|
||||
<legend><?php echo Text::_('COM_JEM_IMAGE'); ?></legend>
|
||||
<?php
|
||||
if ($this->item->datimage) :
|
||||
echo JemOutput::flyer($this->item, $this->dimage, 'event', 'datimage');
|
||||
?><input type="hidden" name="datimage" id="datimage" value="<?php echo $this->item->datimage; ?>" /><?php
|
||||
endif;
|
||||
?>
|
||||
<?php if ($this->jemsettings->imageenabled != 0) : ?>
|
||||
<ul class="adminformlist">
|
||||
<li>
|
||||
<?php /* We get field with id 'jform_userfile' and name 'jform[userfile]' */ ?>
|
||||
<?php echo $this->form->getLabel('userfile'); ?> <?php echo $this->form->getInput('userfile'); ?>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button" class="button3" onclick="document.getElementById('jform_userfile').val() = ''"><?php echo Text::_('JSEARCH_FILTER_CLEAR') ?></button>
|
||||
</li>
|
||||
<?php
|
||||
if ($this->item->datimage) :
|
||||
echo HTMLHelper::image('media/com_jem/images/publish_r.png', null, array('id' => 'userfile-remove', 'data-id' => $this->item->id, 'data-type' => 'events', 'title' => Text::_('COM_JEM_REMOVE_IMAGE')));
|
||||
|
||||
endif;
|
||||
?>
|
||||
<input type="hidden" name="removeimage" id="removeimage" value="0" />
|
||||
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- EXTENDED TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-extendedtab', Text::_('COM_JEM_EDITEVENT_EXTENDED_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_EXTENDED_TAB'), 'editevent-extendedtab'); ?>
|
||||
<?php echo $this->loadTemplate('extended'); ?>
|
||||
|
||||
<!-- PUBLISH TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-publishtab', Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB'), 'editevent-publishtab'); ?>
|
||||
<?php echo $this->loadTemplate('publish'); ?>
|
||||
|
||||
<!-- ATTACHMENTS TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php if (!empty($this->item->attachments) || ($this->jemsettings->attachmentenabled != 0)) : ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'event-attachments', Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB'), 'event-attachments'); ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- OTHER TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'event-other', Text::_('COM_JEM_EVENT_OTHER_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EVENT_OTHER_TAB'), 'event-other'); ?>
|
||||
<?php echo $this->loadTemplate('other'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.end'); ?>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
|
||||
<input type="hidden" name="author_ip" value="<?php echo $this->item->author_ip; ?>" />
|
||||
<?php if ($this->params->get('enable_category', 0) == 1) : ?>
|
||||
<input type="hidden" name="jform[catid]" value="<?php echo $this->params->get('catid', 1); ?>" />
|
||||
<?php endif; ?>
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
31
components/com_jem/views/editevent/tmpl/edit.xml
Normal file
31
components/com_jem/views/editevent/tmpl/edit.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_JEM_EDITEVENT_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_JEM_EDITEVENT_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="introtext"
|
||||
type="textarea"
|
||||
filter="safehtml"
|
||||
default=""
|
||||
rows="8"
|
||||
cols="30"
|
||||
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">COM_JEM_SHOW</option>
|
||||
<option value="0">COM_JEM_HIDE</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
92
components/com_jem/views/editevent/tmpl/edit_attachments.php
Normal file
92
components/com_jem/views/editevent/tmpl/edit_attachments.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?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\Session\Session;
|
||||
?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
|
||||
|
||||
<table class="adminform" id="el-attachments">
|
||||
<tbody>
|
||||
<?php foreach ($this->item->attachments as $file): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_FILE');?></div>
|
||||
<input class="readonly" type="text" readonly="readonly" value="<?php echo $file->file; ?>" />
|
||||
<input type="hidden" name="attached-id[]" value="<?php echo $file->id; ?>" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></div>
|
||||
<?php /* name is always editable, also if attachemnt upload is not allowed */ ?>
|
||||
<input type="text" name="attached-name[]" style="width: 100%" value="<?php echo $file->name; ?>" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></div>
|
||||
<?php /* description is always editable, also if attachemnt upload is not allowed */ ?>
|
||||
<input type="text" name="attached-desc[]" style="width: 100%" value="<?php echo $file->description; ?>" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
|
||||
<?php
|
||||
$attribs = array('class'=>'inputbox', 'size'=>'7');
|
||||
/* if attachment upload is not allowed changing access level should also not possible */
|
||||
if ($this->jemsettings->attachmentenabled == 0) :
|
||||
$attribs['disabled'] = 'disabled';
|
||||
endif;
|
||||
|
||||
echo HTMLHelper::_('select.genericlist', $this->access, 'attached-access[]', $attribs, 'value', 'text', $file->access);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_REMOVE'); ?></div>
|
||||
<?php echo JemOutput::removebutton(Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'), array('id' => 'attach-remove'.$file->id.':'.Session::getFormToken(),'class' => 'attach-remove','title'=>Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'))); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></div>
|
||||
<input type="file" name="attach[]" class="attach-field" /><input type="reset" value="<?php echo Text::_('JSEARCH_FILTER_CLEAR') ?>" class="btn btn-primary">
|
||||
</div>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></div>
|
||||
<input type="text" name="attach-name[]" class="attach-name" value="" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></div>
|
||||
<input type="text" name="attach-desc[]" class="attach-desc" value="" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
|
||||
<?php echo HTMLHelper::_('select.genericlist', $this->access, 'attach-access[]', array('class'=>'inputbox', 'size'=>'7'), 'value', 'text', 1); ?>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
244
components/com_jem/views/editevent/tmpl/edit_extended.php
Normal file
244
components/com_jem/views/editevent/tmpl/edit_extended.php
Normal file
@ -0,0 +1,244 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Date\Date;
|
||||
?>
|
||||
|
||||
<!-- RECURRENCE START -->
|
||||
<div>
|
||||
<fieldset class="panelform">
|
||||
<legend><?php echo Text::_('COM_JEM_RECURRENCE'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<li><?php echo $this->form->getLabel('recurrence_type'); ?> <?php echo $this->form->getInput('recurrence_type', null, $this->item->recurrence_type); ?></li>
|
||||
<li id="recurrence_output"><label></label></li>
|
||||
<li id="counter_row" style="display: none;">
|
||||
<?php echo $this->form->getLabel('recurrence_limit_date'); ?>
|
||||
<?php echo $this->form->getInput('recurrence_limit_date', null, $this->item->recurrence_limit_date); ?>
|
||||
<br><div class="recurrence_notice"><small>
|
||||
<?php
|
||||
switch ($this->item->recurrence_type) {
|
||||
case 1:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_day;
|
||||
break;
|
||||
case 2:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_week;
|
||||
break;
|
||||
case 3:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_month;
|
||||
break;
|
||||
case 4:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_week;
|
||||
break;
|
||||
case 5:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_year;
|
||||
break;
|
||||
default:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_day;
|
||||
break;
|
||||
}
|
||||
|
||||
$limitdate = new Date('now +' . $anticipation . 'month');
|
||||
$limitdate = JemOutput::formatLongDateTime($limitdate->format('Y-m-d'), '');
|
||||
echo Text::sprintf(Text::_('COM_JEM_EDITEVENT_NOTICE_GENSHIELD'), $limitdate);
|
||||
?></small></div>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="hidden" name="recurrence_number" id="recurrence_number" value="<?php echo $this->item->recurrence_number;?>" />
|
||||
<input type="hidden" name="recurrence_number_saved" id="recurrence_number_saved" value="<?php echo $this->item->recurrence_number;?>"></input>
|
||||
<input type="hidden" name="recurrence_byday" id="recurrence_byday" value="<?php echo $this->item->recurrence_byday;?>" />
|
||||
|
||||
<script>
|
||||
|
||||
<!--
|
||||
var $select_output = new Array();
|
||||
$select_output[1] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_DAY');
|
||||
?>";
|
||||
$select_output[2] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_WEEK');
|
||||
?>";
|
||||
$select_output[3] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_MONTH');
|
||||
?>";
|
||||
$select_output[4] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_WEEKDAY');
|
||||
?>";
|
||||
$select_output[5] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_YEAR');
|
||||
?>";
|
||||
|
||||
var $weekday = new Array();
|
||||
$weekday[0] = new Array("MO", "<?php echo Text::_('COM_JEM_MONDAY'); ?>");
|
||||
$weekday[1] = new Array("TU", "<?php echo Text::_('COM_JEM_TUESDAY'); ?>");
|
||||
$weekday[2] = new Array("WE", "<?php echo Text::_('COM_JEM_WEDNESDAY'); ?>");
|
||||
$weekday[3] = new Array("TH", "<?php echo Text::_('COM_JEM_THURSDAY'); ?>");
|
||||
$weekday[4] = new Array("FR", "<?php echo Text::_('COM_JEM_FRIDAY'); ?>");
|
||||
$weekday[5] = new Array("SA", "<?php echo Text::_('COM_JEM_SATURDAY'); ?>");
|
||||
$weekday[6] = new Array("SU", "<?php echo Text::_('COM_JEM_SUNDAY'); ?>");
|
||||
|
||||
var $before_last = "<?php
|
||||
echo Text::_('COM_JEM_BEFORE_LAST');
|
||||
?>";
|
||||
var $last = "<?php
|
||||
echo Text::_('COM_JEM_LAST');
|
||||
?>";
|
||||
start_recurrencescript("jform_recurrence_type");
|
||||
-->
|
||||
</script>
|
||||
|
||||
<?php /* show "old" recurrence settings for information */
|
||||
if (!empty($this->item->recurr_bak->recurrence_type)) {
|
||||
$recurr_type = '';
|
||||
$rlDate = $this->item->recurr_bak->recurrence_limit_date;
|
||||
$recurrence_first_id = $this->item->recurr_bak->recurrence_first_id;
|
||||
if (!empty($rlDate)) {
|
||||
$recurr_limit_date = JemOutput::formatdate($rlDate);
|
||||
} else {
|
||||
$recurr_limit_date = Text::_('COM_JEM_UNLIMITED');
|
||||
}
|
||||
|
||||
switch ($this->item->recurr_bak->recurrence_type) {
|
||||
case 1:
|
||||
$recurr_type = Text::_('COM_JEM_DAILY');
|
||||
$recurr_info = str_ireplace('[placeholder]',
|
||||
$this->item->recurr_bak->recurrence_number,
|
||||
Text::_('COM_JEM_OUTPUT_DAY'));
|
||||
break;
|
||||
case 2:
|
||||
$recurr_type = Text::_('COM_JEM_WEEKLY');
|
||||
$recurr_info = str_ireplace('[placeholder]',
|
||||
$this->item->recurr_bak->recurrence_number,
|
||||
Text::_('COM_JEM_OUTPUT_WEEK'));
|
||||
break;
|
||||
case 3:
|
||||
$recurr_type = Text::_('COM_JEM_MONTHLY');
|
||||
$recurr_info = str_ireplace('[placeholder]',
|
||||
$this->item->recurr_bak->recurrence_number,
|
||||
Text::_('COM_JEM_OUTPUT_MONTH'));
|
||||
break;
|
||||
case 4:
|
||||
$recurr_type = Text::_('COM_JEM_WEEKDAY');
|
||||
$recurr_byday = preg_replace('/(,)([^ ,]+)/', '$1 $2', $this->item->recurr_bak->recurrence_byday);
|
||||
$recurr_days = str_ireplace(array('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SO'),
|
||||
array(Text::_('COM_JEM_MONDAY'), Text::_('COM_JEM_TUESDAY'),
|
||||
Text::_('COM_JEM_WEDNESDAY'), Text::_('COM_JEM_THURSDAY'),
|
||||
Text::_('COM_JEM_FRIDAY'), Text::_('COM_JEM_SATURDAY'),
|
||||
Text::_('COM_JEM_SUNDAY')),
|
||||
$recurr_byday);
|
||||
$recurr_num = str_ireplace(array('6', '7'),
|
||||
array(Text::_('COM_JEM_LAST'), Text::_('COM_JEM_BEFORE_LAST')),
|
||||
$this->item->recurr_bak->recurrence_number);
|
||||
$recurr_info = str_ireplace(array('[placeholder]', '[placeholder_weekday]'),
|
||||
array($recurr_num, $recurr_days),
|
||||
Text::_('COM_JEM_OUTPUT_WEEKDAY'));
|
||||
break;
|
||||
case 5:
|
||||
$recurr_type = Text::_('COM_JEM_YEARLY');
|
||||
$recurr_info = str_ireplace('[placeholder]',
|
||||
$this->item->recurr_bak->recurrence_number,
|
||||
Text::_('COM_JEM_OUTPUT_YEAR'));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!empty($recurr_type)) {
|
||||
?>
|
||||
<hr class="jem-hr" />
|
||||
<p><strong><?php echo Text::_('COM_JEM_RECURRING_INFO_TITLE'); ?></strong></p>
|
||||
<ul class="adminformlist">
|
||||
<li>
|
||||
<label><?php echo Text::_('COM_JEM_RECURRING_FIRST_EVENT_ID'); ?></label>
|
||||
<input type="text" class="readonly" readonly="readonly" value="<?php echo $recurrence_first_id; ?>">
|
||||
</li>
|
||||
<li>
|
||||
<label><?php echo Text::_('COM_JEM_RECURRENCE'); ?></label>
|
||||
<input type="text" class="readonly" readonly="readonly" value="<?php echo $recurr_type; ?>">
|
||||
</li>
|
||||
<li>
|
||||
<div class="clear"></div>
|
||||
<label> </label>
|
||||
<?php echo $recurr_info; ?>
|
||||
</li>
|
||||
<li>
|
||||
<label><?php echo Text::_('COM_JEM_RECURRENCE_COUNTER'); ?></label>
|
||||
<input type="text" class="readonly" readonly="readonly" value="<?php echo $recurr_limit_date; ?>">
|
||||
</li>
|
||||
</ul>
|
||||
<?php
|
||||
}
|
||||
} ?>
|
||||
</fieldset>
|
||||
<!-- RECURRENCE END -->
|
||||
|
||||
<!-- CONTACT START -->
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_JEM_CONTACT'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<li><?php echo $this->form->getLabel('contactid'); ?> <?php echo $this->form->getInput('contactid'); ?></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<!-- CONTACT END -->
|
||||
|
||||
<!-- REGISTRATION START -->
|
||||
<fieldset class="panelform">
|
||||
<legend><?php echo Text::_('COM_JEM_EVENT_REGISTRATION_LEGEND'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<?php if ($this->jemsettings->showfroregistra == 0) : ?>
|
||||
<li><?php echo $this->form->getLabel('registra'); ?> <?php echo Text::_('JNO'); ?></li>
|
||||
<?php else : ?>
|
||||
<?php if ($this->jemsettings->showfroregistra == 1) : ?>
|
||||
<li><?php echo $this->form->getLabel('registra'); ?> <?php echo Text::_('JYES'); ?></li>
|
||||
<?php else : ?>
|
||||
<li><?php echo $this->form->getLabel('registra'); ?> <?php echo $this->form->getInput('registra'); ?></li>
|
||||
<li><div id="registra_from"><label><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_FROM');?></label><?php echo $this->form->getInput('registra_from'); ?><span id="jform_registra_from2"> <?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_FROM_POSTFIX'); ?></span></div></li>
|
||||
<li><div id="registra_until"><label><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL');?></label><?php echo $this->form->getInput('registra_until'); ?><span id="jform_registra_until2"> <?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL_POSTFIX'); ?></span></div></li>
|
||||
<?php endif; ?>
|
||||
<br/>
|
||||
<?php if ($this->jemsettings->regallowinvitation == 1) : ?>
|
||||
<li><?php echo $this->form->getLabel('reginvitedonly'); ?> <?php echo $this->form->getInput('reginvitedonly'); ?></li>
|
||||
<br/>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->form->getLabel('unregistra'); ?> <?php echo $this->form->getInput('unregistra'); ?></li>
|
||||
<br/>
|
||||
<li><div id="unregistra_until"><label></label><?php echo $this->form->getInput('unregistra_until'); ?><span id="jform_unregistra_until2"> <?php echo Text::_('COM_JEM_EVENT_FIELD_ANNULATION_UNTIL_POSTFIX'); ?></span></div></li>
|
||||
<br/>
|
||||
<li><?php echo $this->form->getLabel('maxplaces'); ?> <?php echo $this->form->getInput('maxplaces'); ?></li>
|
||||
<br/>
|
||||
<li><?php echo $this->form->getLabel('minbookeduser'); ?> <?php echo $this->form->getInput('minbookeduser'); ?></li>
|
||||
<br/>
|
||||
<li><?php echo $this->form->getLabel('maxbookeduser'); ?> <?php echo $this->form->getInput('maxbookeduser'); ?></li>
|
||||
<br/>
|
||||
<li><label style='margin-top: 1rem;'><?php echo Text::_ ('COM_JEM_EDITEVENT_FIELD_RESERVED_PLACES');?></label> <?php echo $this->form->getInput('reservedplaces'); ?></li>
|
||||
<br/>
|
||||
<li><?php echo $this->form->getLabel('waitinglist'); ?> <?php echo $this->form->getInput('waitinglist'); ?></li>
|
||||
<br/>
|
||||
<li><?php echo $this->form->getLabel('requestanswer'); ?> <?php echo $this->form->getInput('requestanswer'); ?></li>
|
||||
<br/>
|
||||
<li><?php echo $this->form->getLabel('seriesbooking'); ?> <?php echo $this->form->getInput('seriesbooking'); ?></li>
|
||||
<br/>
|
||||
<li><?php echo $this->form->getLabel('singlebooking'); ?> <?php echo $this->form->getInput('singlebooking'); ?></li>
|
||||
<br/>
|
||||
<?php if ($this->jemsettings->regallowinvitation == 1) : ?>
|
||||
<li><?php echo $this->form->getLabel('invited'); ?> <?php echo $this->form->getInput('invited'); ?></li>
|
||||
<br/>
|
||||
<?php endif; ?>
|
||||
<li><label style='margin-top: 1rem;'><?php echo Text::_ ('COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES');?></label> <?php echo '<input id="event-booked" class="form-control readonly inputbox" type="text" readonly="true" value="' . $this->item->booked . '" />'; ?></li>
|
||||
<br/>
|
||||
<?php if ($this->item->maxplaces): ?>
|
||||
<li><?php echo $this->form->getLabel('avplaces'); ?> <?php echo '<input id="event-available" class="form-control readonly inputbox" type="text" readonly="true" value="' . ($this->item->maxplaces-$this->item->booked-$this->item->reservedplaces) . '" />'; ?></li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
||||
<!-- REGISTRATION END -->
|
||||
36
components/com_jem/views/editevent/tmpl/edit_other.php
Normal file
36
components/com_jem/views/editevent/tmpl/edit_other.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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;
|
||||
|
||||
$max_custom_fields = $this->settings->get('global_editevent_maxnumcustomfields', -1); // default to All
|
||||
?>
|
||||
|
||||
<!-- CUSTOM FIELDS -->
|
||||
<?php if ($max_custom_fields != 0) : ?>
|
||||
<fieldset class="panelform">
|
||||
<legend><?php echo Text::_('COM_JEM_EVENT_CUSTOMFIELDS_LEGEND'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<?php
|
||||
$fields = $this->form->getFieldset('custom');
|
||||
if ($max_custom_fields < 0) :
|
||||
$max_custom_fields = count($fields);
|
||||
endif;
|
||||
$cnt = 0;
|
||||
foreach($fields as $field) :
|
||||
if (++$cnt <= $max_custom_fields) :
|
||||
?><li><?php echo $field->label; ?><?php echo $field->input; ?></li><?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
79
components/com_jem/views/editevent/tmpl/edit_publish.php
Normal file
79
components/com_jem/views/editevent/tmpl/edit_publish.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?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;
|
||||
|
||||
$max_custom_fields = $this->settings->get('global_editevent_maxnumcustomfields', -1); // default to All
|
||||
?>
|
||||
<!--START PUBLISHING FIELDSET -->
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<li><?php echo $this->form->getLabel('featured'); ?><?php echo $this->form->getInput('featured'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('published'); ?><?php echo $this->form->getInput('published'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('access'); ?><?php
|
||||
echo HTMLHelper::_('select.genericlist', $this->access, 'jform[access]',
|
||||
array('list.attr' => ' class="inputbox" size="1"', 'list.select' => $this->item->access, 'option.attr' => 'disabled', 'id' => 'access'));
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<!-- START META FIELDSET -->
|
||||
<fieldset class="">
|
||||
<legend><?php echo Text::_('COM_JEM_META_HANDLING'); ?></legend>
|
||||
<div class="formelm-area">
|
||||
<input class="inputbox" type="button" onclick="insert_keyword('[title]')" value="<?php echo Text::_ ( 'COM_JEM_TITLE' ); ?>" />
|
||||
<input class="inputbox" type="button" onclick="insert_keyword('[a_name]')" value="<?php echo Text::_ ( 'COM_JEM_VENUE' );?>" />
|
||||
<input class="inputbox" type="button" onclick="insert_keyword('[categories]')" value="<?php echo Text::_ ( 'COM_JEM_CATEGORIES' );?>" />
|
||||
<input class="inputbox" type="button" onclick="insert_keyword('[dates]')" value="<?php echo Text::_ ( 'COM_JEM_DATE' );?>" />
|
||||
<input class="inputbox" type="button" onclick="insert_keyword('[times]')" value="<?php echo Text::_ ( 'COM_JEM_TIME' );?>" />
|
||||
<input class="inputbox" type="button" onclick="insert_keyword('[enddates]')" value="<?php echo Text::_ ( 'COM_JEM_ENDDATE' );?>" />
|
||||
<input class="inputbox" type="button" onclick="insert_keyword('[endtimes]')" value="<?php echo Text::_ ( 'COM_JEM_ENDTIME' );?>" />
|
||||
<br /><br />
|
||||
<label for="meta_keywords">
|
||||
<?php echo Text::_('COM_JEM_META_KEYWORDS').':';?>
|
||||
</label>
|
||||
<?php
|
||||
if (! empty ( $this->item->meta_keywords )) {
|
||||
$meta_keywords = $this->item->meta_keywords;
|
||||
} else {
|
||||
$meta_keywords = $this->jemsettings->meta_keywords;
|
||||
}
|
||||
?>
|
||||
<textarea class="inputbox" name="meta_keywords" id="meta_keywords" rows="5" cols="40" maxlength="150" onfocus="get_inputbox('meta_keywords')" onblur="change_metatags()"><?php echo $meta_keywords; ?></textarea>
|
||||
</div>
|
||||
<div class="formelm-area">
|
||||
<label for="meta_description">
|
||||
<?php echo Text::_ ( 'COM_JEM_META_DESCRIPTION' ) . ':';?>
|
||||
</label>
|
||||
<?php
|
||||
if (! empty ( $this->item->meta_description )) {
|
||||
$meta_description = $this->item->meta_description;
|
||||
} else {
|
||||
$meta_description = $this->jemsettings->meta_description;
|
||||
}
|
||||
?>
|
||||
<textarea class="inputbox" name="meta_description" id="meta_description" rows="5" cols="40" maxlength="200" onfocus="get_inputbox('meta_description')" onblur="change_metatags()"><?php echo $meta_description;?></textarea>
|
||||
</div>
|
||||
<!-- include the metatags end-->
|
||||
|
||||
<script>
|
||||
<!--
|
||||
starter("<?php
|
||||
echo Text::_ ( 'COM_JEM_META_ERROR' );
|
||||
?>"); // window.onload is already in use, call the function manualy instead
|
||||
-->
|
||||
</script>
|
||||
</fieldset>
|
||||
<!-- END META FIELDSET -->
|
||||
|
||||
1
components/com_jem/views/editevent/tmpl/index.html
Normal file
1
components/com_jem/views/editevent/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,117 @@
|
||||
<?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\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectContact');
|
||||
?>
|
||||
|
||||
<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" class="jem_select_contact">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_CONTACT'); ?>
|
||||
</h1>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=choosecontact&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div class="jem-row valign-baseline">
|
||||
<div id="jem_filter" class="jem-form jem-row jem-justify-start">
|
||||
<div>
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>';
|
||||
?>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->searchfilter; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '<?php echo Text::_('COM_JEM_SELECT_CONTACT') ?>');"><?php echo Text::_('COM_JEM_NOCONTACT')?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<div>
|
||||
<?php echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> '; ?>
|
||||
</div>
|
||||
<div> </div>
|
||||
<div>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<div class="jem-sort jem-sort-small">
|
||||
<div class="jem-list-row jem-small-list">
|
||||
<div class="sectiontableheader jem-contact-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="sectiontableheader jem-contact-name"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_NAME', 'con.name', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<div class="sectiontableheader jem-contact-city"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_CITY', 'con.suburb', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
<div class="sectiontableheader jem-contact-state"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATE', 'con.state', $this->lists['order_Dir'], $this->lists['order'] ); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist eventtable">
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list"><?php echo Text::_('COM_JEM_NOCONTACTS'); ?></li>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
|
||||
<div class="jem-event-info-small jem-contact-number">
|
||||
<?php echo $this->pagination->getRowOffset( $i ); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-contact-name">
|
||||
<span <?php echo JEMOutput::tooltip(Text::_('COM_JEM_SELECT'), $row->name, 'editlinktip selectcontact'); ?>>
|
||||
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->name)); ?>');"><?php echo $this->escape($row->name); ?></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-contact-city">
|
||||
<?php echo $this->escape($row->suburb); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-contact-state">
|
||||
<?php echo $this->escape($row->state); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<input type="hidden" name="task" value="selectcontact" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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']; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,172 @@
|
||||
<?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\Factory;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectUsers');
|
||||
$checked = 0;
|
||||
|
||||
HTMLHelper::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html');
|
||||
?>
|
||||
|
||||
<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>
|
||||
<script>
|
||||
function checkList(form)
|
||||
{
|
||||
var r='', i, n, e;
|
||||
for (i=0, n=form.elements.length; i<n; i++)
|
||||
{
|
||||
e = form.elements[i];
|
||||
if (e.type == 'checkbox' && e.id.indexOf('cb') === 0 && e.checked)
|
||||
{
|
||||
if (r) { r += ','; }
|
||||
r += e.value;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_select_users">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_USERS_TO_INVITE'); ?>
|
||||
</h1>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=chooseusers&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if(0) : ?>
|
||||
<div class="jem-row valign-baseline">
|
||||
<div id="jem_filter" class="jem-form jem-row jem-justify-start">
|
||||
<div>
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label> ';
|
||||
?>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->searchfilter.' '; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->lists['search']; ?>" class="inputbox" onChange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
<?php /*<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '0');"><?php echo Text::_('COM_JEM_NOUSERS')?></button>*/ ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<div>
|
||||
<?php echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> '; ?>
|
||||
</div>
|
||||
<div> </div>
|
||||
<div>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<div class="jem-sort jem-sort-small">
|
||||
<div class="jem-list-row jem-small-list">
|
||||
<div class="sectiontableheader jem-users-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="sectiontableheader jem-users-checkall"><input type="checkbox" name="checkall-toggle" value="" title="<?php echo Text::_('JGLOBAL_CHECK_ALL'); ?>" onclick="Joomla.checkAll(this)" /></div>
|
||||
<div class="sectiontableheader jem-users-name"><?php echo Text::_('COM_JEM_NAME'); ?></div>
|
||||
<div class="sectiontableheader jem-users-state"><?php echo Text::_('COM_JEM_STATUS'); ?></div>
|
||||
<div class="sectiontableheader jem-users-state"><?php echo Text::_('COM_JEM_PLACES'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist eventtable">
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list"><?php echo Text::_('COM_JEM_NOUSERS'); ?></li>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
|
||||
<div class="jem-event-info-small jem-users-number">
|
||||
<?php echo $this->pagination->getRowOffset( $i ); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-checkall">
|
||||
<?php
|
||||
//echo HTMLHelper::_('grid.id', $i, $row->id);
|
||||
$cb = HTMLHelper::_('grid.id', $i, $row->id);
|
||||
if ($row->status == 0) {
|
||||
// JemHelper::addLogEntry('before: '.$cb, __METHOD__);
|
||||
$cb = preg_replace('/(onclick=)/', 'checked $1', $cb);
|
||||
++$checked;
|
||||
// JemHelper::addLogEntry('after: '.$cb, __METHOD__);
|
||||
}
|
||||
echo $cb;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-name">
|
||||
<?php echo $this->escape($row->name); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-state">
|
||||
<?php echo jemhtml::toggleAttendanceStatus( 0, $row->status, false); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-users-places">
|
||||
<?php echo $this->escape($row->places); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<div class="jem-row jem-justify-start valign-baseline">
|
||||
<div style="padding-right:5px;">
|
||||
<?php echo Text::_('COM_JEM_SELECT');?>
|
||||
</div>
|
||||
<div style="padding-right:10px;">
|
||||
<?php echo Text::_('COM_JEM_PLACES'); ?>
|
||||
</div>
|
||||
<div style="padding-right:10px;">
|
||||
<input id="places" name="places" type="number" style="text-align: center; width:auto;" value="0" max="1" min="0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="selectusers" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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="<?php echo $checked; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<div class="jem-row jem-justify-end">
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>(checkList(document.adminForm), document.adminForm.boxchecked.value);"><?php echo Text::_('COM_JEM_SAVE'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,122 @@
|
||||
<?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\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
$function = Factory::getApplication()->input->getCmd('function', 'jSelectVenue');
|
||||
?>
|
||||
|
||||
<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" class="jem_select_venue">
|
||||
<h1 class='componentheading'>
|
||||
<?php echo Text::_('COM_JEM_SELECT_VENUE'); ?>
|
||||
</h1>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&view=editevent&layout=choosevenue&tmpl=component&function='.$this->escape($function).'&'.Session::getFormToken().'=1'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div class="jem-row valign-baseline">
|
||||
<div id="jem_filter" class="jem-form jem-row jem-justify-start">
|
||||
<div>
|
||||
<?php
|
||||
echo '<label for="filter_type">'.Text::_('COM_JEM_FILTER').'</label>';
|
||||
?>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<?php echo $this->searchfilter; ?>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->filter;?>" class="inputbox" onchange="document.adminForm.submit();" />
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<button type="submit" class="pointer btn btn-primary"><?php echo Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<button type="button" class="pointer btn btn-secondary" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
|
||||
<button type="button" class="pointer btn btn-primary" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('', '<?php echo Text::_('COM_JEM_SELECT_VENUE') ?>');"><?php echo Text::_('COM_JEM_NOVENUE')?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jem-row jem-justify-start jem-nowrap">
|
||||
<div>
|
||||
<?php echo '<label for="limit">'.Text::_('COM_JEM_DISPLAY_NUM').'</label> '; ?>
|
||||
</div>
|
||||
<div> </div>
|
||||
<div>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="jem-hr"/>
|
||||
|
||||
<div class="jem-sort jem-sort-small">
|
||||
<div class="jem-list-row jem-small-list">
|
||||
<div class="sectiontableheader jem-venue-number"><?php echo Text::_('COM_JEM_NUM'); ?></div>
|
||||
<div class="sectiontableheader jem-venue-name"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_VENUE', 'l.venue', $this->lists['order_Dir'], $this->lists['order'], 'selectvenue' ); ?></div>
|
||||
<div class="sectiontableheader jem-venue-city"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_CITY', 'l.city', $this->lists['order_Dir'], $this->lists['order'], 'selectvenue' ); ?></div>
|
||||
<div class="sectiontableheader jem-venue-state"><?php echo HTMLHelper::_('grid.sort', 'COM_JEM_STATE', 'l.state', $this->lists['order_Dir'], $this->lists['order']); ?></div>
|
||||
<div class="sectiontableheader jem-venue-country"><?php echo Text::_('COM_JEM_COUNTRY'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="eventlist eventtable">
|
||||
<?php if (empty($this->rows)) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list"><?php echo Text::_('COM_JEM_NOVENUES'); ?></li>
|
||||
<?php else :?>
|
||||
<?php foreach ($this->rows as $i => $row) : ?>
|
||||
<li class="jem-event jem-list-row jem-small-list row<?php echo $i % 2; ?>">
|
||||
<div class="jem-event-info-small jem-venue-number">
|
||||
<?php echo $this->pagination->getRowOffset( $i ); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-venue-name">
|
||||
<span <?php echo JEMOutput::tooltip(Text::_('COM_JEM_SELECT'), $row->venue, 'editlinktip selectvenue'); ?>>
|
||||
<a class="pointer" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $row->id; ?>', '<?php echo $this->escape(addslashes($row->venue)); ?>');"><?php echo $this->escape($row->venue); ?></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-venue-city">
|
||||
<?php echo $this->escape($row->city); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-venue-state">
|
||||
<?php echo $this->escape($row->state); ?>
|
||||
</div>
|
||||
|
||||
<div class="jem-event-info-small jem-venue-country">
|
||||
<?php echo !empty($row->country) ? $this->escape($row->country) : '-'; ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
|
||||
<input type="hidden" name="task" value="selectvenue" />
|
||||
<input type="hidden" name="option" value="com_jem" />
|
||||
<input type="hidden" name="tmpl" value="component" />
|
||||
<input type="hidden" name="function" value="<?php echo $this->escape($function); ?>" />
|
||||
<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']; ?>" />
|
||||
</form>
|
||||
|
||||
<div class="pagination">
|
||||
<?php echo $this->pagination->getPagesLinks(); ?>
|
||||
</div>
|
||||
</div>
|
||||
319
components/com_jem/views/editevent/tmpl/responsive/edit.php
Normal file
319
components/com_jem/views/editevent/tmpl/responsive/edit.php
Normal file
@ -0,0 +1,319 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$wa = $document->getWebAssetManager();
|
||||
$wa->useScript('keepalive')
|
||||
->useScript('form.validate');
|
||||
|
||||
// Create shortcut to parameters.
|
||||
$params = $this->params;
|
||||
// $settings = json_decode($this->item->attribs);
|
||||
?>
|
||||
|
||||
<script>
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
function checkmaxplaces(){
|
||||
var maxplaces = $('jform_maxplaces');
|
||||
|
||||
if (maxplaces != null){
|
||||
$('#jform_maxplaces').on('change', function(){
|
||||
if ($('#event-available')) {
|
||||
var val = parseInt($('#jform_maxplaces').val());
|
||||
var booked = parseInt($('#event-booked').val());
|
||||
$('event-available').val() = (val-booked);
|
||||
}
|
||||
});
|
||||
|
||||
$('#jform_maxplaces').on('keyup', function(){
|
||||
if ($('event-available')) {
|
||||
var val = parseInt($('jform_maxplaces').val());
|
||||
var booked = parseInt($('event-booked').val());
|
||||
$('event-available').val() = (val-booked);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
checkmaxplaces();
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var $registraCheckbox = $('input[name="jform[registra]"]');
|
||||
var $restOfContent = $(".jem-dl-rest").children("dd, dt");
|
||||
|
||||
$registraCheckbox.on("change", function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$restOfContent.show();
|
||||
} else {
|
||||
$restOfContent.hide();
|
||||
}
|
||||
});
|
||||
|
||||
var $minBookedUserInput = $("#jform_minbookeduser");
|
||||
var $maxBookedUserInput = $("#jform_maxbookeduser");
|
||||
var $maxPlacesInput = $("#jform_maxplaces");
|
||||
var $reservedPlacesInput = $("#jform_reservedplaces");
|
||||
|
||||
$minBookedUserInput
|
||||
.add($maxBookedUserInput)
|
||||
.add($maxPlacesInput)
|
||||
.add($reservedPlacesInput)
|
||||
.on("change", function () {
|
||||
var minBookedUserValue = parseInt($minBookedUserInput.val());
|
||||
var maxBookedUserValue = parseInt($maxBookedUserInput.val());
|
||||
var maxPlacesValue = parseInt($maxPlacesInput.val());
|
||||
var reservedPlacesValue = parseInt($reservedPlacesInput.val());
|
||||
if (minBookedUserValue > maxPlacesValue && maxPlacesValue != 0) {
|
||||
$minBookedUserInput.val(maxPlacesValue);
|
||||
}
|
||||
if (maxBookedUserValue > maxPlacesValue && maxPlacesValue != 0) {
|
||||
$maxBookedUserInput.val(maxPlacesValue);
|
||||
}
|
||||
if (minBookedUserValue > maxBookedUserValue) {
|
||||
$minBookedUserInput.val(maxBookedUserValue);
|
||||
}
|
||||
if (reservedPlacesValue > maxPlacesValue && maxPlacesValue != 0) {
|
||||
$reservedPlacesInput.val(maxPlacesValue);
|
||||
}
|
||||
});
|
||||
|
||||
// Trigger the change event on page load to initialize the state
|
||||
$registraCheckbox.change();
|
||||
$minBookedUserInput.change();
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Joomla.submitbutton = function(task) {
|
||||
if (task == 'event.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) {
|
||||
<?php //echo $this->form->getField('articletext')->save(); ?>
|
||||
Joomla.submitform(task);
|
||||
} else {
|
||||
alert('<?php echo $this->escape(Text::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// window.addEvent('domready', function(){
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
var showUnregistraUntil = function(){
|
||||
var unregistra = $("#jform_unregistra");
|
||||
|
||||
var unregistramode = unregistra.val();
|
||||
|
||||
if (unregistramode == 2) {
|
||||
document.getElementById('unregistra_until').style.display = '';
|
||||
document.getElementById('unregistra_until2').style.display = '';
|
||||
document.getElementById('jform_unregistra_until').style.display = '';
|
||||
document.getElementById('jform_unregistra_until2').style.display = '';
|
||||
} else {
|
||||
document.getElementById('unregistra_until').style.display = 'none';
|
||||
document.getElementById('unregistra_until2').style.display = 'none';
|
||||
document.getElementById('jform_unregistra_until').style.display = 'none';
|
||||
document.getElementById('jform_unregistra_until2').style.display = 'none';
|
||||
}
|
||||
}
|
||||
$("#jform_unregistra").on('change', showUnregistraUntil);
|
||||
showUnregistraUntil();
|
||||
});
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
var showRegistraFrom = function(){
|
||||
var registra = $("#jform_registra");
|
||||
|
||||
var registramode = registra.val();
|
||||
|
||||
if (registramode == 2) {
|
||||
document.getElementById('registra_from').style.display = '';
|
||||
document.getElementById('registra_from2').style.display = '';
|
||||
document.getElementById('registra_until').style.display = '';
|
||||
document.getElementById('registra_until2').style.display = '';
|
||||
document.getElementById('jform_registra_from').style.display = '';
|
||||
document.getElementById('jform_registra_from2').style.display = '';
|
||||
document.getElementById('jform_registra_until').style.display = '';
|
||||
document.getElementById('jform_registra_until2').style.display = '';
|
||||
} else {
|
||||
document.getElementById('registra_from').style.display = 'none';
|
||||
document.getElementById('registra_from2').style.display = 'none';
|
||||
document.getElementById('registra_until').style.display = 'none';
|
||||
document.getElementById('registra_until2').style.display = 'none';
|
||||
document.getElementById('jform_registra_from').style.display = 'none';
|
||||
document.getElementById('jform_registra_from2').style.display = 'none';
|
||||
document.getElementById('jform_registra_until').style.display = 'none';
|
||||
document.getElementById('jform_registra_until2').style.display = 'none';
|
||||
|
||||
}
|
||||
}
|
||||
$("#jform_registra").on('change', showRegistraFrom);
|
||||
showRegistraFrom();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_editevent<?php echo $this->pageclass_sfx; ?>">
|
||||
<div class="edit item-page">
|
||||
<?php if ($params->get('show_page_heading')) : ?>
|
||||
<h1>
|
||||
<?php echo $this->escape($params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<form enctype="multipart/form-data" action="<?php echo Route::_('index.php?option=com_jem&a_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate">
|
||||
|
||||
<button type="submit" class="btn btn-primary" onclick="Joomla.submitbutton('event.save')"><?php echo Text::_('JSAVE') ?></button>
|
||||
<button type="cancel" class="btn btn-secondary" onclick="Joomla.submitbutton('event.cancel')"><?php echo Text::_('JCANCEL') ?></button>
|
||||
|
||||
<br>
|
||||
<?php if ($this->item->recurrence_type > 0) : ?>
|
||||
<div class="description warningrecurrence" style="clear: both;">
|
||||
<div style="float:left;">
|
||||
<?php echo JemOutput::recurrenceicon($this->item, false, false); ?>
|
||||
</div>
|
||||
<div class="floattext" style="margin-left:36px;">
|
||||
<strong><?php echo Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_TITLE'); ?></strong>
|
||||
<br>
|
||||
<?php
|
||||
if (!empty($this->item->recurrence_type) && empty($this->item->recurrence_first_id)) {
|
||||
echo nl2br(Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_FIRST_TEXT'));
|
||||
} else {
|
||||
echo nl2br(Text::_('COM_JEM_EDITEVENT_WARN_RECURRENCE_TEXT'));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php //echo HTMLHelper::_('tabs.start', 'det-pane'); ?>
|
||||
|
||||
<!-- DETAILS TAB -->
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_INFO_TAB'), 'editevent-infotab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'editevent-infotab', 'recall' => true, 'breakpoint' => 768]); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-infotab', Text::_('COM_JEM_EDITEVENT_INFO_TAB')); ?>
|
||||
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_JEM_EDITEVENT_DETAILS_LEGEND'); ?></legend>
|
||||
<dl class="jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('title'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('title'); ?></dd>
|
||||
<?php if (is_null($this->item->id)) : ?>
|
||||
<dt><?php echo $this->form->getLabel('alias'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('alias'); ?></dd>
|
||||
<?php endif; ?>
|
||||
<dt><?php echo $this->form->getLabel('dates'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('dates'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('enddates'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('enddates'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('times'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('times'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('endtimes'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('endtimes'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('cats'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('cats'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('locid'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('locid'); ?></dd>
|
||||
|
||||
</dl>
|
||||
</fieldset>
|
||||
<!-- EVENTDESCRIPTION -->
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_JEM_EDITEVENT_DESCRIPTION_LEGEND'); ?></legend>
|
||||
<div>
|
||||
<?php echo $this->form->getLabel('articletext'); ?>
|
||||
<?php echo $this->form->getInput('articletext'); ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<!-- IMAGE -->
|
||||
<?php if ($this->item->datimage || $this->jemsettings->imageenabled != 0) : ?>
|
||||
<fieldset class="jem_fldst_image">
|
||||
<legend><?php echo Text::_('COM_JEM_IMAGE'); ?></legend>
|
||||
<?php if ($this->jemsettings->imageenabled != 0) : ?>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('userfile'); ?></dt>
|
||||
<?php if ($this->item->datimage) : ?>
|
||||
<dd>
|
||||
<?php echo JEMOutput::flyer($this->item, $this->dimage, 'event', 'datimage'); ?>
|
||||
<input type="hidden" name="datimage" id="datimage" value="<?php echo $this->item->datimage; ?>" />
|
||||
</dd>
|
||||
<dt> </dt>
|
||||
<?php endif; ?>
|
||||
<dd><?php echo $this->form->getInput('userfile'); ?></dd>
|
||||
<dt> </dt>
|
||||
<dd><button type="button" class="button3 btn btn-secondary" onclick="document.getElementById('jform_userfile').value = ''"><?php echo Text::_('JSEARCH_FILTER_CLEAR') ?></button></dd>
|
||||
<?php if ($this->item->datimage) : ?>
|
||||
<dt><?php echo Text::_('COM_JEM_REMOVE_IMAGE'); ?></dt>
|
||||
<dd><?php
|
||||
echo HTMLHelper::image('media/com_jem/images/publish_r.png', null, array('id' => 'userfile-remove', 'data-id' => $this->item->id, 'data-type' => 'events', 'title' => Text::_('COM_JEM_REMOVE_IMAGE'), 'class' => 'btn')); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<input type="hidden" name="removeimage" id="removeimage" value="0" />
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- EXTENDED TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-extendedtab', Text::_('COM_JEM_EDITEVENT_EXTENDED_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_EXTENDED_TAB'), 'editevent-extendedtab'); ?>
|
||||
<?php echo $this->loadTemplate('extended'); ?>
|
||||
|
||||
<!-- PUBLISH TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editevent-publishtab', Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB'), 'editevent-publishtab'); ?>
|
||||
<?php echo $this->loadTemplate('publish'); ?>
|
||||
|
||||
<!-- ATTACHMENTS TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php if (!empty($this->item->attachments) || ($this->jemsettings->attachmentenabled != 0)) : ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'event-attachments', Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EVENT_ATTACHMENTS_TAB'), 'event-attachments'); ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- OTHER TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'event-other', Text::_('COM_JEM_EVENT_OTHER_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EVENT_OTHER_TAB'), 'event-other'); ?>
|
||||
<?php echo $this->loadTemplate('other'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.end'); ?>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
|
||||
<input type="hidden" name="author_ip" value="<?php echo $this->item->author_ip; ?>" />
|
||||
<?php if ($this->params->get('enable_category', 0) == 1) : ?>
|
||||
<input type="hidden" name="jform[catid]" value="<?php echo $this->params->get('catid', 1); ?>" />
|
||||
<?php endif; ?>
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,90 @@
|
||||
<?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\Session\Session;
|
||||
?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
|
||||
|
||||
<table class="adminform">
|
||||
<tbody>
|
||||
<?php foreach ($this->item->attachments as $file) : ?>
|
||||
<tr>
|
||||
<td style="width: 100%;">
|
||||
<dl class="jem-dl">
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></dt>
|
||||
<dd><input class="readonly" type="text" readonly="readonly" value="<?php echo $file->file; ?>" /></dd>
|
||||
<dd><input type="hidden" name="attached-id[]" value="<?php echo $file->id; ?>" /></dd>
|
||||
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></dt>
|
||||
<?php /* name is always editable, also if attachemnt upload is not allowed */ ?>
|
||||
<dd><input type="text" name="attached-name[]" value="<?php echo $file->name; ?>" /></dd>
|
||||
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></dt>
|
||||
<?php /* description is always editable, also if attachemnt upload is not allowed */ ?>
|
||||
<dd><input type="text" name="attached-desc[]" value="<?php echo $file->description; ?>" /></dd>
|
||||
</dl>
|
||||
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
|
||||
<?php //This button just deletes the dl because two times more getParent() in attachment.js is required
|
||||
?>
|
||||
<?php echo Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT') . ' ' . $file->name; ?>
|
||||
<?php echo JemOutput::removebutton(Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'), array('id' => 'attach-remove' . $file->id . ':' . Session::getFormToken(), 'class' => 'attach-remove', 'title' => Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'))); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
|
||||
<?php
|
||||
$attribs = array('class' => 'inputbox form-control', 'size' => '7');
|
||||
/* if attachment upload is not allowed changing access level should also not possible */
|
||||
if ($this->jemsettings->attachmentenabled == 0) :
|
||||
$attribs['disabled'] = 'disabled';
|
||||
endif;
|
||||
|
||||
echo HTMLHelper::_('select.genericlist', $this->access, 'attached-access[]', $attribs, 'value', 'text', $file->access);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
|
||||
<legend><?php echo Text::_('COM_JEM_ADD_USER_REGISTRATIONS') . ' ' . Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
|
||||
<table class="adminform" id="el-attachments">
|
||||
<tbody>
|
||||
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
|
||||
<tr>
|
||||
<td style="width: 100%;">
|
||||
<dl class="jem-dl">
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></dt>
|
||||
<dd><input type="file" name="attach[]" class="attach-field" /><input type="reset" value="<?php echo Text::_('JSEARCH_FILTER_CLEAR') ?>" class="btn btn-primary"></dd>
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></dt>
|
||||
<dd><input type="text" name="attach-name[]" class="attach-name" value="" /></dd>
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></dt>
|
||||
<dd><input type="text" name="attach-desc[]" class="attach-desc" value="" /></dd>
|
||||
</dl>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
|
||||
<?php echo HTMLHelper::_('select.genericlist', $this->access, 'attach-access[]', array('class' => 'inputbox form-control', 'size' => '7'), 'value', 'text', 1); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
@ -0,0 +1,250 @@
|
||||
<?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\Date\Date;
|
||||
?>
|
||||
|
||||
<!-- RECURRENCE START -->
|
||||
|
||||
<fieldset class="panelform" style="margin:0">
|
||||
<legend><?php echo Text::_('COM_JEM_RECURRENCE'); ?></legend>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('recurrence_type'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('recurrence_type', null, $this->item->recurrence_type); ?></dd>
|
||||
<dt> </dt>
|
||||
<dd id="recurrence_output">
|
||||
</dd>
|
||||
<dt> </dt>
|
||||
<dd>
|
||||
<div id="counter_row" style="display: none;">
|
||||
<?php echo $this->form->getLabel('recurrence_limit_date'); ?>
|
||||
<?php echo $this->form->getInput('recurrence_limit_date', null, $this->item->recurrence_limit_date); ?>
|
||||
<br>
|
||||
<div class="recurrence_notice"><small>
|
||||
<?php
|
||||
switch ($this->item->recurrence_type) {
|
||||
case 1:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_day;
|
||||
break;
|
||||
case 2:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_week;
|
||||
break;
|
||||
case 3:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_month;
|
||||
break;
|
||||
case 4:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_week;
|
||||
break;
|
||||
case 5:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_year;
|
||||
break;
|
||||
default:
|
||||
$anticipation = $this->jemsettings->recurrence_anticipation_day;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$limitdate = new Date('now +' . $anticipation . 'month');
|
||||
$limitdate = JemOutput::formatLongDateTime($limitdate->format('Y-m-d'), '');
|
||||
echo Text::sprintf(Text::_('COM_JEM_EDITEVENT_NOTICE_GENSHIELD'), $limitdate);
|
||||
?></small></div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<input type="hidden" name="recurrence_number" id="recurrence_number" value="<?php echo $this->item->recurrence_number; ?>" />
|
||||
<input type="hidden" name="recurrence_number_saved" id="recurrence_number_saved" value="<?php echo $this->item->recurrence_number;?>"></input>
|
||||
<input type="hidden" name="recurrence_byday" id="recurrence_byday" value="<?php echo $this->item->recurrence_byday; ?>" />
|
||||
|
||||
<script>
|
||||
|
||||
<!--
|
||||
var $select_output = new Array();
|
||||
$select_output[1] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_DAY');
|
||||
?>";
|
||||
$select_output[2] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_WEEK');
|
||||
?>";
|
||||
$select_output[3] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_MONTH');
|
||||
?>";
|
||||
$select_output[4] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_WEEKDAY');
|
||||
?>";
|
||||
$select_output[5] = "<?php
|
||||
echo Text::_('COM_JEM_OUTPUT_YEAR');
|
||||
?>";
|
||||
|
||||
var $weekday = new Array();
|
||||
$weekday[0] = new Array("MO", "<?php echo Text::_('COM_JEM_MONDAY'); ?>");
|
||||
$weekday[1] = new Array("TU", "<?php echo Text::_('COM_JEM_TUESDAY'); ?>");
|
||||
$weekday[2] = new Array("WE", "<?php echo Text::_('COM_JEM_WEDNESDAY'); ?>");
|
||||
$weekday[3] = new Array("TH", "<?php echo Text::_('COM_JEM_THURSDAY'); ?>");
|
||||
$weekday[4] = new Array("FR", "<?php echo Text::_('COM_JEM_FRIDAY'); ?>");
|
||||
$weekday[5] = new Array("SA", "<?php echo Text::_('COM_JEM_SATURDAY'); ?>");
|
||||
$weekday[6] = new Array("SU", "<?php echo Text::_('COM_JEM_SUNDAY'); ?>");
|
||||
|
||||
var $before_last = "<?php
|
||||
echo Text::_('COM_JEM_BEFORE_LAST');
|
||||
?>";
|
||||
var $last = "<?php
|
||||
echo Text::_('COM_JEM_LAST');
|
||||
?>";
|
||||
start_recurrencescript("jform_recurrence_type");
|
||||
-->
|
||||
</script>
|
||||
|
||||
<?php /* show "old" recurrence settings for information */
|
||||
if (!empty($this->item->recurr_bak->recurrence_type)) {
|
||||
$recurr_type = '';
|
||||
$rlDate = $this->item->recurr_bak->recurrence_limit_date;
|
||||
$recurrence_first_id = $this->item->recurr_bak->recurrence_first_id;
|
||||
if (!empty($rlDate)) {
|
||||
$recurr_limit_date = JemOutput::formatdate($rlDate);
|
||||
} else {
|
||||
$recurr_limit_date = Text::_('COM_JEM_UNLIMITED');
|
||||
}
|
||||
|
||||
switch ($this->item->recurr_bak->recurrence_type) {
|
||||
case 1:
|
||||
$recurr_type = Text::_('COM_JEM_DAILY');
|
||||
$recurr_info = str_ireplace('[placeholder]',
|
||||
$this->item->recurr_bak->recurrence_number,
|
||||
Text::_('COM_JEM_OUTPUT_DAY'));
|
||||
break;
|
||||
case 2:
|
||||
$recurr_type = Text::_('COM_JEM_WEEKLY');
|
||||
$recurr_info = str_ireplace('[placeholder]',
|
||||
$this->item->recurr_bak->recurrence_number,
|
||||
Text::_('COM_JEM_OUTPUT_WEEK'));
|
||||
break;
|
||||
case 3:
|
||||
$recurr_type = Text::_('COM_JEM_MONTHLY');
|
||||
$recurr_info = str_ireplace('[placeholder]',
|
||||
$this->item->recurr_bak->recurrence_number,
|
||||
Text::_('COM_JEM_OUTPUT_MONTH'));
|
||||
break;
|
||||
case 4:
|
||||
$recurr_type = Text::_('COM_JEM_WEEKDAY');
|
||||
$recurr_byday = preg_replace('/(,)([^ ,]+)/', '$1 $2', $this->item->recurr_bak->recurrence_byday);
|
||||
$recurr_days = str_ireplace(array('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SO'),
|
||||
array(Text::_('COM_JEM_MONDAY'), Text::_('COM_JEM_TUESDAY'),
|
||||
Text::_('COM_JEM_WEDNESDAY'), Text::_('COM_JEM_THURSDAY'),
|
||||
Text::_('COM_JEM_FRIDAY'), Text::_('COM_JEM_SATURDAY'),
|
||||
Text::_('COM_JEM_SUNDAY')),
|
||||
$recurr_byday);
|
||||
$recurr_num = str_ireplace(array('6', '7'),
|
||||
array(Text::_('COM_JEM_LAST'), Text::_('COM_JEM_BEFORE_LAST')),
|
||||
$this->item->recurr_bak->recurrence_number);
|
||||
$recurr_info = str_ireplace(array('[placeholder]', '[placeholder_weekday]'),
|
||||
array($recurr_num, $recurr_days),
|
||||
Text::_('COM_JEM_OUTPUT_WEEKDAY'));
|
||||
break;
|
||||
case 5:
|
||||
$recurr_type = Text::_('COM_JEM_YEARLY');
|
||||
$recurr_info = str_ireplace('[placeholder]',
|
||||
$this->item->recurr_bak->recurrence_number,
|
||||
Text::_('COM_JEM_OUTPUT_YEAR'));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!empty($recurr_type)) {
|
||||
?>
|
||||
<hr class="jem-hr" />
|
||||
<p><strong><?php echo Text::_('COM_JEM_RECURRING_INFO_TITLE'); ?></strong></p>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><label><?php echo Text::_('COM_JEM_RECURRING_FIRST_EVENT_ID'); ?></label></dt>
|
||||
<dd><input type="text" class="readonly" readonly="readonly" value="<?php echo $recurrence_first_id; ?>"></dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_RECURRENCE'); ?></label></dt>
|
||||
<dd><input type="text" class="readonly" readonly="readonly" value="<?php echo $recurr_type; ?>"></dd>
|
||||
<dt><label> </label></dt>
|
||||
<dd><?php echo $recurr_info; ?></dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_RECURRENCE_COUNTER'); ?></label></dt>
|
||||
<dd><input type="text" class="readonly" readonly="readonly" value="<?php echo $recurr_limit_date; ?>"></dd>
|
||||
</dl>
|
||||
<?php
|
||||
}
|
||||
} ?>
|
||||
</fieldset>
|
||||
<!-- RECURRENCE END -->
|
||||
<hr />
|
||||
<!-- CONTACT START -->
|
||||
<fieldset class="panelform" style="margin:0">
|
||||
<legend><?php echo Text::_('COM_JEM_EDITEVENT_FIELD_CONTACT'); ?></legend>
|
||||
<dl class="jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('contactid'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('contactid'); ?></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<!-- CONTACT END -->
|
||||
<hr />
|
||||
<!-- REGISTRATION START -->
|
||||
<fieldset class="" style="margin:0">
|
||||
<legend><?php echo Text::_('COM_JEM_EVENT_REGISTRATION_LEGEND'); ?></legend>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<?php if ($this->jemsettings->showfroregistra == 0) : ?>
|
||||
<dt><?php echo $this->form->getLabel('registra'); ?></dt>
|
||||
<dd><?php echo Text::_('JNO'); ?></dd>
|
||||
<?php else : ?>
|
||||
<?php if ($this->jemsettings->showfroregistra == 1) : ?>
|
||||
<dt><?php echo $this->form->getLabel('registra'); ?></dt>
|
||||
<dd><?php echo Text::_('JYES'); ?></dd>
|
||||
<?php else : ?>
|
||||
<dt><?php echo $this->form->getLabel('registra'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('registra'); ?></dd>
|
||||
<dt><div id="registra_from"><span id="jform_registra_from2"><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_FROM'); ?><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_FROM_POSTFIX'); ?></span></div></dt>
|
||||
<dd><div id="registra_from2"><?php echo $this->form->getInput('registra_from'); ?></div> </dd>
|
||||
<dt><div id="registra_until"><span id="jform_registra_until2"><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL'); ?><?php echo Text::_('COM_JEM_EVENT_FIELD_REGISTRATION_UNTIL_POSTFIX'); ?></span></div></dt>
|
||||
<dd><div id="registra_until2"><?php echo $this->form->getInput('registra_until'); ?></span></div></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<dl class="adminformlist jem-dl jem-dl-rest">
|
||||
<?php if ($this->jemsettings->regallowinvitation == 1) : ?>
|
||||
<dt><?php echo $this->form->getLabel('reginvitedonly'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('reginvitedonly'); ?></dd>
|
||||
<?php endif; ?>
|
||||
<dt><?php echo $this->form->getLabel('unregistra'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('unregistra'); ?></dd>
|
||||
<dt><div id="unregistra_until"><span id="jform_unregistra_until2"><?php echo Text::_('COM_JEM_EVENT_FIELD_ANNULATION_UNTIL'); ?></span></div></dt>
|
||||
<dd><div id="unregistra_until2"><?php echo $this->form->getInput('unregistra_until'); ?></div></dd>
|
||||
<dt><?php echo $this->form->getLabel('maxplaces'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('maxplaces'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('minbookeduser'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('minbookeduser'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('maxbookeduser'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('maxbookeduser'); ?></dd>
|
||||
<dt><label style='margin-top: 1rem;'><?php echo Text::_ ('COM_JEM_EDITEVENT_FIELD_RESERVED_PLACES');?></label><br></dt>
|
||||
<dd><?php echo $this->form->getInput('reservedplaces'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('waitinglist'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('waitinglist'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('requestanswer'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('requestanswer'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('seriesbooking'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('seriesbooking'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('singlebooking'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('singlebooking'); ?></dd>
|
||||
|
||||
<?php if ($this->jemsettings->regallowinvitation == 1) : ?>
|
||||
<dt><?php echo $this->form->getLabel('invited'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('invited'); ?></dd>
|
||||
<?php endif; ?>
|
||||
<dt><label style='margin-top: 1rem;'><?php echo Text::_ ('COM_JEM_EDITEVENT_FIELD_BOOKED_PLACES');?></label><br></dt>
|
||||
<dd><?php echo '<input id="event-booked" class="form-control readonly inputbox" type="text" readonly="true" value="' . $this->item->booked . '" />'; ?></dd>
|
||||
<?php if ($this->item->maxplaces) : ?>
|
||||
<dt><?php echo $this->form->getLabel('avplaces'); ?></dt>
|
||||
<dd><?php echo '<input id="event-available" class="form-control readonly inputbox" type="text" readonly="true" value="' . ($this->item->maxplaces-$this->item->booked-$this->item->reservedplaces) . '" />'; ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</fieldset>
|
||||
@ -0,0 +1,38 @@
|
||||
<?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;
|
||||
|
||||
$max_custom_fields = $this->settings->get('global_editevent_maxnumcustomfields', -1); // default to All
|
||||
?>
|
||||
<!-- CUSTOM FIELDS -->
|
||||
|
||||
<?php if ($max_custom_fields != 0) : ?>
|
||||
<fieldset class="panelform">
|
||||
<legend><?php echo Text::_('COM_JEM_EVENT_CUSTOMFIELDS_LEGEND'); ?></legend>
|
||||
<dl class="adminformlist jem-dl-long">
|
||||
<?php
|
||||
$fields = $this->form->getFieldset('custom');
|
||||
if ($max_custom_fields < 0) :
|
||||
$max_custom_fields = count($fields);
|
||||
endif;
|
||||
$cnt = 0;
|
||||
foreach ($fields as $field) :
|
||||
if (++$cnt <= $max_custom_fields) :
|
||||
?>
|
||||
<dt><?php echo $field->label; ?></dt>
|
||||
<dd><?php echo $field->input; ?></dd>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
@ -0,0 +1,91 @@
|
||||
<?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;
|
||||
?>
|
||||
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_JEM_EDITEVENT_PUBLISH_TAB'); ?></legend>
|
||||
<dl class="jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('featured'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('featured'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('published'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('published'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('access'); ?></dt>
|
||||
<dd><?php
|
||||
echo HTMLHelper::_(
|
||||
'select.genericlist',
|
||||
$this->access,
|
||||
'jform[access]',
|
||||
array('list.attr' => ' class="form-select inputbox" size="1"', 'list.select' => $this->item->access, 'option.attr' => 'disabled', 'id' => 'access')
|
||||
);
|
||||
?>
|
||||
</dd>
|
||||
|
||||
<p> </p>
|
||||
</fieldset>
|
||||
<!-- START META FIELDSET -->
|
||||
<fieldset class="adminform">
|
||||
<legend><?php echo Text::_('COM_JEM_METADATA'); ?></legend>
|
||||
<div class="formelm-area">
|
||||
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[title]')" value="<?php echo Text::_('COM_JEM_TITLE'); ?>" />
|
||||
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[a_name]')" value="<?php echo Text::_('COM_JEM_VENUE'); ?>" />
|
||||
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[categories]')" value="<?php echo Text::_('COM_JEM_CATEGORIES'); ?>" />
|
||||
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[dates]')" value="<?php echo Text::_('COM_JEM_DATE'); ?>" />
|
||||
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[times]')" value="<?php echo Text::_('COM_JEM_TIME'); ?>" />
|
||||
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[enddates]')" value="<?php echo Text::_('COM_JEM_ENDDATE'); ?>" />
|
||||
<input class="inputbox btn btn-secondary" type="button" onclick="insert_keyword('[endtimes]')" value="<?php echo Text::_('COM_JEM_ENDTIME'); ?>" />
|
||||
<br />
|
||||
<br />
|
||||
<?php
|
||||
if (!empty($this->item->meta_keywords)) {
|
||||
$meta_keywords = $this->item->meta_keywords;
|
||||
} else {
|
||||
$meta_keywords = $this->jemsettings->meta_keywords;
|
||||
}
|
||||
?>
|
||||
<dl class="jem-dl">
|
||||
<dt>
|
||||
<label for="meta_keywords">
|
||||
<?php echo Text::_('COM_JEM_META_KEYWORDS') . ':'; ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd><textarea class="inputbox" name="meta_keywords" id="meta_keywords" rows="5" cols="40" maxlength="150" onfocus="get_inputbox('meta_keywords')" onblur="change_metatags()"><?php echo $meta_keywords; ?></textarea></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="formelm-area">
|
||||
<?php
|
||||
if (!empty($this->item->meta_description)) {
|
||||
$meta_description = $this->item->meta_description;
|
||||
} else {
|
||||
$meta_description = $this->jemsettings->meta_description;
|
||||
}
|
||||
?>
|
||||
<dl class="jem-dl">
|
||||
<dt>
|
||||
<label for="meta_description">
|
||||
<?php echo Text::_('COM_JEM_META_DESCRIPTION') . ':'; ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd><textarea class="inputbox" name="meta_description" id="meta_description" rows="5" cols="40" maxlength="200" onfocus="get_inputbox('meta_description')" onblur="change_metatags()"><?php echo $meta_description; ?></textarea></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<!-- include the metatags end-->
|
||||
|
||||
<script>
|
||||
<!--
|
||||
starter("<?php
|
||||
echo Text::_('COM_JEM_META_ERROR');
|
||||
?>"); // window.onload is already in use, call the function manualy instead
|
||||
-->
|
||||
</script>
|
||||
|
||||
</fieldset>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
424
components/com_jem/views/editevent/view.html.php
Normal file
424
components/com_jem/views/editevent/view.html.php
Normal file
@ -0,0 +1,424 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Uri\Uri;
|
||||
use Joomla\CMS\Factory;
|
||||
/**
|
||||
* Editevent-View
|
||||
*/
|
||||
class JemViewEditevent extends JemView
|
||||
{
|
||||
protected $form;
|
||||
protected $item;
|
||||
protected $return_page;
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Editevent-View
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
if ($this->getLayout() == 'choosevenue') {
|
||||
$this->_displaychoosevenue($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->getLayout() == 'choosecontact') {
|
||||
$this->_displaychoosecontact($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->getLayout() == 'chooseusers') {
|
||||
$this->_displaychooseusers($tpl);
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialise variables.
|
||||
$jemsettings = JemHelper::config();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$app = Factory::getApplication();
|
||||
$user = JemFactory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$document = $app->getDocument();
|
||||
$model = $this->getModel();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$pathway = $app->getPathway();
|
||||
$url = Uri::root();
|
||||
|
||||
// Get model data.
|
||||
$this->state = $this->get('State');
|
||||
$this->item = $this->get('Item');
|
||||
$this->params = $this->state->get('params');
|
||||
|
||||
// Create a shortcut for $item and params.
|
||||
$item = $this->item;
|
||||
$params = $this->params;
|
||||
|
||||
$this->form = $this->get('Form');
|
||||
$this->return_page = $this->get('ReturnPage');
|
||||
$this->invited = (array)$this->get('InvitedUsers');
|
||||
|
||||
// check for data error
|
||||
if (empty($item)) {
|
||||
$app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for guest
|
||||
if ($userId == 0) {
|
||||
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($item->id)) {
|
||||
$authorised = (bool)$user->can('add', 'event');
|
||||
} else {
|
||||
$authorised = (bool)$item->params->get('access-edit');
|
||||
}
|
||||
|
||||
$access = isset($item->access) ? $item->access : 0;
|
||||
$authorised = $authorised && in_array($access, $user->getAuthorisedViewLevels());
|
||||
|
||||
if ($authorised !== true) {
|
||||
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Decide which parameters should take priority
|
||||
$useMenuItemParams = ($menuitem && ($menuitem->query['option'] == 'com_jem')
|
||||
&& ($menuitem->query['view'] == 'editevent')
|
||||
&& (0 == $item->id) && (!isset($_GET['from_id']))); // menu item is always for new event
|
||||
|
||||
$title = ($item->id == 0) ? Text::_('COM_JEM_EDITEVENT_ADD_EVENT')
|
||||
: Text::sprintf('COM_JEM_EDITEVENT_EDIT_EVENT', $item->title);
|
||||
|
||||
if ($useMenuItemParams) {
|
||||
$pagetitle = $menuitem->title ? $menuitem->title : $title;
|
||||
$params->def('page_title', $pagetitle);
|
||||
$params->def('page_heading', $pagetitle);
|
||||
$pathwayKeys = array_keys($pathway->getPathway());
|
||||
$lastPathwayEntryIndex = end($pathwayKeys);
|
||||
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
|
||||
//$pathway->setItemName(1, $menuitem->title);
|
||||
|
||||
// Load layout from menu item if one is set else from event if there is one set
|
||||
if (isset($menuitem->query['layout'])) {
|
||||
$this->setLayout($menuitem->query['layout']);
|
||||
} elseif ($layout = $item->params->get('event_layout')) {
|
||||
$this->setLayout($layout);
|
||||
}
|
||||
|
||||
$item->params->merge($params);
|
||||
} else {
|
||||
$pagetitle = $title;
|
||||
|
||||
$params->set('page_title', $pagetitle);
|
||||
$params->set('page_heading', $pagetitle);
|
||||
$params->set('show_page_heading', 1); // ensure page heading is shown
|
||||
$params->set('introtext', ''); // there is definitely no introtext.
|
||||
$params->set('showintrotext', 0);
|
||||
$pathway->addItem($pagetitle, ''); // link not required here so '' is ok
|
||||
|
||||
// Check for alternative layouts (since we are not in an edit-event menu item)
|
||||
// Load layout from event if one is set
|
||||
if ($layout = $item->params->get('event_layout')) {
|
||||
$this->setLayout($layout);
|
||||
}
|
||||
|
||||
$temp = clone($params);
|
||||
$temp->merge($item->params);
|
||||
$item->params = $temp;
|
||||
}
|
||||
|
||||
if (!empty($this->item) && isset($this->item->id)) {
|
||||
// $this->item->images = json_decode($this->item->images);
|
||||
// $this->item->urls = json_decode($this->item->urls);
|
||||
|
||||
$tmp = new stdClass();
|
||||
|
||||
// check for recurrence
|
||||
if (($this->item->recurrence_type != 0) || ($this->item->recurrence_first_id != 0)) {
|
||||
$tmp->recurrence_type = 0;
|
||||
$tmp->recurrence_first_id = 0;
|
||||
}
|
||||
|
||||
// $tmp->images = $this->item->images;
|
||||
// $tmp->urls = $this->item->urls;
|
||||
$this->form->bind($tmp);
|
||||
}
|
||||
|
||||
if (empty($item->id)) {
|
||||
if (!empty($item->catid)) {
|
||||
$this->form->setFieldAttribute('cats', 'prefer', $item->catid);
|
||||
}
|
||||
if (!empty($item->locid)) {
|
||||
$tmp = new stdClass();
|
||||
$tmp->locid = $item->locid;
|
||||
$this->form->bind($tmp);
|
||||
}
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
$errors = $this->get('Errors');
|
||||
if (is_array($errors) && count($errors)) {
|
||||
Factory::getApplication()->enqueueMessage(implode("\n", $errors), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
$access2 = JemHelper::getAccesslevelOptions(true, $access);
|
||||
$this->access = $access2;
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCustomCss();
|
||||
|
||||
// Load scripts
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
$wa->registerScript('jem.attachments', 'com_jem/attachments.js')->useScript('jem.attachments');
|
||||
$wa->registerScript('jem.recurrence', 'com_jem/recurrence.js')->useScript('jem.recurrence');
|
||||
$wa->registerScript('jem.seo', 'com_jem/seo.js')->useScript('jem.seo');
|
||||
$wa->registerScript('jem.unlimited', 'com_jem/unlimited.js')->useScript('jem.unlimited');
|
||||
$wa->registerScript('jem.other', 'com_jem/other.js')->useScript('jem.other');
|
||||
|
||||
// Escape strings for HTML output
|
||||
$pageclass_sfx = $item->params->get('pageclass_sfx');
|
||||
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
$this->dimage = JemImage::flyercreator($this->item->datimage, 'event');
|
||||
$this->jemsettings = $jemsettings;
|
||||
$this->settings = $settings;
|
||||
$this->infoimage = HTMLHelper::_('image', 'com_jem/icon-16-hint.png', Text::_('COM_JEM_NOTES'), NULL, true);
|
||||
|
||||
$this->user = $user;
|
||||
$permissions = new stdClass();
|
||||
$permissions->canAddVenue = $user->can('add', 'venue');
|
||||
$this->permissions = $permissions;
|
||||
|
||||
if ($params->get('enable_category') == 1) {
|
||||
$this->form->setFieldAttribute('catid', 'default', $params->get('catid', 1));
|
||||
$this->form->setFieldAttribute('catid', 'readonly', 'true');
|
||||
}
|
||||
|
||||
// disable for non-publishers
|
||||
if (empty($item->params) || !$item->params->get('access-change', false)) {
|
||||
$this->form->setFieldAttribute('published', 'default', 0);
|
||||
$this->form->setFieldAttribute('published', 'readonly', 'true');
|
||||
}
|
||||
|
||||
// configure image field: show max. file size, and possibly mark field as required
|
||||
$tip = Text::_('COM_JEM_UPLOAD_IMAGE');
|
||||
if ((int)$jemsettings->sizelimit > 0) {
|
||||
$tip .= ' <br/>' . Text::sprintf('COM_JEM_MAX_FILE_SIZE_1', (int)$jemsettings->sizelimit);
|
||||
}
|
||||
$this->form->setFieldAttribute('userfile', 'description', $tip);
|
||||
if ($jemsettings->imageenabled == 2) {
|
||||
$this->form->setFieldAttribute('userfile', 'required', 'true');
|
||||
}
|
||||
|
||||
// configure invited field
|
||||
if ($jemsettings->regallowinvitation == 1) {
|
||||
$this->form->setValue('invited', null, implode(',', $this->invited));
|
||||
$this->form->setFieldAttribute('invited', 'eventid', (int)$this->item->id);
|
||||
}
|
||||
|
||||
$this->_prepareDocument();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$title = $this->params->get('page_title');
|
||||
if ($app->get('sitename_pagetitles', 0) == 1) {
|
||||
$title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title);
|
||||
}
|
||||
elseif ($app->get('sitename_pagetitles', 0) == 2) {
|
||||
$title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename'));
|
||||
}
|
||||
$this->document->setTitle($title);
|
||||
|
||||
// TODO: Is it useful to have meta data in an edit view?
|
||||
// Also shouldn't be "robots" set to "noindex, nofollow"?
|
||||
if ($this->params->get('menu-meta_description')) {
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
|
||||
if ($this->params->get('menu-meta_keywords')) {
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
|
||||
if ($this->params->get('robots')) {
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates the output for the venue select listing
|
||||
*/
|
||||
protected function _displaychoosevenue($tpl)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$jemsettings = JemHelper::config();
|
||||
// $db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$document = $app->getDocument();
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.selectvenue.filter_order', 'filter_order', 'l.venue', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.selectvenue.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word');
|
||||
$filter_type = $app->getUserStateFromRequest('com_jem.selectvenue.filter_type', 'filter_type', 0, 'int');
|
||||
$filter_state = $app->getUserStateFromRequest('com_jem.selectvenue.filter_state', 'filter_state', '*', 'word');
|
||||
$search = $app->getUserStateFromRequest('com_jem.selectvenue.filter_search', 'filter_search', '', 'string');
|
||||
$limitstart = $jinput->get('limitstart', '0', 'int');
|
||||
$limit = $app->getUserStateFromRequest('com_jem.selectvenue.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
|
||||
// Get/Create the model
|
||||
$rows = $this->get('Venues');
|
||||
$pagination = $this->get('VenuesPagination');
|
||||
|
||||
// filter state
|
||||
$lists['state'] = HTMLHelper::_('grid.state', $filter_state);
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
$document->setTitle(Text::_('COM_JEM_SELECT_VENUE'));
|
||||
JemHelper::loadCss('jem');
|
||||
|
||||
$filters = array();
|
||||
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_VENUE'));
|
||||
$filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_CITY'));
|
||||
$filters[] = HTMLHelper::_('select.option', '3', Text::_('COM_JEM_STATE'));
|
||||
$searchfilter = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
|
||||
|
||||
$this->rows = $rows;
|
||||
$this->searchfilter = $searchfilter;
|
||||
$this->pagination = $pagination;
|
||||
$this->lists = $lists;
|
||||
$this->filter = $search;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates the output for the contact select listing
|
||||
*/
|
||||
protected function _displaychoosecontact($tpl)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jinput = Factory::getApplication()->input;
|
||||
$jemsettings = JemHelper::config();
|
||||
// $db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$document = $app->getDocument();
|
||||
|
||||
$filter_order = $app->getUserStateFromRequest('com_jem.selectcontact.filter_order', 'filter_order', 'con.name', 'cmd');
|
||||
$filter_order_Dir = $app->getUserStateFromRequest('com_jem.selectcontact.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
$filter_type = $app->getUserStateFromRequest('com_jem.selectcontact.filter_type', 'filter_type', 0, 'int');
|
||||
$search = $app->getUserStateFromRequest('com_jem.selectcontact.filter_search', 'filter_search', '', 'string');
|
||||
$limitstart = $jinput->get('limitstart', '0', 'int');
|
||||
$limit = $app->getUserStateFromRequest('com_jem.selectcontact.limit', 'limit', $jemsettings->display_num, 'int');
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
|
||||
$document->setTitle(Text::_('COM_JEM_SELECT_CONTACT'));
|
||||
|
||||
// Get/Create the model
|
||||
$rows = $this->get('Contacts');
|
||||
$pagination = $this->get('ContactsPagination');
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
//Build search filter
|
||||
$filters = array();
|
||||
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_NAME'));
|
||||
/* $filters[] = HTMLHelper::_('select.option', '2', Text::_('COM_JEM_ADDRESS')); */ // data security
|
||||
$filters[] = HTMLHelper::_('select.option', '3', Text::_('COM_JEM_CITY'));
|
||||
$filters[] = HTMLHelper::_('select.option', '4', Text::_('COM_JEM_STATE'));
|
||||
$searchfilter = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
|
||||
|
||||
// search filter
|
||||
$lists['search']= $search;
|
||||
|
||||
//assign data to template
|
||||
$this->searchfilter = $searchfilter;
|
||||
$this->lists = $lists;
|
||||
$this->rows = $rows;
|
||||
$this->pagination = $pagination;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates the output for the users select listing
|
||||
*/
|
||||
protected function _displaychooseusers($tpl)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$jinput = $app->input;
|
||||
$jemsettings = JemHelper::config();
|
||||
// $db = Factory::getContainer()->get('DatabaseDriver');
|
||||
$document = $app->getDocument();
|
||||
$model = $this->getModel();
|
||||
|
||||
// no filters, hard-coded
|
||||
$filter_order = 'usr.name';
|
||||
$filter_order_Dir = '';
|
||||
$filter_type = '';
|
||||
$search = '';
|
||||
$limitstart = 0;
|
||||
$limit = 0;
|
||||
$eventId = $jinput->getInt('a_id', 0);
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
|
||||
$document->setTitle(Text::_('COM_JEM_SELECT_USERS_TO_INVITE'));
|
||||
|
||||
// Get/Create the model
|
||||
$model->setState('event.id', $eventId);
|
||||
$rows = $this->get('Users');
|
||||
$pagination = $this->get('UsersPagination');
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
//Build search filter - unused
|
||||
$filters = array();
|
||||
$filters[] = HTMLHelper::_('select.option', '1', Text::_('COM_JEM_NAME'));
|
||||
$searchfilter = HTMLHelper::_('select.genericlist', $filters, 'filter_type', array('size'=>'1','class'=>'inputbox'), 'value', 'text', $filter_type);
|
||||
|
||||
// search filter - unused
|
||||
$lists['search']= $search;
|
||||
|
||||
//assign data to template
|
||||
$this->searchfilter = $searchfilter;
|
||||
$this->lists = $lists;
|
||||
$this->rows = $rows;
|
||||
$this->pagination = $pagination;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
1
components/com_jem/views/editvenue/index.html
Normal file
1
components/com_jem/views/editvenue/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
363
components/com_jem/views/editvenue/tmpl/edit.php
Normal file
363
components/com_jem/views/editvenue/tmpl/edit.php
Normal file
@ -0,0 +1,363 @@
|
||||
<?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\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$wa = $document->getWebAssetManager();
|
||||
$wa->useScript('keepalive')
|
||||
->useScript('form.validate');
|
||||
|
||||
jimport('joomla.html.html.tabs');
|
||||
|
||||
// Create shortcut to parameters.
|
||||
$params = $this->item->params;
|
||||
//$settings = json_decode($this->item->attribs);
|
||||
|
||||
$options = array(
|
||||
'onActive' => 'function(title, description){
|
||||
description.setStyle("display", "block");
|
||||
title.addClass("open").removeClass("closed");
|
||||
}',
|
||||
'onBackground' => 'function(title, description){
|
||||
description.setStyle("display", "none");
|
||||
title.addClass("closed").removeClass("open");
|
||||
}',
|
||||
'startOffset' => 0, // 0 starts on the first tab, 1 starts the second, etc...
|
||||
'useCookie' => true, // this must not be a string. Don't use quotes.
|
||||
);
|
||||
|
||||
# defining values for centering default-map
|
||||
$location = JemHelper::defineCenterMap($this->form);
|
||||
?>
|
||||
|
||||
<script>
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'venue.cancel' || document.formvalidator.isValid(document.getElementById('venue-form'))) {
|
||||
Joomla.submitform(task, document.getElementById('venue-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// window.addEvent('domready', function(){
|
||||
window.onload = (event) => {
|
||||
|
||||
setAttribute();
|
||||
test();
|
||||
}
|
||||
|
||||
function setAttribute(){
|
||||
document.getElementById("tmp_form_postalCode").setAttribute("geo-data", "postal_code");
|
||||
document.getElementById("tmp_form_city").setAttribute("geo-data", "locality");
|
||||
document.getElementById("tmp_form_state").setAttribute("geo-data", "administrative_area_level_1");
|
||||
document.getElementById("tmp_form_street").setAttribute("geo-data", "street_address");
|
||||
document.getElementById("tmp_form_route").setAttribute("geo-data", "route");
|
||||
document.getElementById("tmp_form_streetnumber").setAttribute("geo-data", "street_number");
|
||||
document.getElementById("tmp_form_country").setAttribute("geo-data", "country_short");
|
||||
document.getElementById("tmp_form_latitude").setAttribute("geo-data", "lat");
|
||||
document.getElementById("tmp_form_longitude").setAttribute("geo-data", "lng");
|
||||
document.getElementById("tmp_form_venue").setAttribute("geo-data", "name");
|
||||
}
|
||||
|
||||
function meta(){
|
||||
var f = document.getElementById('venue-form');
|
||||
if(f.jform_meta_keywords.value != "") f.jform_meta_keywords.value += ", ";
|
||||
f.jform_meta_keywords.value += f.jform_venue.value+', ' + f.jform_city.value;
|
||||
}
|
||||
|
||||
function test() {
|
||||
var form = document.getElementById('venue-form');
|
||||
var map = $('#jform_map');
|
||||
var streetcheck = $(form.jform_street).hasClass('required');
|
||||
// if (map && map.checked == true) {
|
||||
if (map && map.is(":checked")) {
|
||||
var lat = $('#jform_latitude');
|
||||
var lon = $('#jform_longitude');
|
||||
|
||||
if (lat.val() == ('' || 0.000000) || lon.val() == ('' || 0.000000)) {
|
||||
if (!streetcheck) {
|
||||
addrequired();
|
||||
}
|
||||
} else {
|
||||
if (lat.val() != ('' || 0.000000) && lon.val() != ('' || 0.000000)) {
|
||||
removerequired();
|
||||
}
|
||||
}
|
||||
$('#mapdiv').show();
|
||||
}
|
||||
|
||||
// if (map && map.checked == false) {
|
||||
if (map && !map.is(":checked")) {
|
||||
removerequired();
|
||||
$('#mapdiv').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function addrequired(){
|
||||
var form = document.getElementById('venue-form');
|
||||
|
||||
$(form.jform_street).addClass('required');
|
||||
$(form.jform_postalCode).addClass('required');
|
||||
$(form.jform_city).addClass('required');
|
||||
$(form.jform_country).addClass('required');
|
||||
}
|
||||
|
||||
function removerequired(){
|
||||
var form = document.getElementById('venue-form');
|
||||
|
||||
$(form.jform_street).removeClass('required');
|
||||
$(form.jform_postalCode).removeClass('required');
|
||||
$(form.jform_city).removeClass('required');
|
||||
$(form.jform_country).removeClass('required');
|
||||
}
|
||||
|
||||
jQuery(function(){
|
||||
jQuery("#geocomplete").geocomplete({
|
||||
map: ".map_canvas",
|
||||
<?php echo $location; ?>
|
||||
details: "form ",
|
||||
detailsAttribute: "geo-data",
|
||||
types: ['establishment', 'geocode'],
|
||||
mapOptions: {
|
||||
zoom: 16,
|
||||
mapTypeId: "hybrid"
|
||||
},
|
||||
markerOptions: {
|
||||
draggable: true
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#geocomplete").bind('geocode:result', function(){
|
||||
var street = jQuery("#tmp_form_street").val();
|
||||
var route = jQuery("#tmp_form_route").val();
|
||||
|
||||
if (route) {
|
||||
/* something to add */
|
||||
} else {
|
||||
jQuery("#tmp_form_street").val('');
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#geocomplete").bind("geocode:dragged", function(event, latLng){
|
||||
jQuery("#tmp_form_latitude").val(latLng.lat());
|
||||
jQuery("#tmp_form_longitude").val(latLng.lng());
|
||||
});
|
||||
|
||||
/* option to attach a reset function to the reset-link
|
||||
jQuery("#reset").click(function(){
|
||||
jQuery("#geocomplete").geocomplete("resetMarker");
|
||||
jQuery("#reset").hide();
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
|
||||
jQuery("#find-left").click(function() {
|
||||
jQuery("#geocomplete").val(jQuery("#jform_street").val() + ", " + jQuery("#jform_postalCode").val() + " " + jQuery("#jform_city").val());
|
||||
jQuery("#geocomplete").trigger("geocode");
|
||||
});
|
||||
|
||||
jQuery("#cp-latlong").click(function() {
|
||||
document.getElementById("jform_latitude").value = document.getElementById("tmp_form_latitude").value;
|
||||
document.getElementById("jform_longitude").value = document.getElementById("tmp_form_longitude").value;
|
||||
test();
|
||||
});
|
||||
|
||||
jQuery("#cp-address").click(function() {
|
||||
document.getElementById("jform_street").value = document.getElementById("tmp_form_street").value;
|
||||
document.getElementById("jform_postalCode").value = document.getElementById("tmp_form_postalCode").value;
|
||||
document.getElementById("jform_city").value = document.getElementById("tmp_form_city").value;
|
||||
document.getElementById("jform_state").value = document.getElementById("tmp_form_state").value;
|
||||
document.getElementById("jform_country").value = document.getElementById("tmp_form_country").value;
|
||||
});
|
||||
|
||||
jQuery("#cp-venue").click(function() {
|
||||
var venue = document.getElementById("tmp_form_venue").value;
|
||||
if (venue) {
|
||||
document.getElementById("jform_venue").value = venue;
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#cp-all").click(function() {
|
||||
jQuery("#cp-address").click();
|
||||
jQuery("#cp-latlong").click();
|
||||
jQuery("#cp-venue").click();
|
||||
});
|
||||
|
||||
jQuery('#jform_map').on('keyup keypress blur change', function() {
|
||||
test();
|
||||
});
|
||||
|
||||
jQuery('#jform_latitude').on('keyup keypress blur change', function() {
|
||||
test();
|
||||
});
|
||||
|
||||
jQuery('#jform_longitude').on('keyup keypress blur change', function() {
|
||||
test();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_editvenue<?php echo $this->pageclass_sfx; ?>">
|
||||
<div class="edit item-page">
|
||||
<?php if ($params->get('show_page_heading')) : ?>
|
||||
<h1>
|
||||
<?php echo $this->escape($params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&a_id=' . (int)$this->item->id); ?>" class="form-validate" method="post" name="adminForm" id="venue-form" enctype="multipart/form-data">
|
||||
|
||||
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('venue.save')"><?php echo Text::_('JSAVE') ?></button>
|
||||
<button type="button" class="btn btn-secondary" onclick="Joomla.submitbutton('venue.cancel')"><?php echo Text::_('JCANCEL') ?></button>
|
||||
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<?php //echo HTMLHelper::_('tabs.start', 'venueTab', $options); ?>
|
||||
|
||||
<!-- VENUE-DETAILS TAB -->
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_INFO_TAB'), 'venue-details'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'venue-details', 'recall' => true, 'breakpoint' => 768]); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'venue-details', Text::_('COM_JEM_EDITVENUE_INFO_TAB')); ?>
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_DETAILS_LEGEND'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<li><?php echo $this->form->getLabel('venue'); ?><?php echo $this->form->getInput('venue'); ?></li>
|
||||
<?php if (is_null($this->item->id)) : ?>
|
||||
<li><?php echo $this->form->getLabel('alias'); ?><?php echo $this->form->getInput('alias'); ?></li>
|
||||
<?php endif; ?>
|
||||
<li><?php echo $this->form->getLabel('street'); ?><?php echo $this->form->getInput('street'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('postalCode'); ?><?php echo $this->form->getInput('postalCode'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('city'); ?><?php echo $this->form->getInput('city'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('state'); ?><?php echo $this->form->getInput('state'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('country'); ?><?php echo $this->form->getInput('country'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('latitude'); ?><?php echo $this->form->getInput('latitude'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('longitude'); ?><?php echo $this->form->getInput('longitude'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('url'); ?><?php echo $this->form->getInput('url'); ?></li>
|
||||
<li><?php echo $this->form->getLabel('published'); ?><?php echo $this->form->getInput('published'); ?></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<!-- VENUE-GEODATA-->
|
||||
<fieldset class="adminform" id="geodata">
|
||||
<legend><?php echo Text::_('COM_JEM_GEODATA_LEGEND'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<li><?php echo $this->form->getLabel('map'); ?><?php echo $this->form->getInput('map'); ?></li>
|
||||
</ul>
|
||||
|
||||
<div class="clr"></div>
|
||||
<div id="mapdiv">
|
||||
<input id="geocomplete" type="text" size="55" placeholder="<?php echo Text::_( 'COM_JEM_VENUE_ADDRPLACEHOLDER' ); ?>" value="" />
|
||||
<input id="find-left" class="geobutton" type="button" value="<?php echo Text::_('COM_JEM_VENUE_ADDR_FINDVENUEDATA'); ?>" />
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="map_canvas"></div>
|
||||
|
||||
<ul class="adminformlist label-button-line">
|
||||
<li><label><?php echo Text::_('COM_JEM_STREET'); ?></label>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_street" readonly="readonly" />
|
||||
<input type="hidden" class="readonly" id="tmp_form_streetnumber" readonly="readonly" />
|
||||
<input type="hidden" class="readonly" id="tmp_form_route" readonly="readonly" />
|
||||
</li>
|
||||
<li><label><?php echo Text::_('COM_JEM_ZIP'); ?></label>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_postalCode" readonly="readonly" />
|
||||
</li>
|
||||
<li><label><?php echo Text::_('COM_JEM_CITY'); ?></label>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_city" readonly="readonly" />
|
||||
</li>
|
||||
<li><label><?php echo Text::_('COM_JEM_STATE'); ?></label>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_state" readonly="readonly" />
|
||||
</li>
|
||||
<li><label><?php echo Text::_('COM_JEM_VENUE'); ?></label>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_venue" readonly="readonly" />
|
||||
</li>
|
||||
<li><label><?php echo Text::_('COM_JEM_COUNTRY'); ?></label>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_country" readonly="readonly" />
|
||||
</li>
|
||||
<li><label><?php echo Text::_('COM_JEM_LATITUDE'); ?></label>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_latitude" readonly="readonly" />
|
||||
</li>
|
||||
<li><label><?php echo Text::_('COM_JEM_LONGITUDE'); ?></label>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_longitude" readonly="readonly" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="clr"></div>
|
||||
<input id="cp-all" class="geobutton" type="button" value="<?php echo Text::_('COM_JEM_VENUE_COPY_DATA'); ?>" style="margin-right: 3em;" />
|
||||
<input id="cp-address" class="geobutton" type="button" value="<?php echo Text::_('COM_JEM_VENUE_COPY_ADDRESS'); ?>" />
|
||||
<input id="cp-venue" class="geobutton" type="button" value="<?php echo Text::_('COM_JEM_VENUE_COPY_VENUE'); ?>" />
|
||||
<input id="cp-latlong" class="geobutton" type="button" value="<?php echo Text::_('COM_JEM_VENUE_COPY_COORDINATES'); ?>" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_DESCRIPTION_LEGEND'); ?></legend>
|
||||
<div class="clr"></div>
|
||||
<?php echo $this->form->getLabel('locdescription'); ?>
|
||||
<div>
|
||||
<div class="clr"><br /></div>
|
||||
<?php echo $this->form->getInput('locdescription'); ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p> </p>
|
||||
|
||||
<!-- EXTENDED TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editvenue-extendedtab', Text::_('COM_JEM_EDITVENUE_EXTENDED_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_EXTENDED_TAB'), 'editvenue-extendedtab'); ?>
|
||||
<?php echo $this->loadTemplate('extended'); ?>
|
||||
|
||||
|
||||
<!-- PUBLISHING TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'venue-publishtab', Text::_('COM_JEM_EDITVENUE_PUBLISH_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_PUBLISH_TAB'), 'venue-publishtab'); ?>
|
||||
<?php echo $this->loadTemplate('publish'); ?>
|
||||
|
||||
<!-- ATTACHMENTS TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php if (!empty($this->item->attachments) || ($this->jemsettings->attachmentenabled != 0)) : ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'venue-attachments', Text::_('COM_JEM_EDITVENUE_ATTACHMENTS_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_ATTACHMENTS_TAB'), 'venue-attachments'); ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- OTHER TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'venue-other', Text::_('COM_JEM_EDITVENUE_OTHER_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_OTHER_TAB'), 'venue-other' ); ?>
|
||||
<?php echo $this->loadTemplate('other'); ?>
|
||||
|
||||
<?php //echo HTMLHelper::_('tabs.end'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<input type="hidden" name="country" id="country" geo-data="country_short" value="">
|
||||
<input type="hidden" name="author_ip" value="<?php echo $this->item->author_ip; ?>" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
31
components/com_jem/views/editvenue/tmpl/edit.xml
Normal file
31
components/com_jem/views/editvenue/tmpl/edit.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_JEM_EDITVENUE_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_JEM_EDITVENUE_VIEW_DEFAULT_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
<fields name="params">
|
||||
<fieldset name="basic">
|
||||
<field name="introtext"
|
||||
type="textarea"
|
||||
filter="safehtml"
|
||||
default=""
|
||||
rows="8"
|
||||
cols="30"
|
||||
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">COM_JEM_SHOW</option>
|
||||
<option value="0">COM_JEM_HIDE</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
92
components/com_jem/views/editvenue/tmpl/edit_attachments.php
Normal file
92
components/com_jem/views/editvenue/tmpl/edit_attachments.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?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\Session\Session;
|
||||
?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
|
||||
|
||||
<table class="adminform" id="el-attachments">
|
||||
<tbody>
|
||||
<?php foreach ($this->item->attachments as $file): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></div>
|
||||
<input class="form-control readonly valid form-control-success w-75" type="text" readonly="readonly" value="<?php echo $file->file; ?>"/>
|
||||
<input type="hidden" name="attached-id[]" value="<?php echo $file->id; ?>"/>
|
||||
</div>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></div>
|
||||
<?php /* name is always editable, also if attachemnt upload is not allowed */ ?>
|
||||
<input type="text" name="attached-name[]" style="width: 100%" value="<?php echo $file->name; ?>" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></div>
|
||||
<?php /* description is always editable, also if attachemnt upload is not allowed */ ?>
|
||||
<input type="text" name="attached-desc[]" style="width: 100%" value="<?php echo $file->description; ?>" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
|
||||
<?php
|
||||
$attribs = array('class'=>'inputbox', 'size'=>'7');
|
||||
/* if attachment upload is not allowed changing access level should also not possible */
|
||||
if ($this->jemsettings->attachmentenabled == 0) :
|
||||
$attribs['disabled'] = 'disabled';
|
||||
endif;
|
||||
|
||||
echo HTMLHelper::_('select.genericlist', $this->access, 'attached-access[]', $attribs, 'value', 'text', $file->access);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_REMOVE'); ?></div>
|
||||
<?php echo JemOutput::removebutton(Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'), array('id' => 'attach-remove'.$file->id.':'.Session::getFormToken(),'class' => 'attach-remove','title'=>Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'))); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
|
||||
<tr>
|
||||
<td width="100%">
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></div>
|
||||
<input type="file" name="attach[]" class="attach-field" /> <input type="reset" value="<?php echo Text::_('JSEARCH_FILTER_CLEAR') ?>" class="btn btn-primary">
|
||||
</div>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></div>
|
||||
<input type="text" name="attach-name[]" class="attach-name" value="" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></div>
|
||||
<input type="text" name="attach-desc[]" class="attach-desc" value="" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div class="title"><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
|
||||
<?php echo HTMLHelper::_('select.genericlist', $this->access, 'attach-access[]', array('class'=>'inputbox', 'size'=>'7'), 'value', 'text', 1); ?>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
53
components/com_jem/views/editvenue/tmpl/edit_extended.php
Normal file
53
components/com_jem/views/editvenue/tmpl/edit_extended.php
Normal 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;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
|
||||
//$max_custom_fields = $this->settings->get('global_editvenue_maxnumcustomfields', -1); // default to All
|
||||
?>
|
||||
|
||||
<!-- IMAGE -->
|
||||
<?php if ($this->item->locimage || $this->jemsettings->imageenabled != 0) : ?>
|
||||
<fieldset class="jem_fldst_image">
|
||||
<legend><?php echo Text::_('COM_JEM_IMAGE'); ?></legend>
|
||||
<?php
|
||||
if ($this->item->locimage) :
|
||||
echo JemOutput::flyer($this->item, $this->limage, 'venue', 'locimage');
|
||||
?><input type="hidden" name="locimage" id="locimage" value="<?php echo $this->item->locimage; ?>" /><?php
|
||||
endif;
|
||||
?>
|
||||
<?php if ($this->jemsettings->imageenabled != 0) : ?>
|
||||
<ul class="adminformlist">
|
||||
<li>
|
||||
<?php /* We get field with id 'jform_userfile' and name 'jform[userfile]' */ ?>
|
||||
<?php echo $this->form->getLabel('userfile'); ?> <?php echo $this->form->getInput('userfile'); ?>
|
||||
<button type="button" class="button3 btn-sm btn-secondary" onclick="document.getElementById('jform_userfile').value = ''"><?php echo Text::_('JSEARCH_FILTER_CLEAR') ?></button>
|
||||
<?php
|
||||
if ($this->item->locimage) :
|
||||
echo HTMLHelper::image('media/com_jem/images/publish_r.png', null, array('id' => 'userfile-remove', 'data-id' => $this->item->id, 'data-type' => 'venues', 'title' => Text::_('COM_JEM_REMOVE_IMAGE')));
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="hidden" name="removeimage" id="removeimage" value="0" />
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- URL -->
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_URL_LEGEND'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<li><?php echo $this->form->getLabel('url'); ?><?php echo $this->form->getInput('url'); ?></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
|
||||
38
components/com_jem/views/editvenue/tmpl/edit_other.php
Normal file
38
components/com_jem/views/editvenue/tmpl/edit_other.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?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;
|
||||
|
||||
$max_custom_fields = $this->settings->get('global_editvenue_maxnumcustomfields', -1); // default to All
|
||||
?>
|
||||
|
||||
<!-- CUSTOM FIELDS -->
|
||||
<?php if ($max_custom_fields != 0) : ?>
|
||||
<fieldset class="panelform">
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_CUSTOMFIELDS'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<?php
|
||||
$fields = $this->form->getFieldset('custom');
|
||||
if ($max_custom_fields < 0) :
|
||||
$max_custom_fields = count($fields);
|
||||
endif;
|
||||
$cnt = 0;
|
||||
foreach($fields as $field) :
|
||||
if (++$cnt <= $max_custom_fields) :
|
||||
?><li><?php echo $field->label; ?><?php echo $field->input; ?></li><?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
33
components/com_jem/views/editvenue/tmpl/edit_publish.php
Normal file
33
components/com_jem/views/editvenue/tmpl/edit_publish.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?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;
|
||||
|
||||
//$max_custom_fields = $this->settings->get('global_editvenue_maxnumcustomfields', -1); // default to All
|
||||
?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_PUBLISHING_LEGEND'); ?></legend>
|
||||
<ul class="adminformlist">
|
||||
<li><?php echo $this->form->getLabel('published'); ?><?php echo $this->form->getInput('published'); ?></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<!-- META -->
|
||||
<fieldset class="">
|
||||
<legend><?php echo Text::_('COM_JEM_META_HANDLING'); ?></legend>
|
||||
<input type="button" class="button" value="<?php echo Text::_('COM_JEM_ADD_VENUE_CITY'); ?>" onclick="meta()" />
|
||||
<?php foreach ($this->form->getFieldset('meta') as $field) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label; ?></div>
|
||||
<div class="controls"><?php echo $field->input; ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</fieldset>
|
||||
|
||||
1
components/com_jem/views/editvenue/tmpl/index.html
Normal file
1
components/com_jem/views/editvenue/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
372
components/com_jem/views/editvenue/tmpl/responsive/edit.php
Normal file
372
components/com_jem/views/editvenue/tmpl/responsive/edit.php
Normal file
@ -0,0 +1,372 @@
|
||||
<?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\Router\Route;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$document = $app->getDocument();
|
||||
$wa = $document->getWebAssetManager();
|
||||
$wa->useScript('keepalive')
|
||||
->useScript('form.validate');
|
||||
|
||||
jimport('joomla.html.html.tabs');
|
||||
|
||||
// Create shortcut to parameters.
|
||||
$params = $this->item->params;
|
||||
//$settings = json_decode($this->item->attribs);
|
||||
|
||||
$options = array(
|
||||
'onActive' => 'function(title, description){
|
||||
description.setStyle("display", "block");
|
||||
title.addClass("open").removeClass("closed");
|
||||
}',
|
||||
'onBackground' => 'function(title, description){
|
||||
description.setStyle("display", "none");
|
||||
title.addClass("closed").removeClass("open");
|
||||
}',
|
||||
'startOffset' => 0, // 0 starts on the first tab, 1 starts the second, etc...
|
||||
'useCookie' => true, // this must not be a string. Don't use quotes.
|
||||
);
|
||||
|
||||
# defining values for centering default-map
|
||||
$location = JemHelper::defineCenterMap($this->form);
|
||||
?>
|
||||
|
||||
<script>
|
||||
Joomla.submitbutton = function(task) {
|
||||
if (task == 'venue.cancel' || document.formvalidator.isValid(document.getElementById('venue-form'))) {
|
||||
Joomla.submitform(task, document.getElementById('venue-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// window.addEvent('domready', function() {
|
||||
window.onload = (event) => {
|
||||
|
||||
setAttribute();
|
||||
test();
|
||||
}
|
||||
|
||||
function setAttribute() {
|
||||
document.getElementById("tmp_form_postalCode").setAttribute("geo-data", "postal_code");
|
||||
document.getElementById("tmp_form_city").setAttribute("geo-data", "locality");
|
||||
document.getElementById("tmp_form_state").setAttribute("geo-data", "administrative_area_level_1");
|
||||
document.getElementById("tmp_form_street").setAttribute("geo-data", "street_address");
|
||||
document.getElementById("tmp_form_route").setAttribute("geo-data", "route");
|
||||
document.getElementById("tmp_form_streetnumber").setAttribute("geo-data", "street_number");
|
||||
document.getElementById("tmp_form_country").setAttribute("geo-data", "country_short");
|
||||
document.getElementById("tmp_form_latitude").setAttribute("geo-data", "lat");
|
||||
document.getElementById("tmp_form_longitude").setAttribute("geo-data", "lng");
|
||||
document.getElementById("tmp_form_venue").setAttribute("geo-data", "name");
|
||||
}
|
||||
|
||||
function meta() {
|
||||
var f = document.getElementById('venue-form');
|
||||
if (f.jform_meta_keywords.value != "") f.jform_meta_keywords.value += ", ";
|
||||
f.jform_meta_keywords.value += f.jform_venue.value + ', ' + f.jform_city.value;
|
||||
}
|
||||
|
||||
function test() {
|
||||
var form = document.getElementById('venue-form');
|
||||
var map = $('#jform_map');
|
||||
var streetcheck = $(form.jform_street).hasClass('required');
|
||||
// if (map && map.checked == true) {
|
||||
if (map && map.is(":checked")) {
|
||||
var lat = $('#jform_latitude');
|
||||
var lon = $('#jform_longitude');
|
||||
|
||||
if (lat.val() == ('' || 0.000000) || lon.val() == ('' || 0.000000)) {
|
||||
if (!streetcheck) {
|
||||
addrequired();
|
||||
}
|
||||
} else {
|
||||
if (lat.val() != ('' || 0.000000) && lon.val() != ('' || 0.000000)) {
|
||||
removerequired();
|
||||
}
|
||||
}
|
||||
$('#mapdiv').show();
|
||||
}
|
||||
|
||||
// if (map && map.checked == false) {
|
||||
if (map && !map.is(":checked")) {
|
||||
removerequired();
|
||||
$('#mapdiv').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function addrequired() {
|
||||
var form = document.getElementById('venue-form');
|
||||
|
||||
$(form.jform_street).addClass('required');
|
||||
$(form.jform_postalCode).addClass('required');
|
||||
$(form.jform_city).addClass('required');
|
||||
$(form.jform_country).addClass('required');
|
||||
}
|
||||
|
||||
function removerequired() {
|
||||
var form = document.getElementById('venue-form');
|
||||
|
||||
$(form.jform_street).removeClass('required');
|
||||
$(form.jform_postalCode).removeClass('required');
|
||||
$(form.jform_city).removeClass('required');
|
||||
$(form.jform_country).removeClass('required');
|
||||
}
|
||||
|
||||
jQuery(function() {
|
||||
jQuery("#geocomplete").geocomplete({
|
||||
map: ".map_canvas",
|
||||
<?php echo $location; ?>
|
||||
details: "form ",
|
||||
detailsAttribute: "geo-data",
|
||||
types: ['establishment', 'geocode'],
|
||||
mapOptions: {
|
||||
zoom: 16,
|
||||
mapTypeId: "hybrid"
|
||||
},
|
||||
markerOptions: {
|
||||
draggable: true
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#geocomplete").bind('geocode:result', function() {
|
||||
var street = jQuery("#tmp_form_street").val();
|
||||
var route = jQuery("#tmp_form_route").val();
|
||||
|
||||
if (route) {
|
||||
/* something to add */
|
||||
} else {
|
||||
jQuery("#tmp_form_street").val('');
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#geocomplete").bind("geocode:dragged", function(event, latLng) {
|
||||
jQuery("#tmp_form_latitude").val(latLng.lat());
|
||||
jQuery("#tmp_form_longitude").val(latLng.lng());
|
||||
});
|
||||
|
||||
/* option to attach a reset function to the reset-link
|
||||
jQuery("#reset").click(function(){
|
||||
jQuery("#geocomplete").geocomplete("resetMarker");
|
||||
jQuery("#reset").hide();
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
|
||||
jQuery("#find-left").click(function() {
|
||||
jQuery("#geocomplete").val(jQuery("#jform_street").val() + ", " + jQuery("#jform_postalCode").val() + " " + jQuery("#jform_city").val());
|
||||
jQuery("#geocomplete").trigger("geocode");
|
||||
});
|
||||
|
||||
jQuery("#cp-latlong").click(function() {
|
||||
document.getElementById("jform_latitude").value = document.getElementById("tmp_form_latitude").value;
|
||||
document.getElementById("jform_longitude").value = document.getElementById("tmp_form_longitude").value;
|
||||
test();
|
||||
});
|
||||
|
||||
jQuery("#cp-address").click(function() {
|
||||
document.getElementById("jform_street").value = document.getElementById("tmp_form_street").value;
|
||||
document.getElementById("jform_postalCode").value = document.getElementById("tmp_form_postalCode").value;
|
||||
document.getElementById("jform_city").value = document.getElementById("tmp_form_city").value;
|
||||
document.getElementById("jform_state").value = document.getElementById("tmp_form_state").value;
|
||||
document.getElementById("jform_country").value = document.getElementById("tmp_form_country").value;
|
||||
});
|
||||
|
||||
jQuery("#cp-venue").click(function() {
|
||||
var venue = document.getElementById("tmp_form_venue").value;
|
||||
if (venue) {
|
||||
document.getElementById("jform_venue").value = venue;
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("#cp-all").click(function() {
|
||||
jQuery("#cp-address").click();
|
||||
jQuery("#cp-latlong").click();
|
||||
jQuery("#cp-venue").click();
|
||||
});
|
||||
|
||||
jQuery('#jform_map').on('keyup keypress blur change', function() {
|
||||
test();
|
||||
});
|
||||
|
||||
jQuery('#jform_latitude').on('keyup keypress blur change', function() {
|
||||
test();
|
||||
});
|
||||
|
||||
jQuery('#jform_longitude').on('keyup keypress blur change', function() {
|
||||
test();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id="jem" class="jem_editvenue<?php echo $this->pageclass_sfx; ?>">
|
||||
<div class="edit item-page">
|
||||
<?php if ($params->get('show_page_heading')) : ?>
|
||||
<h1>
|
||||
<?php echo $this->escape($params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="<?php echo Route::_('index.php?option=com_jem&a_id=' . (int) $this->item->id); ?>" class="form-validate" method="post" name="adminForm" id="venue-form" enctype="multipart/form-data">
|
||||
|
||||
<button type="submit" class="positive btn btn-primary" onclick="Joomla.submitbutton('venue.save')"><?php echo Text::_('JSAVE') ?></button>
|
||||
<button type="cancel" class="negative btn btn-secondary" onclick="Joomla.submitbutton('venue.cancel')"><?php echo Text::_('JCANCEL') ?></button>
|
||||
|
||||
<br>
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php //echo HTMLHelper::_('tabs.start', 'venueTab', $options); ?>
|
||||
|
||||
<!-- VENUE-DETAILS TAB -->
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_INFO_TAB'), 'venue-details'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'venue-details', 'recall' => true, 'breakpoint' => 768]); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'venue-details', Text::_('COM_JEM_EDITVENUE_INFO_TAB')); ?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_DETAILS_LEGEND'); ?></legend>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('venue'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('venue'); ?></dd>
|
||||
<?php if (is_null($this->item->id)) : ?>
|
||||
<dt><?php echo $this->form->getLabel('alias'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('alias'); ?></dd>
|
||||
<?php endif; ?>
|
||||
<dt><?php echo $this->form->getLabel('street'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('street'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('postalCode'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('postalCode'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('city'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('city'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('state'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('state'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('country'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('country'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('latitude'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('latitude'); ?></dd>
|
||||
<dt><?php echo $this->form->getLabel('longitude'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('longitude'); ?></dd>
|
||||
</dl>
|
||||
|
||||
</fieldset>
|
||||
<p> </p>
|
||||
|
||||
<!-- VENUE-GEODATA-->
|
||||
<?php
|
||||
$global_show_mapserv = $this->settings->get('global_show_mapserv');
|
||||
if ($global_show_mapserv == 2 || $global_show_mapserv == 3 || $global_show_mapserv == 5) : ?>
|
||||
<fieldset class="adminform" id="geodata">
|
||||
<legend><?php echo Text::_('COM_JEM_GEODATA_LEGEND'); ?></legend>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('map'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('map'); ?></dd>
|
||||
</dl>
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
<div id="mapdiv">
|
||||
<div class="jem-row jem-justify-start">
|
||||
<div><input id="geocomplete" class="form-control" type="text" size="55" placeholder="<?php echo Text::_('COM_JEM_VENUE_ADDRPLACEHOLDER'); ?>" value="" /></div>
|
||||
<div><input id="find-left" class="btn" type="button" value="<?php echo Text::_('COM_JEM_VENUE_ADDR_FINDVENUEDATA'); ?>" /></div>
|
||||
</div>
|
||||
|
||||
<div class="map_canvas"></div>
|
||||
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><label><?php echo Text::_('COM_JEM_STREET'); ?></label></dt>
|
||||
<dd>
|
||||
<input type="text" disabled="disabled" class="readonly" id="tmp_form_street" readonly="readonly" />
|
||||
<input type="hidden" class="readonly" id="tmp_form_streetnumber" readonly="readonly" />
|
||||
<input type="hidden" class="readonly" id="tmp_form_route" readonly="readonly" />
|
||||
</dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_ZIP'); ?></label></dt>
|
||||
<dd><input type="text" disabled="disabled" class="readonly" id="tmp_form_postalCode" readonly="readonly" /></dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_CITY'); ?></label></dt>
|
||||
<dd><input type="text" disabled="disabled" class="readonly" id="tmp_form_city" readonly="readonly" /></dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_STATE'); ?></label></dt>
|
||||
<dd><input type="text" disabled="disabled" class="readonly" id="tmp_form_state" readonly="readonly" /></dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_VENUE'); ?></label></dt>
|
||||
<dd><input type="text" disabled="disabled" class="readonly" id="tmp_form_venue" readonly="readonly" /></dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_COUNTRY'); ?></label></dt>
|
||||
<dd><input type="text" disabled="disabled" class="readonly" id="tmp_form_country" readonly="readonly" /></dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_LATITUDE'); ?></label></dt>
|
||||
<dd><input type="text" disabled="disabled" class="readonly" id="tmp_form_latitude" readonly="readonly" /></dd>
|
||||
<dt><label><?php echo Text::_('COM_JEM_LONGITUDE'); ?></label></dt>
|
||||
<dd><input type="text" disabled="disabled" class="readonly" id="tmp_form_longitude" readonly="readonly" /></dd>
|
||||
</dl>
|
||||
|
||||
<div style="clear: both;"><br /></div>
|
||||
<div class="jem-row jem-justify-start">
|
||||
<input id="cp-all" class="btn" type="button" value="<?php echo Text::_('COM_JEM_VENUE_COPY_DATA'); ?>" />
|
||||
<input id="cp-address" class="btn" type="button" value="<?php echo Text::_('COM_JEM_VENUE_COPY_ADDRESS'); ?>" />
|
||||
<input id="cp-venue" class="btn" type="button" value="<?php echo Text::_('COM_JEM_VENUE_COPY_VENUE'); ?>" />
|
||||
<input id="cp-latlong" class="btn" type="button" value="<?php echo Text::_('COM_JEM_VENUE_COPY_COORDINATES'); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_DESCRIPTION_LEGEND'); ?></legend>
|
||||
<div style="clear: both;"><br /></div>
|
||||
<div>
|
||||
<?php echo $this->form->getLabel('locdescription'); ?>
|
||||
<?php echo $this->form->getInput('locdescription'); ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p> </p>
|
||||
|
||||
<!-- EXTENDED TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editvenue-extendedtab', Text::_('COM_JEM_EDITVENUE_EXTENDED_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_EXTENDED_TAB'), 'editvenue-extendedtab'); ?>
|
||||
<?php echo $this->loadTemplate('extended'); ?>
|
||||
|
||||
|
||||
<!-- PUBLISHING TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'venue-publishtab', Text::_('COM_JEM_EDITVENUE_PUBLISH_TAB')); ?>
|
||||
<?php // echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_PUBLISH_TAB'), 'venue-publishtab'); ?>
|
||||
<?php echo $this->loadTemplate('publish'); ?>
|
||||
|
||||
<!-- ATTACHMENTS TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php if (!empty($this->item->attachments) || ($this->jemsettings->attachmentenabled != 0)) : ?>
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'venue-attachments', Text::_('COM_JEM_EDITVENUE_ATTACHMENTS_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_ATTACHMENTS_TAB'), 'venue-attachmentstab'); ?>
|
||||
<?php echo $this->loadTemplate('attachments'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- MORE TAB -->
|
||||
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'venue-other', Text::_('COM_JEM_EDITVENUE_OTHER_TAB')); ?>
|
||||
<?php //echo HTMLHelper::_('tabs.panel', Text::_('COM_JEM_EDITVENUE_OTHER_TAB'), 'venue-othertab'); ?>
|
||||
<?php echo $this->loadTemplate('other'); ?>
|
||||
|
||||
<?php //echo HTMLHelper::_('tabs.end'); ?>
|
||||
<?php echo HTMLHelper::_('uitab.endTab'); ?>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<input type="hidden" name="country" id="country" geo-data="country_short" value="">
|
||||
<input type="hidden" name="author_ip" value="<?php echo $this->item->author_ip; ?>" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,90 @@
|
||||
<?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\Session\Session;
|
||||
?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
|
||||
|
||||
<table class="adminform">
|
||||
<tbody>
|
||||
<?php foreach ($this->item->attachments as $file) : ?>
|
||||
<tr>
|
||||
<td style="width: 100%;">
|
||||
<dl class="jem-dl">
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></dt>
|
||||
<dd><input class="form-control readonly valid form-control-success w-75" type="text" readonly="readonly" value="<?php echo $file->file; ?>" /></dd>
|
||||
<dd><input type="hidden" name="attached-id[]" value="<?php echo $file->id; ?>" /></dd>
|
||||
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></dt>
|
||||
<?php /* name is always editable, also if attachemnt upload is not allowed */ ?>
|
||||
<dd><input type="text" name="attached-name[]" value="<?php echo $file->name; ?>" /></dd>
|
||||
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></dt>
|
||||
<?php /* description is always editable, also if attachemnt upload is not allowed */ ?>
|
||||
<dd><input type="text" name="attached-desc[]" value="<?php echo $file->description; ?>" /></dd>
|
||||
|
||||
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
|
||||
<?php //This button just deletes the dl because two times more getParent() in attachment.js is required
|
||||
?>
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_REMOVE') . ' ' . $file->name; ?></dt>
|
||||
<dd><?php echo JemOutput::removebutton(Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'), array('id' => 'attach-remove' . $file->id . ':' . Session::getFormToken(), 'class' => 'attach-remove btn', 'title' => Text::_('COM_JEM_GLOBAL_REMOVE_ATTACHEMENT'))); ?></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
|
||||
<?php
|
||||
$attribs = array('class' => 'inputbox', 'size' => '7');
|
||||
/* if attachment upload is not allowed changing access level should also not possible */
|
||||
if ($this->jemsettings->attachmentenabled == 0) :
|
||||
$attribs['disabled'] = 'disabled';
|
||||
endif;
|
||||
|
||||
echo HTMLHelper::_('select.genericlist', $this->access, 'attached-access[]', $attribs, 'value', 'text', $file->access);
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<p> </p>
|
||||
|
||||
<legend><?php echo Text::_('COM_JEM_ADD_USER_REGISTRATIONS') . ' ' . Text::_('COM_JEM_ATTACHMENTS_LEGEND'); ?></legend>
|
||||
<table class="adminform" id="el-attachments">
|
||||
<tbody>
|
||||
<?php if ($this->jemsettings->attachmentenabled != 0) : ?>
|
||||
<tr>
|
||||
<td style="width: 100%;">
|
||||
<dl class="jem-dl">
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_FILE'); ?></dt>
|
||||
<dd><input type="file" name="attach[]" class="attach-field" /> <input type="reset" value="<?php echo Text::_('JSEARCH_FILTER_CLEAR') ?>" class="btn btn-primary"></dd>
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_NAME'); ?></dt>
|
||||
<dd><input type="text" name="attach-name[]" class="attach-name" value="" /></dd>
|
||||
<dt><?php echo Text::_('COM_JEM_ATTACHMENT_DESCRIPTION'); ?></dt>
|
||||
<dd><input type="text" name="attach-desc[]" class="attach-desc" value="" /></dd>
|
||||
</dl>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<div><?php echo Text::_('COM_JEM_ATTACHMENT_ACCESS'); ?></div>
|
||||
<?php echo HTMLHelper::_('select.genericlist', $this->access, 'attach-access[]', array('class' => 'inputbox', 'size' => '7'), 'value', 'text', 1); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
@ -0,0 +1,51 @@
|
||||
<?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;
|
||||
?>
|
||||
|
||||
|
||||
<!-- IMAGE -->
|
||||
<?php if ($this->item->locimage || $this->jemsettings->imageenabled != 0) : ?>
|
||||
<fieldset class="jem_fldst_image">
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_IMAGE_LEGEND'); ?></legend>
|
||||
<?php if ($this->jemsettings->imageenabled != 0) : ?>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('userfile'); ?></dt>
|
||||
<?php if ($this->item->locimage) : ?>
|
||||
<dd>
|
||||
<?php echo JEMOutput::flyer($this->item, $this->limage, 'venue', 'locimage'); ?>
|
||||
<input type="hidden" name="locimage" id="locimage" value="<?php echo $this->item->locimage; ?>" />
|
||||
</dd>
|
||||
<dt> </dt>
|
||||
<?php endif; ?>
|
||||
<dd><?php echo $this->form->getInput('userfile'); ?></dd>
|
||||
<dt> </dt>
|
||||
<dd><button type="button" class="button3 btn" onclick="document.getElementById('jform_userfile').value = ''"><?php echo Text::_('JSEARCH_FILTER_CLEAR') ?></button></dd>
|
||||
<?php if ($this->item->locimage) : ?>
|
||||
<dt><?php echo Text::_('COM_JEM_REMOVE_IMAGE'); ?></dt>
|
||||
<dd><?php
|
||||
echo HTMLHelper::image('media/com_jem/images/publish_r.png', null, array('id' => 'userfile-remove', 'data-id' => $this->item->id, 'data-type' => 'venues', 'title' => Text::_('COM_JEM_REMOVE_IMAGE'), 'class' =>'btn')); ?>
|
||||
</dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<input type="hidden" name="removeimage" id="removeimage" value="0" />
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_URL_LEGEND'); ?></legend>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('url'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('url'); ?></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
@ -0,0 +1,38 @@
|
||||
<?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;
|
||||
|
||||
$max_custom_fields = $this->settings->get('global_editvenue_maxnumcustomfields', -1); // default to All
|
||||
?>
|
||||
|
||||
<!-- CUSTOM FIELDS -->
|
||||
<?php if ($max_custom_fields != 0) : ?>
|
||||
<fieldset class="panelform">
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_CUSTOMFIELDS'); ?></legend>
|
||||
<dl class="adminformlist jem-dl-long">
|
||||
<?php
|
||||
$fields = $this->form->getFieldset('custom');
|
||||
if ($max_custom_fields < 0) :
|
||||
$max_custom_fields = count($fields);
|
||||
endif;
|
||||
$cnt = 0;
|
||||
foreach ($fields as $field) :
|
||||
if (++$cnt <= $max_custom_fields) :
|
||||
?>
|
||||
<dt><?php echo $field->label; ?></dt>
|
||||
<dd><?php echo $field->input; ?></dd>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
@ -0,0 +1,35 @@
|
||||
<?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;
|
||||
|
||||
//$max_custom_fields = $this->settings->get('global_editvenue_maxnumcustomfields', -1); // default to All
|
||||
?>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo Text::_('COM_JEM_EDITVENUE_PUBLISHING_LEGEND'); ?></legend>
|
||||
<dl class="adminformlist jem-dl">
|
||||
<dt><?php echo $this->form->getLabel('published'); ?></dt>
|
||||
<dd><?php echo $this->form->getInput('published'); ?></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
<!-- META -->
|
||||
<fieldset class="">
|
||||
<legend><?php echo Text::_('COM_JEM_METADATA'); ?></legend>
|
||||
<input type="button" class="button btn" value="<?php echo Text::_('COM_JEM_ADD_VENUE_CITY'); ?>" onclick="meta()" />
|
||||
<p> </p>
|
||||
<?php foreach ($this->form->getFieldset('meta') as $field) : ?>
|
||||
<dl class="jem-dl">
|
||||
<dt class="control-label"><?php echo $field->label; ?></dt>
|
||||
<dd class="controls"><?php echo $field->input; ?></dd>
|
||||
</dl>
|
||||
<?php endforeach; ?>
|
||||
</fieldset>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
242
components/com_jem/views/editvenue/view.html.php
Normal file
242
components/com_jem/views/editvenue/view.html.php
Normal file
@ -0,0 +1,242 @@
|
||||
<?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;
|
||||
/**
|
||||
* Editvenue-View
|
||||
*/
|
||||
class JemViewEditvenue extends JemView
|
||||
{
|
||||
protected $form;
|
||||
protected $item;
|
||||
protected $return_page;
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Editvenue-View
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Initialise variables.
|
||||
$jemsettings = JemHelper::config();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$app = Factory::getApplication();
|
||||
$user = JemFactory::getUser();
|
||||
$document = $app->getDocument();
|
||||
$model = $this->getModel();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$pathway = $app->getPathway();
|
||||
$url = Uri::root();
|
||||
|
||||
$language = Factory::getApplication()->getLanguage();
|
||||
$language = $language->getTag();
|
||||
$language = substr($language, 0,2);
|
||||
|
||||
// Get model data.
|
||||
$this->state = $this->get('State');
|
||||
$this->item = $this->get('Item');
|
||||
$this->params = $this->state->get('params');
|
||||
|
||||
// Create a shortcut for $item and params.
|
||||
$item = $this->item;
|
||||
$params = $this->params;
|
||||
|
||||
$this->form = $this->get('Form');
|
||||
$this->return_page = $this->get('ReturnPage');
|
||||
|
||||
// check for data error
|
||||
if (empty($item)) {
|
||||
$app->enqueueMessage(Text::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// check for guest
|
||||
if (!$user || $user->id == 0) {
|
||||
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (empty($item->id)) {
|
||||
// Check if the user has access to the form
|
||||
$authorised = $user->can('add', 'venue');
|
||||
} else {
|
||||
// Check if user can edit
|
||||
$authorised = $user->can('edit', 'venue', $item->id, $item->created_by);
|
||||
}
|
||||
|
||||
if ($authorised !== true) {
|
||||
$app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'), 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Decide which parameters should take priority
|
||||
$useMenuItemParams = ($menuitem && $menuitem->query['option'] == 'com_jem'
|
||||
&& $menuitem->query['view'] == 'editvenue'
|
||||
&& 0 == $item->id); // menu item is always for new venues
|
||||
|
||||
$title = ($item->id == 0) ? Text::_('COM_JEM_EDITVENUE_VENUE_ADD')
|
||||
: Text::sprintf('COM_JEM_EDITVENUE_VENUE_EDIT', $item->venue);
|
||||
|
||||
if ($useMenuItemParams) {
|
||||
$pagetitle = $menuitem->title ? $menuitem->title : $title;
|
||||
$params->def('page_title', $pagetitle);
|
||||
$params->def('page_heading', $pagetitle);
|
||||
$pathwayKeys = array_keys($pathway->getPathway());
|
||||
$lastPathwayEntryIndex = end($pathwayKeys);
|
||||
$pathway->setItemName($lastPathwayEntryIndex, $menuitem->title);
|
||||
//$pathway->setItemName(1, $menuitem->title);
|
||||
|
||||
// Load layout from menu item if one is set else from venue if there is one set
|
||||
if (isset($menuitem->query['layout'])) {
|
||||
$this->setLayout($menuitem->query['layout']);
|
||||
} elseif ($layout = $item->params->get('venue_layout')) {
|
||||
$this->setLayout($layout);
|
||||
}
|
||||
|
||||
$item->params->merge($params);
|
||||
} else {
|
||||
$pagetitle = $title;
|
||||
$params->set('page_title', $pagetitle);
|
||||
$params->set('page_heading', $pagetitle);
|
||||
$params->set('show_page_heading', 1); // ensure page heading is shown
|
||||
$params->set('introtext', ''); // there is no introtext in that case
|
||||
$params->set('showintrotext', 0);
|
||||
$pathway->addItem($pagetitle, ''); // link not required here so '' is ok
|
||||
|
||||
// Check for alternative layouts (since we are not in an edit-venue menu item)
|
||||
// Load layout from venue if one is set
|
||||
if ($layout = $item->params->get('venue_layout')) {
|
||||
$this->setLayout($layout);
|
||||
}
|
||||
|
||||
$temp = clone($params);
|
||||
$temp->merge($item->params);
|
||||
$item->params = $temp;
|
||||
}
|
||||
|
||||
$publisher = $user->can('publish', 'venue', $item->id, $item->created_by);
|
||||
|
||||
if (!empty($this->item) && isset($this->item->id)) {
|
||||
// $this->item->images = json_decode($this->item->images);
|
||||
// $this->item->urls = json_decode($this->item->urls);
|
||||
|
||||
$tmp = new stdClass();
|
||||
// $tmp->images = $this->item->images;
|
||||
// $tmp->urls = $this->item->urls;
|
||||
$this->form->bind($tmp);
|
||||
}
|
||||
|
||||
// Check for errors.
|
||||
$errors = $this->get('Errors');
|
||||
if (is_array($errors) && count($errors)) {
|
||||
\Joomla\CMS\Factory::getApplication()->enqueueMessage(implode("\n", $errors), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
$access2 = JemHelper::getAccesslevelOptions(true);
|
||||
$this->access = $access2;
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('geostyle');
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
// Load script
|
||||
|
||||
// HTMLHelper::_('script', 'com_jem/attachments.js', false, true);
|
||||
// HTMLHelper::_('script', 'com_jem/other.js', false, true);
|
||||
$document->addScript($url.'media/com_jem/js/attachments.js');
|
||||
$document->addScript($url.'media/com_jem/js/other.js');
|
||||
$key = trim($settings->get('global_googleapi', ''));
|
||||
// $document->addScript('https://maps.googleapis.com/maps/api/js?'.(!empty($key) ? 'key='.$key.'&' : '').'sensor=false&libraries=places&language='.$language);
|
||||
|
||||
// Noconflict
|
||||
$document->addCustomTag( '<script>jQuery.noConflict();</script>' );
|
||||
|
||||
// JQuery scripts
|
||||
$document->addScript('https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
|
||||
|
||||
// HTMLHelper::_('script', 'com_jem/jquery.geocomplete.js', false, true);
|
||||
// $document->addScript($url.'media/com_jem/js/jquery.geocomplete.js');
|
||||
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
|
||||
|
||||
$wa->registerScript('jem.jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js')->useScript('jem.jquery');
|
||||
$wa->registerScript('jem.jquery_map', 'https://maps.googleapis.com/maps/api/js?'.(!empty($key) ? 'key='.$key.'&' : '').'sensor=false&libraries=places&language='.$language)->useScript('jem.jquery_map');
|
||||
$wa->registerScript('jem.geocomplete', 'com_jem/jquery.geocomplete.js')->useScript('jem.geocomplete');
|
||||
// No permissions required/useful on this view
|
||||
$permissions = new stdClass();
|
||||
|
||||
$pageclass_sfx = $item->params->get('pageclass_sfx');
|
||||
$this->pageclass_sfx = $pageclass_sfx ? htmlspecialchars($pageclass_sfx) : $pageclass_sfx;
|
||||
$this->jemsettings = $jemsettings;
|
||||
$this->settings = $settings;
|
||||
$this->permissions = $permissions;
|
||||
$this->limage = JemImage::flyercreator($this->item->locimage, 'venue');
|
||||
$this->infoimage = HTMLHelper::_('image', 'com_jem/icon-16-hint.png', Text::_('COM_JEM_NOTES'), NULL, true);
|
||||
$this->user = $user;
|
||||
|
||||
if (!$publisher) {
|
||||
$this->form->setFieldAttribute('published', 'default', 0);
|
||||
$this->form->setFieldAttribute('published', 'readonly', 'true');
|
||||
}
|
||||
|
||||
// configure image field: show max. file size, and possibly mark field as required
|
||||
$tip = Text::_('COM_JEM_UPLOAD_IMAGE');
|
||||
if ((int)$jemsettings->sizelimit > 0) {
|
||||
$tip .= ' <br/>' . Text::sprintf('COM_JEM_MAX_FILE_SIZE_1', (int)$jemsettings->sizelimit);
|
||||
}
|
||||
$this->form->setFieldAttribute('userfile', 'description', $tip);
|
||||
if ($jemsettings->imageenabled == 2) {
|
||||
$this->form->setFieldAttribute('userfile', 'required', 'true');
|
||||
}
|
||||
|
||||
$this->_prepareDocument();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prepares the document
|
||||
*/
|
||||
protected function _prepareDocument()
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
|
||||
$title = $this->params->get('page_title');
|
||||
if ($app->get('sitename_pagetitles', 0) == 1) {
|
||||
$title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title);
|
||||
}
|
||||
elseif ($app->get('sitename_pagetitles', 0) == 2) {
|
||||
$title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename'));
|
||||
}
|
||||
$this->document->setTitle($title);
|
||||
|
||||
// TODO: Is it useful to have meta data in an edit view?
|
||||
// Also shouldn't be "robots" set to "noindex, nofollow"?
|
||||
if ($this->params->get('menu-meta_description')) {
|
||||
$this->document->setDescription($this->params->get('menu-meta_description'));
|
||||
}
|
||||
|
||||
if ($this->params->get('menu-meta_keywords')) {
|
||||
$this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
|
||||
}
|
||||
|
||||
if ($this->params->get('robots')) {
|
||||
$this->document->setMetadata('robots', $this->params->get('robots'));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
1
components/com_jem/views/event/calendar/index.html
Normal file
1
components/com_jem/views/event/calendar/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
411
components/com_jem/views/event/calendar/tmpl/default.php
Normal file
411
components/com_jem/views/event/calendar/tmpl/default.php
Normal file
@ -0,0 +1,411 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.1
|
||||
* @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;
|
||||
?>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = strftime('%Y', strtotime($row->dates));
|
||||
$month = strftime('%m', strtotime($row->dates));
|
||||
$day = strftime('%d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = JRoute::_('index.php?option=com_jem&view=day&id='.$year.$month.$day . $this->param_topcat);
|
||||
$var1b = JText::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.JText::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.JText::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = JRoute::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = JRoute::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="catz" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$color = '<div id="eventcontenttop" class="eventcontenttop">';
|
||||
$color .= $colorpic;
|
||||
$color .= '</div>';
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = JHtml::_("image","com_jem/arrow-left.png",'', NULL, true);
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = JHtml::_("image","com_jem/arrow-middle.png",'', NULL, true);
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = JHtml::_("image","com_jem/arrow-right.png",'', NULL, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.JText::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.JText::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= JText::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= JText::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= JText::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= JText::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.JText::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '<div class="eventcontentinner" style="background-color:'.array_pop($catcolor).'">';
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
} else {
|
||||
$content .= '<div class="eventcontentinner">' . $colorpic;
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
}
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton();
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons">
|
||||
<div class="calendarButtonsToggle">
|
||||
<div id="buttonshowall" class="btn btn-outline-dark">
|
||||
<?php echo JText::_('COM_JEM_SHOWALL'); ?>
|
||||
</div>
|
||||
<div id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo JText::_('COM_JEM_HIDEALL'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons">
|
||||
<div class="calendarButtonsToggle">
|
||||
<div id="buttonshowall" class="btn btn-outline-dark">
|
||||
<?php echo JText::_('COM_JEM_SHOWALL'); ?>
|
||||
</div>
|
||||
<div id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo JText::_('COM_JEM_HIDEALL'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr"></div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends">
|
||||
<?php
|
||||
if ($displayLegend == 1) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<div class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
126
components/com_jem/views/event/calendar/tmpl/default.xml
Normal file
126
components/com_jem/views/event/calendar/tmpl/default.xml
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_JEM_CALENDAR_VIEW_DEFAULT_TITLE">
|
||||
<message>
|
||||
<![CDATA[COM_JEM_CALENDAR_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=""
|
||||
rows="8"
|
||||
cols="30"
|
||||
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">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="displayLegend" type="list"
|
||||
default="1"
|
||||
label="COM_JEM_DISPLAY_LEGEND"
|
||||
description="COM_JEM_DISPLAY_LEGEND_DESC"
|
||||
>
|
||||
<option value="0">JNO</option>
|
||||
<option value="2">COM_JEM_ABOVE</option>
|
||||
<option value="1">COM_JEM_BELOW</option>
|
||||
</field>
|
||||
<field name="show_only_start" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWONLYSTARTDAY"
|
||||
description="COM_JEM_SHOWONLYSTARTDAY_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="firstweekday" type="list"
|
||||
default="1"
|
||||
label="COM_JEM_SELECTFIRSTWEEKDAY"
|
||||
description="COM_JEM_SELECTFIRSTWEEKDAYDESC"
|
||||
>
|
||||
<option value="0">COM_JEM_SUNDAY</option>
|
||||
<option value="1">COM_JEM_MONDAY</option>
|
||||
</field>
|
||||
<field name="daylimit" type="text"
|
||||
default="10"
|
||||
label="COM_JEM_MAX_EVENTS_PER_DAY"
|
||||
description="COM_JEM_MAX_EVENTS_PER_DAY_DESC"
|
||||
/>
|
||||
<field name="show_addevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWADDEVENTICON"
|
||||
description="COM_JEM_SHOWADDEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="show_editevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWEDITEVENTICON"
|
||||
description="COM_JEM_SHOWEDITEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="show_copyevent_icon" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_SHOWCOPYEVENTICON"
|
||||
description="COM_JEM_SHOWCOPYEVENTICON_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field type="spacer" name="myspacer3" hr="true" />
|
||||
<field name="eventlinkcolor" type="color"
|
||||
default="#000000"
|
||||
label="COM_JEM_CALENDAR_EVENTLINKCOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTLINKCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventbackgroundcolor" type="color"
|
||||
default="#FFFF00"
|
||||
label="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTBACKGROUNDCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventbg_usecatcolor" type="radio"
|
||||
default="0"
|
||||
label="COM_JEM_CALENDAR_USECATCOLOR"
|
||||
description="COM_JEM_CALENDAR_USECATCOLOR_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field name="currentdaycolor" type="color"
|
||||
default="#CCCC99"
|
||||
label="COM_JEM_CALENDAR_CURRENTDAYCOLOR"
|
||||
description="COM_JEM_CALENDAR_CURRENTDAYCOLOR_DESC"
|
||||
/>
|
||||
<field name="eventandmorecolor" type="color"
|
||||
default="#FFFF00"
|
||||
label="COM_JEM_CALENDAR_EVENTANDMORECOLOR"
|
||||
description="COM_JEM_CALENDAR_EVENTANDMORECOLOR_DESC"
|
||||
/>
|
||||
</fieldset>
|
||||
</fields>
|
||||
</metadata>
|
||||
1
components/com_jem/views/event/calendar/tmpl/index.html
Normal file
1
components/com_jem/views/event/calendar/tmpl/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
@ -0,0 +1,413 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.1
|
||||
* @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;
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
td.today div.daynum::before,
|
||||
td.today div.daynum::after {
|
||||
background-color: <?php echo $this->params->get('currentdaycolor'); ?>;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="jem" class="jlcalendar jem_calendar<?php echo $this->pageclass_sfx;?>">
|
||||
<div class="buttons">
|
||||
<?php
|
||||
$btn_params = array('print_link' => $this->print_link);
|
||||
echo JemOutput::createButtonBar($this->getName(), $this->permissions, $btn_params);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_page_heading', 1)): ?>
|
||||
<h1 class="componentheading">
|
||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||
</h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->params->get('showintrotext')) : ?>
|
||||
<div class="description no_space floattext">
|
||||
<?php echo $this->params->get('introtext'); ?>
|
||||
</div>
|
||||
<p> </p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$countcatevents = array ();
|
||||
$countperday = array();
|
||||
$limit = $this->params->get('daylimit', 10);
|
||||
$evbg_usecatcolor = $this->params->get('eventbg_usecatcolor', 0);
|
||||
$showtime = $this->settings->get('global_show_timedetails', 1);
|
||||
|
||||
foreach ($this->rows as $row) :
|
||||
if (!JemHelper::isValidDate($row->dates)) {
|
||||
continue; // skip, open date !
|
||||
}
|
||||
|
||||
//get event date
|
||||
$year = strftime('%Y', strtotime($row->dates));
|
||||
$month = strftime('%m', strtotime($row->dates));
|
||||
$day = strftime('%d', strtotime($row->dates));
|
||||
|
||||
@$countperday[$year.$month.$day]++;
|
||||
if ($countperday[$year.$month.$day] == $limit+1) {
|
||||
$var1a = JRoute::_('index.php?option=com_jem&view=day&id='.$year.$month.$day . $this->param_topcat);
|
||||
$var1b = JText::_('COM_JEM_AND_MORE');
|
||||
$var1c = "<a href=\"".$var1a."\">".$var1b."</a>";
|
||||
$id = 'eventandmore';
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $var1c, null, $id);
|
||||
continue;
|
||||
} elseif ($countperday[$year.$month.$day] > $limit+1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
//for time in tooltip
|
||||
$timehtml = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times);
|
||||
$end = JemOutput::formattime($row->endtimes);
|
||||
|
||||
if ($start != '') {
|
||||
$timehtml = '<div class="time"><span class="text-label">'.JText::_('COM_JEM_TIME_SHORT').': </span>';
|
||||
$timehtml .= $start;
|
||||
if ($end != '') {
|
||||
$timehtml .= ' - '.$end;
|
||||
}
|
||||
$timehtml .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$eventname = '<div class="eventName">'.JText::_('COM_JEM_TITLE_SHORT').': '.$this->escape($row->title).'</div>';
|
||||
$detaillink = JRoute::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//initialize variables
|
||||
$multicatname = '';
|
||||
$colorpic = '';
|
||||
$nr = is_array($row->categories) ? count($row->categories) : 0;
|
||||
$ix = 0;
|
||||
$content = '';
|
||||
$contentend = '';
|
||||
$catcolor = array();
|
||||
|
||||
//walk through categories assigned to an event
|
||||
foreach((array)$row->categories AS $category) {
|
||||
//Currently only one id possible...so simply just pick one up...
|
||||
$detaillink = JRoute::_(JemHelperRoute::getEventRoute($row->slug));
|
||||
|
||||
//wrap a div for each category around the event for show hide toggler
|
||||
$content .= '<div id="catz" class="cat'.$category->id.'">';
|
||||
$contentend .= '</div>';
|
||||
|
||||
//attach category color if any in front of the catname
|
||||
if ($category->color) {
|
||||
$multicatname .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span> '.$category->catname;
|
||||
} else {
|
||||
$multicatname .= $category->catname;
|
||||
}
|
||||
|
||||
$ix++;
|
||||
if ($ix != $nr) {
|
||||
$multicatname .= ', ';
|
||||
}
|
||||
|
||||
//attach category color if any in front of the event title in the calendar overview
|
||||
if (isset($category->color) && $category->color) {
|
||||
$colorpic .= '<span class="colorpic" style="width:6px; background-color: '.$category->color.';"></span>';
|
||||
$catcolor[$category->color] = $category->color; // we need to list all different colors of this event
|
||||
}
|
||||
|
||||
//count occurence of the category
|
||||
if (!isset($row->multi) || ($row->multi == 'first')) {
|
||||
if (!array_key_exists($category->id, $countcatevents)) {
|
||||
$countcatevents[$category->id] = 1;
|
||||
} else {
|
||||
$countcatevents[$category->id]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$color = '<div id="eventcontenttop" class="eventcontenttop">';
|
||||
$color .= $colorpic;
|
||||
$color .= '</div>';
|
||||
|
||||
// multiday
|
||||
$multi_mode = 0; // single day
|
||||
$multi_icon = '';
|
||||
if (isset($row->multi)) {
|
||||
switch ($row->multi) {
|
||||
case 'first': // first day
|
||||
$multi_mode = 1;
|
||||
$multi_icon = '<i class="fa fa-step-backward" aria-hidden="true"></i>';
|
||||
break;
|
||||
case 'middle': // middle day
|
||||
$multi_mode = 2;
|
||||
$multi_icon = '<i class="fa fa-arrows-h fa-lg" aria-hidden="true"></i>';
|
||||
break;
|
||||
case 'zlast': // last day
|
||||
$multi_mode = 3;
|
||||
$multi_icon = '<i class="fa fa-step-forward" aria-hidden="true"></i>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//for time in calendar
|
||||
$timetp = '';
|
||||
|
||||
if ($showtime) {
|
||||
$start = JemOutput::formattime($row->times,'',false);
|
||||
$end = JemOutput::formattime($row->endtimes,'',false);
|
||||
|
||||
switch ($multi_mode) {
|
||||
case 1:
|
||||
$timetp .= $multi_icon . ' ' . $start . '<br />';
|
||||
break;
|
||||
case 2:
|
||||
$timetp .= $multi_icon . '<br />';
|
||||
break;
|
||||
case 3:
|
||||
$timetp .= $multi_icon . ' ' . $end . '<br />';
|
||||
break;
|
||||
default:
|
||||
if ($start != '') {
|
||||
$timetp .= $start;
|
||||
if ($end != '') {
|
||||
$timetp .= ' - '.$end;
|
||||
}
|
||||
$timetp .= '<br />';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!empty($multi_icon)) {
|
||||
$timetp .= $multi_icon . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
$catname = '<div class="catname">'.$multicatname.'</div>';
|
||||
|
||||
$eventdate = !empty($row->multistartdate) ? JemOutput::formatdate($row->multistartdate) : JemOutput::formatdate($row->dates);
|
||||
if (!empty($row->multienddate)) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->multienddate);
|
||||
} else if ($row->enddates && $row->dates < $row->enddates) {
|
||||
$eventdate .= ' - ' . JemOutput::formatdate($row->enddates);
|
||||
}
|
||||
|
||||
//venue
|
||||
if ($this->jemsettings->showlocate == 1) {
|
||||
$venue = '<div class="location"><span class="text-label">'.JText::_('COM_JEM_VENUE_SHORT').': </span>';
|
||||
$venue .= !empty($row->venue) ? $this->escape($row->venue) : '-';
|
||||
$venue .= '</div>';
|
||||
} else {
|
||||
$venue = '';
|
||||
}
|
||||
|
||||
// state if unpublished
|
||||
$statusicon = '';
|
||||
if (isset($row->published) && ($row->published != 1)) {
|
||||
$statusicon = JemOutput::publishstateicon($row);
|
||||
$eventstate = '<div class="eventstate"><span class="text-label">'.JText::_('JSTATUS').': </span>';
|
||||
switch ($row->published) {
|
||||
case 1: $eventstate .= JText::_('JPUBLISHED'); break;
|
||||
case 0: $eventstate .= JText::_('JUNPUBLISHED'); break;
|
||||
case 2: $eventstate .= JText::_('JARCHIVED'); break;
|
||||
case -2: $eventstate .= JText::_('JTRASHED'); break;
|
||||
}
|
||||
$eventstate .= '</div>';
|
||||
} else {
|
||||
$eventstate = '';
|
||||
}
|
||||
|
||||
//date in tooltip
|
||||
$multidaydate = '<div class="time"><span class="text-label">'.JText::_('COM_JEM_DATE').': </span>';
|
||||
switch ($multi_mode) {
|
||||
case 1: // first day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
case 2: // middle day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
case 3: // last day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->multistartdate, $row->times, $row->multienddate, $row->endtimes);
|
||||
break;
|
||||
default: // single day
|
||||
$multidaydate .= JemOutput::formatShortDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showtime);
|
||||
$multidaydate .= JemOutput::formatSchemaOrgDateTime($row->dates, $row->times, $row->enddates, $row->endtimes);
|
||||
break;
|
||||
}
|
||||
$multidaydate .= '</div>';
|
||||
|
||||
//create little Edit and/or Copy icon on top right corner of event if user is allowed to edit and/or create
|
||||
$editicon = '';
|
||||
if (!$this->print) {
|
||||
$btns = array();
|
||||
if ($this->params->get('show_editevent_icon', 0) && $row->params->get('access-edit', false)) {
|
||||
$btns[] = JemOutput::editbutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if ($this->params->get('show_copyevent_icon', 0) && $this->permissions->canAddEvent) {
|
||||
$btns[] = JemOutput::copybutton($row, null, null, true, 'editevent');
|
||||
}
|
||||
if (!empty($btns)) {
|
||||
$editicon .= '<div class="inline-button-right">';
|
||||
$editicon .= join(' ', $btns);
|
||||
$editicon .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
//generate the output
|
||||
// if we have exact one color from categories we can use this as background color of event
|
||||
if (!empty($evbg_usecatcolor) && (count($catcolor) == 1)) {
|
||||
$content .= '<div class="eventcontentinner" style="background-color:'.array_pop($catcolor).'" onclick=location.href="'.$detaillink.'">';
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
} else {
|
||||
$content .= '<div class="eventcontentinner" onclick=location.href="'.$detaillink.'">' . $colorpic;
|
||||
$content .= $editicon;
|
||||
$content .= JemHelper::caltooltip($catname.$eventname.$timehtml.$venue.$eventstate, $eventdate, $row->title . $statusicon, $detaillink, 'editlinktip hasTip', $timetp, $category->color);
|
||||
$content .= $contentend . '</div>';
|
||||
}
|
||||
|
||||
$this->cal->setEventContent($year, $month, $day, $content);
|
||||
endforeach;
|
||||
|
||||
// enable little icon right beside day number to allow event creation
|
||||
if (!$this->print && $this->params->get('show_addevent_icon', 0) && !empty($this->permissions->canAddEvent)) {
|
||||
$html = JemOutput::prepareAddEventButton();
|
||||
$this->cal->enableNewEventLinks($html);
|
||||
}
|
||||
|
||||
$displayLegend = (int)$this->params->get('displayLegend', 1);
|
||||
if ($displayLegend == 2) : ?>
|
||||
<!-- Calendar legend above -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<button id="buttonshowall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo JText::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="calendarButton btn btn-outline-dark">
|
||||
<?php echo JText::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
if ($this->params->get('displayLegend')) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// print the calendar
|
||||
echo $this->cal->showMonth();
|
||||
?>
|
||||
|
||||
<?php if (($displayLegend == 1) || ($displayLegend == 0)) : ?>
|
||||
<!-- Calendar legend below -->
|
||||
<div id="jlcalendarlegend">
|
||||
|
||||
<!-- Calendar buttons -->
|
||||
<div class="calendarButtons jem-row jem-justify-start">
|
||||
<button id="buttonshowall" class="btn btn-outline-dark">
|
||||
<?php echo JText::_('COM_JEM_SHOWALL'); ?>
|
||||
</button>
|
||||
<button id="buttonhideall" class="btn btn-outline-dark">
|
||||
<?php echo JText::_('COM_JEM_HIDEALL'); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Calendar Legend -->
|
||||
<div class="calendarLegends jem-row jem-justify-start">
|
||||
<?php
|
||||
if ($displayLegend == 1) {
|
||||
|
||||
##############
|
||||
## FOR EACH ##
|
||||
##############
|
||||
|
||||
$counter = array();
|
||||
|
||||
# walk through events
|
||||
foreach ($this->rows as $row) {
|
||||
foreach ($row->categories as $cat) {
|
||||
|
||||
# sort out dupes for the counter (catid-legend)
|
||||
if (!in_array($cat->id, $counter)) {
|
||||
# add cat id to cat counter
|
||||
$counter[] = $cat->id;
|
||||
|
||||
# build legend
|
||||
if (array_key_exists($cat->id, $countcatevents)) {
|
||||
?>
|
||||
<button class="eventCat btn btn-outline-dark" id="cat<?php echo $cat->id; ?>">
|
||||
<?php
|
||||
if (isset($cat->color) && $cat->color) {
|
||||
echo '<span class="colorpic" style="background-color: '.$cat->color.';"></span>';
|
||||
}
|
||||
echo $cat->catname.' ('.$countcatevents[$cat->id].')';
|
||||
?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="clr"></div>
|
||||
|
||||
<div class="copyright">
|
||||
<?php echo JemOutput::footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
||||
136
components/com_jem/views/event/calendar/view.html.php
Normal file
136
components/com_jem/views/event/calendar/view.html.php
Normal file
@ -0,0 +1,136 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 2.3.1
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* Calendar-View
|
||||
*/
|
||||
class JemViewCalendar extends JemView
|
||||
{
|
||||
/**
|
||||
* Calendar-View
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
// Load tooltips behavior
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.framework');
|
||||
|
||||
// initialize variables
|
||||
$document = JFactory::getDocument();
|
||||
$menu = $app->getMenu();
|
||||
$menuitem = $menu->getActive();
|
||||
$jemsettings = JemHelper::config();
|
||||
$settings = JemHelper::globalattribs();
|
||||
$user = JemFactory::getUser();
|
||||
$params = $app->getParams();
|
||||
$top_category = (int)$params->get('top_category', 0);
|
||||
$jinput = $app->input;
|
||||
$print = $jinput->getBool('print', false);
|
||||
$this->param_topcat = $top_category > 0 ? ('&topcat='.$top_category) : '';
|
||||
|
||||
// Load css
|
||||
JemHelper::loadCss('jem');
|
||||
JemHelper::loadCss('calendar');
|
||||
JemHelper::loadCustomCss();
|
||||
JemHelper::loadCustomTag();
|
||||
|
||||
if ($print) {
|
||||
JemHelper::loadCss('print');
|
||||
$document->setMetaData('robots', 'noindex, nofollow');
|
||||
}
|
||||
|
||||
$evlinkcolor = $params->get('eventlinkcolor');
|
||||
$evbackgroundcolor = $params->get('eventbackgroundcolor');
|
||||
$currentdaycolor = $params->get('currentdaycolor');
|
||||
$eventandmorecolor = $params->get('eventandmorecolor');
|
||||
|
||||
$style = '
|
||||
div#jem .eventcontentinner a,
|
||||
div#jem .eventandmore a {
|
||||
color:' . $evlinkcolor . ';
|
||||
}
|
||||
.eventcontentinner {
|
||||
background-color:'.$evbackgroundcolor .';
|
||||
}
|
||||
.eventandmore {
|
||||
background-color:'.$eventandmorecolor .';
|
||||
}
|
||||
|
||||
.today .daynum {
|
||||
background-color:'.$currentdaycolor.';
|
||||
}';
|
||||
|
||||
$document->addStyleDeclaration($style);
|
||||
|
||||
// add javascript (using full path - see issue #590)
|
||||
JHtml::_('script', 'media/com_jem/js/calendar.js');
|
||||
|
||||
$year = (int)$jinput->getInt('yearID', strftime("%Y"));
|
||||
$month = (int)$jinput->getInt('monthID', strftime("%m"));
|
||||
|
||||
// get data from model and set the month
|
||||
$model = $this->getModel();
|
||||
$model->setDate(mktime(0, 0, 1, $month, 1, $year));
|
||||
|
||||
$rows = $this->get('Items');
|
||||
|
||||
// Set Page title
|
||||
$pagetitle = $params->def('page_title', $menuitem->title);
|
||||
$params->def('page_heading', $pagetitle);
|
||||
$pageclass_sfx = $params->get('pageclass_sfx');
|
||||
|
||||
// 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'));
|
||||
}
|
||||
|
||||
$document->setTitle($pagetitle);
|
||||
$document->setMetaData('title', $pagetitle);
|
||||
|
||||
// Check if the user has permission to add things
|
||||
$permissions = new stdClass();
|
||||
$catIds = $model->getCategories('all');
|
||||
$permissions->canAddEvent = $user->can('add', 'event', false, false, $catIds);
|
||||
$permissions->canAddVenue = $user->can('add', 'venue', false, false, $catIds);
|
||||
|
||||
$itemid = $jinput->getInt('Itemid', 0);
|
||||
|
||||
$partItemid = ($itemid > 0) ? '&Itemid=' . $itemid : '';
|
||||
$partDate = ($year ? ('&yearID=' . $year) : '') . ($month ? ('&monthID=' . $month) : '');
|
||||
$url_base = 'index.php?option=com_jem&view=calendar' . $partItemid;
|
||||
|
||||
$print_link = JRoute::_($url_base . $partDate . '&print=1&tmpl=component');
|
||||
|
||||
// init calendar
|
||||
$cal = new JemCalendar($year, $month, 0);
|
||||
$cal->enableMonthNav($url_base . ($print ? '&print=1&tmpl=component' : ''));
|
||||
$cal->setFirstWeekDay($params->get('firstweekday', 1));
|
||||
$cal->enableDayLinks('index.php?option=com_jem&view=day' . $this->param_topcat);
|
||||
|
||||
$this->rows = $rows;
|
||||
$this->catIds = $catIds;
|
||||
$this->params = $params;
|
||||
$this->jemsettings = $jemsettings;
|
||||
$this->settings = $settings;
|
||||
$this->permissions = $permissions;
|
||||
$this->cal = $cal;
|
||||
$this->pageclass_sfx = htmlspecialchars($pageclass_sfx);
|
||||
$this->print_link = $print_link;
|
||||
$this->print = $print;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user