summaryrefslogtreecommitdiff
path: root/app/Template/plugin/show.php
blob: 266568ac0feda457d25c131c8b027813110b063c (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
76
77
78
79
80
<?php if (! empty($incompatible_plugins)): ?>
    <div class="page-header">
        <h2><?= t('Incompatible Plugins') ?></h2>
    </div>
    <table>
        <tr>
            <th class="column-35"><?= t('Name') ?></th>
            <th class="column-25"><?= t('Author') ?></th>
            <th class="column-10"><?= t('Version') ?></th>
            <th class="column-12"><?= t('Compatibility') ?></th>
            <?php if ($is_configured): ?>
                <th><?= t('Action') ?></th>
            <?php endif ?>
        </tr>

        <?php foreach ($incompatible_plugins as $pluginFolder => $plugin): ?>
            <tr>
                <td>
                    <?php if ($plugin->getPluginHomepage()): ?>
                        <a href="<?= $plugin->getPluginHomepage() ?>" target="_blank" rel="noreferrer"><?= $this->text->e($plugin->getPluginName()) ?></a>
                    <?php else: ?>
                        <?= $this->text->e($plugin->getPluginName()) ?>
                    <?php endif ?>
                </td>
                <td><?= $this->text->e($plugin->getPluginAuthor()) ?></td>
                <td><?= $this->text->e($plugin->getPluginVersion()) ?></td>
                <td><?= $this->text->e($plugin->getCompatibleVersion()) ?></td>
                <?php if ($is_configured): ?>
                    <td>
                        <?= $this->modal->confirm('trash-o', t('Uninstall'), 'PluginController', 'confirm', array('pluginId' => $pluginFolder)) ?>
                    </td>
                <?php endif ?>
            </tr>
            <tr>
                <td colspan="<?= $is_configured ? 6 : 5 ?>"><?= $this->text->e($plugin->getPluginDescription()) ?></td>
            </tr>
        <?php endforeach ?>
    </table>
<?php endif ?>

<div class="page-header">
    <h2><?= t('Installed Plugins') ?></h2>
</div>

<?php if (empty($plugins)): ?>
    <p class="alert"><?= t('There is no plugin loaded.') ?></p>
<?php else: ?>
    <table>
        <tr>
            <th class="column-35"><?= t('Name') ?></th>
            <th class="column-30"><?= t('Author') ?></th>
            <th class="column-10"><?= t('Version') ?></th>
            <?php if ($is_configured): ?>
                <th><?= t('Action') ?></th>
            <?php endif ?>
        </tr>

    <?php foreach ($plugins as $pluginFolder => $plugin): ?>
    <tr>
        <td>
            <?php if ($plugin->getPluginHomepage()): ?>
                <a href="<?= $plugin->getPluginHomepage() ?>" target="_blank" rel="noreferrer"><?= $this->text->e($plugin->getPluginName()) ?></a>
            <?php else: ?>
                <?= $this->text->e($plugin->getPluginName()) ?>
            <?php endif ?>
        </td>
        <td><?= $this->text->e($plugin->getPluginAuthor()) ?></td>
        <td><?= $this->text->e($plugin->getPluginVersion()) ?></td>
        <?php if ($is_configured): ?>
            <td>
                <?= $this->modal->confirm('trash-o', t('Uninstall'), 'PluginController', 'confirm', array('pluginId' => $pluginFolder)) ?>
            </td>
        <?php endif ?>
    </tr>
    <tr>
        <td colspan="<?= $is_configured ? 4 : 3 ?>"><?= $this->text->e($plugin->getPluginDescription()) ?></td>
    </tr>
    <?php endforeach ?>
    </table>
<?php endif ?>