Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.7.x] Regression Hathor modules and users manager (solves #12407) #12412

Merged
merged 1 commit into from
Oct 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions administrator/templates/hathor/html/com_modules/modules/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
<?php echo JHtml::_('select.options', ModulesHelper::getClientOptions(), 'value', 'text', $this->state->get('client_id'));?>
</select>

<label class="selectlabel" for="filter_state">
<label class="selectlabel" for="filter_state">
<?php echo JText::_('JOPTION_SELECT_PUBLISHED'); ?>
</label>
<select name="filter_state" id="filter_state">
<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
<?php echo JHtml::_('select.options', ModulesHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state'));?>
</select>

<label class="selectlabel" for="filter_position">
<label class="selectlabel" for="filter_position">
<?php echo JText::_('COM_MODULES_OPTION_SELECT_POSITION'); ?>
</label>
<select name="filter_position" id="filter_position">
Expand Down Expand Up @@ -105,13 +105,13 @@
<th class="title">
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'title', $listDirn, $listOrder); ?>
</th>
<th class="width-5">
<th class="width-5">
<?php echo JHtml::_('grid.sort', 'JSTATUS', 'published', $listDirn, $listOrder); ?>
</th>
<th class="width-20">
<?php echo JHtml::_('grid.sort', 'COM_MODULES_HEADING_POSITION', 'position', $listDirn, $listOrder); ?>
</th>
<th class="nowrap ordering-col">
<th class="nowrap ordering-col">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ORDERING', 'ordering', $listDirn, $listOrder); ?>
<?php if ($canOrder && $saveOrder) :?>
<?php echo JHtml::_('grid.order', $this->items, 'filesave.png', 'modules.saveorder'); ?>
Expand All @@ -120,7 +120,7 @@
<th class="width-10">
<?php echo JHtml::_('grid.sort', 'COM_MODULES_HEADING_MODULE', 'name', $listDirn, $listOrder); ?>
</th>
<th class="width-10">
<th class="width-10">
<?php echo JHtml::_('grid.sort', 'COM_MODULES_HEADING_PAGES', 'pages', $listDirn, $listOrder); ?>
</th>
<th class="title access-col">
Expand Down Expand Up @@ -162,13 +162,13 @@
<?php echo JText::sprintf('JGLOBAL_LIST_NOTE', $this->escape($item->note));?></p>
<?php endif; ?>
</td>
<td class="center">
<td class="center">
<?php echo JHtml::_('modules.state', $item->published, $i, $canChange, 'cb'); ?>
</td>
<td class="center">
<?php echo $item->position; ?>
</td>
<td class="order">
<td class="order">
<?php if ($canChange) : ?>
<?php if ($saveOrder) :?>
<?php if ($listDirn == 'asc') : ?>
Expand All @@ -185,7 +185,7 @@
<?php echo $item->ordering; ?>
<?php endif; ?>
</td>
<td class="left">
<td class="left">
<?php echo $item->name;?>
</td>
<td class="center">
Expand All @@ -212,10 +212,20 @@
</tbody>
</table>

<?php //Load the batch processing form.is user is allowed ?>
<?php if ($user->authorise('core.create', 'com_modules') || $user->authorise('core.edit', 'com_modules')) : ?>
<?php echo $this->loadTemplate('batch'); ?>
<?php endif;?>
<?php // Load the batch processing form. ?>
<?php if ($user->authorise('core.create', 'com_modules')
&& $user->authorise('core.edit', 'com_modules')
&& $user->authorise('core.edit.state', 'com_modules')) : ?>
<?php echo JHtml::_(
'bootstrap.renderModal',
'collapseModal',
array(
'title' => JText::_('COM_MODULES_BATCH_OPTIONS'),
'footer' => $this->loadTemplate('batch_footer')
),
$this->loadTemplate('batch_body')
); ?>
<?php endif; ?>

<?php echo $this->pagination->getListFooter(); ?>

Expand Down
16 changes: 14 additions & 2 deletions administrator/templates/hathor/html/com_users/users/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,20 @@
</tbody>
</table>

<?php //Load the batch processing form. ?>
<?php echo $this->loadTemplate('batch'); ?>
<?php // Load the batch processing form if user is allowed ?>
<?php if ($loggeduser->authorise('core.create', 'com_users')
&& $loggeduser->authorise('core.edit', 'com_users')
&& $loggeduser->authorise('core.edit.state', 'com_users')) : ?>
<?php echo JHtml::_(
'bootstrap.renderModal',
'collapseModal',
array(
'title' => JText::_('COM_USERS_BATCH_OPTIONS'),
'footer' => $this->loadTemplate('batch_footer')
),
$this->loadTemplate('batch_body')
); ?>
<?php endif;?>

<?php echo $this->pagination->getListFooter(); ?>
<div>
Expand Down