2018-07-11 00:35:10 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2018-07-25 03:00:13 +00:00
|
|
|
* @package Joomla.Members.Manager
|
2018-07-11 00:35:10 +00:00
|
|
|
*
|
2018-12-27 10:38:37 +00:00
|
|
|
* @created 6th July, 2018
|
2018-07-11 00:35:10 +00:00
|
|
|
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
|
2018-07-25 03:00:13 +00:00
|
|
|
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
|
2018-07-11 00:35:10 +00:00
|
|
|
* @copyright Copyright (C) 2015. All Rights Reserved
|
|
|
|
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
|
|
|
|
2019-08-14 02:14:40 +00:00
|
|
|
|
2018-07-11 00:35:10 +00:00
|
|
|
// No direct access to this file
|
2018-09-19 12:29:53 +00:00
|
|
|
defined('JPATH_BASE') or die('Restricted access');
|
|
|
|
|
2018-12-27 10:38:37 +00:00
|
|
|
$ignore = array('id', 'created', 'modified');
|
2018-09-19 12:29:53 +00:00
|
|
|
|
|
|
|
?>
|
2018-12-27 10:38:37 +00:00
|
|
|
<?php if (($create_button = MembersmanagerHelper::getCreateButton('form', 'form', '&field=member&field_id=' . $displayData['id'] . '&return=' . $displayData['return_path'], $displayData['com'], null)) !== false && MembersmanagerHelper::checkString($create_button)): ?>
|
|
|
|
<?php echo $create_button; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($displayData['data']) && MembersmanagerHelper::checkArray($displayData['data'])): ?>
|
|
|
|
<ul class="uk-list uk-list-striped">
|
|
|
|
<?php if (isset($displayData['data']['id'])): ?>
|
|
|
|
<?php
|
|
|
|
$stringArray = array_filter($displayData['data'], function($key) use($ignore) { if (in_array($key, $ignore)) { return false; } return true; }, ARRAY_FILTER_USE_KEY);
|
|
|
|
$edit = MembersmanagerHelper::getEditButton($displayData['data']['id'], 'form', 'form', '&return=' . $displayData['return_path'], $displayData['com'], null);
|
|
|
|
?>
|
|
|
|
<?php if (MembersmanagerHelper::checkArray($stringArray)): ?>
|
|
|
|
<li><?php echo implode(', ', $stringArray); echo $edit; ?></li>
|
|
|
|
<?php else: ?>
|
|
|
|
<li><?php echo MembersmanagerHelper::fancyDayTimeDate($displayData['data']['created']); echo $edit;?></li>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?php foreach ($displayData['data'] as $data): ?>
|
|
|
|
<?php
|
|
|
|
$stringArray = array_filter($data, function($key) use($ignore) { if (in_array($key, $ignore)) { return false; } return true; }, ARRAY_FILTER_USE_KEY);
|
|
|
|
$edit = MembersmanagerHelper::getEditButton($data['id'], 'form', 'form', '&return=' . $displayData['return_path'], $displayData['com'], null);
|
|
|
|
?>
|
|
|
|
<?php if (MembersmanagerHelper::checkArray($stringArray)): ?>
|
|
|
|
<li><?php echo implode(', ', $stringArray); echo $edit; ?></li>
|
|
|
|
<?php else: ?>
|
|
|
|
<li><?php echo MembersmanagerHelper::fancyDayTimeDate($data['created']); echo $edit;?></li>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</ul>
|
|
|
|
<?php else: ?>
|
|
|
|
<br /><small><?php echo JText::_('COM_MEMBERSMANAGER_NO_DETAILS_FOUND'); ?>...</small>
|
|
|
|
<?php endif; ?>
|