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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user