aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/configuration/table-row.php
blob: 12769ed5c3c535520fc5fda7fee934fd54ebe5ee (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
<?php
/**
 * @var Admin_ConfigurationController $controller
 * @var string $field
 * @var string $linkchunk
 * @var string $type
 * @var string $value
 */
?>
<tr id="field-<?= htmlReady($field) ?>">
    <td>
        <a data-dialog href="<?= $controller->link_for($linkchunk, compact('field')) ?>">
            <?= htmlReady($field) ?>
        </a>
        <? if (!empty($description)): ?>
            <br><small><?= htmlReady($description) ?></small>
        <? endif; ?>
    </td>
    <td class="wrap-content">
        <? if ($type === 'string' || $type === 'i18n'): ?>
            <em><?= htmlReady($value) ?></em>
        <? elseif ($type === 'integer'): ?>
            <?= (int)$value ?>
        <? elseif ($type === 'boolean'): ?>
            <? if ($value): ?>
                <?= Icon::create('accept', Icon::ROLE_STATUS_GREEN, ['title' => _('TRUE')]) ?>
            <? else : ?>
                <?= Icon::create('decline', Icon::ROLE_STATUS_RED, ['title' => _('FALSE')]) ?>
            <? endif; ?>
        <? endif; ?>
    </td>
    <td><?= htmlReady($type) ?></td>
    <td class="actions">
        <a data-dialog="size=auto" href="<?= $controller->link_for($linkchunk, compact('field')) ?>">
            <?= Icon::create('edit')->asImg(['title' => _('Konfigurationsparameter bearbeiten')]) ?>
        </a>
    </td>
</tr>