Skip to content

Commit

Permalink
[com_menus] Check for edit permission linked menu modules (#17845)
Browse files Browse the repository at this point in the history
* [com_menus] Check for edit permission linked menu modules

* Coding style

* CodeStyle
  • Loading branch information
sanderpotjer authored and Michael Babker committed Sep 3, 2017
1 parent 74c6584 commit bacc81f
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -170,19 +170,20 @@
<ul class="dropdown-menu">
<?php foreach ($this->modules[$item->menutype] as &$module) : ?>
<li>
<?php if ($canEdit) : ?>
<?php if ($user->authorise('core.edit', 'com_modules.module.' . (int) $module->id)) : ?>
<?php $link = JRoute::_('index.php?option=com_modules&task=module.edit&id=' . $module->id . '&return=' . $return . '&tmpl=component&layout=modal'); ?>
<a href="#moduleEdit<?php echo $module->id; ?>Modal" role="button" class="button" data-toggle="modal" title="<?php echo JText::_('COM_MENUS_EDIT_MODULE_SETTINGS'); ?>">
<?php echo JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?></a>
<?php else : ?>
<?php echo JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?>
<a href="#" class="disabled" disabled="disabled">
<?php echo JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?></a>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php foreach ($this->modules[$item->menutype] as &$module) : ?>
<?php if ($canEdit) : ?>
<?php if ($user->authorise('core.edit', 'com_modules.module.' . (int) $module->id)) : ?>
<?php $link = JRoute::_('index.php?option=com_modules&task=module.edit&id=' . $module->id . '&return=' . $return . '&tmpl=component&layout=modal'); ?>
<?php echo JHtml::_(
'bootstrap.renderModal',
Expand Down

0 comments on commit bacc81f

Please sign in to comment.