Header: Add header to module configuration

refs #7976
This commit is contained in:
Marius Hein 2015-02-17 16:19:03 +01:00
parent 32226418af
commit fe0bcdbbaf
2 changed files with 98 additions and 94 deletions

View File

@ -1,8 +1,10 @@
<div class="controls"> <div class="controls">
<?= $this->tabs ?> <?= $this->tabs ?>
<h1><?= $this->escape($module->getTitle()) ?></h1>
</div> </div>
<div class="content"> <div class="content">
<h1 tabindex="-1">
<?= $this->escape($module->getTitle()) ?>
</h1>
<?php if (! $module): ?> <?php if (! $module): ?>
<?= $this->translate('There is no such module installed.') ?> <?= $this->translate('There is no such module installed.') ?>
<?php return; endif ?> <?php return; endif ?>
@ -11,7 +13,6 @@ $dependencies = $module->getDependencies();
$restrictions = $module->getProvidedRestrictions(); $restrictions = $module->getProvidedRestrictions();
$permissions = $module->getProvidedPermissions(); $permissions = $module->getProvidedPermissions();
$state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : 'disabled' $state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : 'disabled'
?> ?>
<table class="avp"> <table class="avp">
<tr> <tr>
@ -40,31 +41,34 @@ $state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : '
</tr> </tr>
<tr> <tr>
<th><?= $this->escape($this->translate('Dependencies')) ?></th> <th><?= $this->escape($this->translate('Dependencies')) ?></th>
<td><?php <td>
<?php
if (empty($dependencies)): if (empty($dependencies)):
echo $this->translate('This module has no dependencies'); echo $this->translate('This module has no dependencies');
else: foreach ($dependencies as $name => $versionString): ?> else: foreach ($dependencies as $name => $versionString): ?>
<strong><?= $this->escape($name) ?></strong><?php if ($versionString !== true): ?>: <?= $this->escape($versionString) ?><?php endif ?><br /> <strong><?= $this->escape($name) ?></strong><?php if ($versionString !== true): ?>: <?= $this->escape($versionString) ?><?php endif ?><br />
<?php endforeach; endif ?></td> <?php endforeach; endif ?>
</td>
</tr> </tr>
<?php if (! empty($permissions)): ?> <?php if (! empty($permissions)): ?>
<tr> <tr>
<th><?= $this->escape($this->translate('Permissions')) ?></th> <th><?= $this->escape($this->translate('Permissions')) ?></th>
<td><?php foreach ($permissions as $permission): ?> <td>
<?php foreach ($permissions as $permission): ?>
<strong><?= $this->escape($permission->name) ?></strong>: <?= $this->escape($permission->description) ?><br /> <strong><?= $this->escape($permission->name) ?></strong>: <?= $this->escape($permission->description) ?><br />
<?php endforeach ?></td> <?php endforeach ?>
</td>
</tr> </tr>
<?php endif ?> <?php endif ?>
<?php if (! empty($restrictions)): ?> <?php if (! empty($restrictions)): ?>
<tr> <tr>
<th><?= $this->escape($this->translate('Restrictions')) ?></th> <th><?= $this->escape($this->translate('Restrictions')) ?></th>
<td><?php foreach ($restrictions as $restriction): ?> <td>
<?php foreach ($restrictions as $restriction): ?>
<strong><?= $this->escape($restriction->name) ?></strong>: <?= $this->escape($restriction->description) ?><br /> <strong><?= $this->escape($restriction->name) ?></strong>: <?= $this->escape($restriction->description) ?><br />
<?php endforeach ?></td> <?php endforeach ?>
</td>
</tr> </tr>
<?php endif ?> <?php endif ?>
</table> </table>
</div> </div>

View File

@ -1,10 +1,10 @@
<div class="controls"> <div class="controls">
<?= $this->tabs ?> <?= $this->tabs ?>
<h1><?= $this->translate('Installed Modules') ?></h1>
<?= $this->paginationControl($modules) ?> <?= $this->paginationControl($modules) ?>
</div> </div>
<div class="content"> <div class="content">
<h1 tabindex="-1"><?= $this->translate('Installed Modules') ?></h1>
<table class="action" data-base-target="_next"> <table class="action" data-base-target="_next">
<tbody> <tbody>
<?php foreach ($modules as $module): ?> <?php foreach ($modules as $module): ?>