aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/admin/plugin_card.php
blob: 4a32e073be42f12c06b7916d430764cafbcc6e36 (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
<?php
/** @var \Digitigrade\PluginMetadata $meta */
/** @var string $filename */
?>

<?php if (isset($meta->homepage)): ?>
    <a href="<?= htmlspecialchars($meta->homepage) ?>" target="_blank">
    <?php endif; ?>

    <div class="pluginCard">
        <div class="pluginInfo">
            <div class="name"><?= $meta->name ?></div>
            <div class="version"><?= __f('admin.plugins.version', htmlspecialchars($meta->version)) ?></div>
            <div class="author"><?= __f('admin.plugins.author', htmlspecialchars($meta->author)) ?></div>
            <div class="filename"><?= htmlspecialchars($filename) ?></div>
        </div>

        <div class="actionButtons">
            <button type="button" class="secondary" hx-delete="/fragment/admin/plugins/<?= urlencode($filename) ?>"
                hx-confirm="<?= __('admin.plugins.delete.confirm') ?>" hx-target="closest .pluginCard" hx-swap="delete"
                hx-disabled-elt="this">
                <span class="material-symbols delete-outline"></span>
                <span><?= __('admin.plugins.delete.action') ?></span>
            </button>
        </div>
    </div>

    <?php if (isset($meta->homepage)): ?>
    </a>
<?php endif; ?>