48 lines
1.6 KiB
PHP
48 lines
1.6 KiB
PHP
<?php $rows = is_array($integrations ?? null) ? $integrations : []; ?>
|
|
|
|
<section class="card">
|
|
<h1><?= $e($t('marketplace.title')) ?></h1>
|
|
<p class="muted"><?= $e($t('marketplace.description')) ?></p>
|
|
</section>
|
|
|
|
<section class="card mt-16">
|
|
<h2 class="section-title"><?= $e($t('marketplace.integrations_title')) ?></h2>
|
|
|
|
<?php if (!empty($errorMessage)): ?>
|
|
<div class="alert alert--danger mt-12" role="alert"><?= $e((string) $errorMessage) ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if ($rows === []): ?>
|
|
<p class="muted mt-12"><?= $e($t('marketplace.empty_integrations')) ?></p>
|
|
<?php else: ?>
|
|
<div class="table-wrap mt-12">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th><?= $e($t('marketplace.fields.integration')) ?></th>
|
|
<th><?= $e($t('marketplace.fields.linked_offers_count')) ?></th>
|
|
<th><?= $e($t('marketplace.fields.actions')) ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($rows as $row): ?>
|
|
<?php $integrationId = (int) ($row['id'] ?? 0); ?>
|
|
<tr>
|
|
<td><?= $e((string) $integrationId) ?></td>
|
|
<td><?= $e((string) ($row['name'] ?? '')) ?></td>
|
|
<td><?= $e((string) ((int) ($row['linked_offers_count'] ?? 0))) ?></td>
|
|
<td>
|
|
<a class="btn btn--secondary" href="/marketplace/<?= $e((string) $integrationId) ?>">
|
|
<?= $e($t('marketplace.actions.open_offers')) ?>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php endif; ?>
|
|
</section>
|
|
|