Members-Manager/site/layouts/profileassessmentselection_uikit_two.php

58 lines
2.9 KiB
PHP
Raw Normal View History

2018-12-27 10:38:37 +00:00
<?php
2022-03-03 02:58:38 +00:00
/**
* @package Joomla.Members.Manager
*
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
*/
// No direct access to this file
2018-12-27 10:38:37 +00:00
defined('JPATH_BASE') or die('Restricted access');
2022-03-03 02:58:38 +00:00
2018-12-27 10:38:37 +00:00
?>
<div id="assess-<?php echo MembersmanagerHelper::safeString($displayData->id); ?>" class="uk-offcanvas">
<div class="uk-offcanvas-bar uk-offcanvas-bar-flip">
<ul class="uk-nav uk-nav-offcanvas" data-uk-nav>
<?php foreach ($displayData->assessmentAvailable as $typeAssesmentName => $components) : ?>
<?php if (MembersmanagerHelper::checkArray($components) || MembersmanagerHelper::checkObject($components)): ?>
<li class="uk-nav-header"><?php echo JText::sprintf('COM_MEMBERSMANAGER_S_OPTIONS', $typeAssesmentName); ?></li>
<?php if (MembersmanagerHelper::checkArray($components)): ?>
2019-04-04 11:58:49 +00:00
<?php $has = 0; ?>
2018-12-27 10:38:37 +00:00
<?php foreach ($components as $component) : ?>
2019-04-04 11:58:49 +00:00
<?php if ($displayData->_USER->authorise('form.create', $component->element)): ?>
<li><a href="index.php?option=<?php echo $component->element; ?>&view=form&field=member&field_id=<?php echo $displayData->id; ?>&layout=edit&return=<?php echo $displayData->return_path; ?>"><?php echo $component->name; ?></a></li>
<?php $has++; ?>
<?php endif; ?>
2018-12-27 10:38:37 +00:00
<?php endforeach; ?>
2019-04-04 11:58:49 +00:00
<?php if ($has == 0): ?>
<li><a href="#"><?php echo JText::_('COM_MEMBERSMANAGER_NO_FORMS_FOUND'); ?></a></li>
<?php endif; ?>
2018-12-27 10:38:37 +00:00
<?php elseif (MembersmanagerHelper::checkObject($components)): ?>
2019-04-04 11:58:49 +00:00
<?php $has = 0; ?>
2018-12-27 10:38:37 +00:00
<?php if (($id = MembersmanagerHelper::getVar('form', $displayData->id, 'member', 'id', '=', str_replace("com_", "", $components->element))) !== false): ?>
<?php if (($link = MembersmanagerHelper::getEditURL($id, 'form', 'form', '&return=' . $displayData->return_path, $components->element)) !== false): ?>
<li><a href="<?php echo $link; ?>"><?php echo $components->name; ?></a></li>
2019-04-04 11:58:49 +00:00
<?php $has++; ?>
2018-12-27 10:38:37 +00:00
<?php endif; ?>
<?php else: ?>
2019-04-04 11:58:49 +00:00
<?php if ($displayData->_USER->authorise('form.create', $components->element)): ?>
<li><a href="index.php?option=<?php echo $components->element; ?>&view=form&field=member&field_id=<?php echo $displayData->id; ?>&layout=edit&return=<?php echo $displayData->return_path; ?>"><?php echo $components->name; ?></a></li>
<?php $has++; ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($has == 0): ?>
<li><a href="#"><?php echo JText::_('COM_MEMBERSMANAGER_NO_FORMS_FOUND'); ?></a></li>
2018-12-27 10:38:37 +00:00
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>
2022-03-03 02:58:38 +00:00
</div>