summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/config/userbackend/reorder.phtml
blob: c77fd2edfcebd637dc013db3d1cc5b4249394584 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<div class="controls">
    <?= $tabs ?>
</div>
<div class="content">
  <?php if ($this->auth()->hasPermission('config/access-control/users')): ?>
    <h1><?= $this->translate('User Backends') ?></h1>
    <?= $this->qlink(
        $this->translate('Create a New User Backend') ,
        'config/createuserbackend',
        null,
        array(
            'class'             => 'button-link',
            'data-base-target'  => '_next',
            'icon'              => 'plus',
            'title'             => $this->translate('Create a new user backend')
        )
    ) ?>
    <?= $form ?>
  <?php endif ?>

  <?php if ($this->auth()->hasPermission('config/access-control/groups')): ?>
    <h1><?= $this->translate('User Group Backends') ?></h1>
    <?= $this->qlink(
        $this->translate('Create a New User Group Backend') ,
        'usergroupbackend/create',
        null,
        array(
            'class'             => 'button-link',
            'data-base-target'  => '_next',
            'icon'              => 'plus',
            'title'             => $this->translate('Create a new user group backend')
        )
    ) ?>
<?php if (! count($backendNames)) { return; } ?>
    <table class="table-row-selectable common-table" data-base-target="_next">
    <thead>
    <tr>
        <th><?= $this->translate('Backend') ?></th>
        <th></th>
    </tr>
    </thead>
    <tbody>
<?php foreach ($backendNames as $backendName => $config):
    $type = $config->get('backend');
?>
    <tr>
        <td>
            <?= $this->qlink(
                $backendName,
                'usergroupbackend/edit',
                array('backend' => $backendName),
                array(
                    'icon'  => $type === 'external' ? 'magic' : ($type === 'ldap' || $type === 'msldap' ? 'sitemap' : 'database'),
                    'title' => sprintf($this->translate('Edit user group backend %s'), $backendName)
                )
            ); ?>
        </td>
        <td class="icon-col text-right">
            <?= $this->qlink(
                null,
                'usergroupbackend/remove',
                array('backend' => $backendName),
                array(
                    'class' => 'action-link',
                    'icon'  => 'cancel',
                    'title' => sprintf($this->translate('Remove user group backend %s'), $backendName)
                )
            ) ?>
        </td>
    </tr>
    <?php endforeach ?>
    </tbody>
    </table>
  <?php endif ?>
</div>