OpenNIT

Quelltext des aktuellen Standes

Fassung 1.1.1

catalog.php

1 KB
<?php
$this->layout('layouts/main', [
    'page_title'    => $page_title ?? 'Neuen Antrag stellen',
    'current_route' => 'workflows',
    'full_width'    => true,
    'extra_css'     => ['/assets/css/workflows.css'],
]);
$workflows = $workflows ?? [];
$active = 'catalog';
include __DIR__ . '/_nav.php';
?>
<div class="page-body">
    <?php include __DIR__ . '/_subnav.php'; ?>
    <?php if (empty($workflows)): ?>
        <div class="empty-state">
            <i class="fas fa-folder-open"></i>
            <p><?= $this->te('Aktuell stehen Ihnen keine Antragsvorlagen zur Verfügung.') ?></p>
        </div>
    <?php else: ?>
    <div class="wf-catalog">
        <?php foreach ($workflows as $wf): ?>
            <a class="wf-card" href="/antraege/neu/<?= (int)$wf['id'] ?>">
                <div class="wf-card-icon"><i class="fas <?= $this->e($wf['icon'] ?: 'fa-project-diagram') ?>"></i></div>
                <div class="wf-card-title"><?= $this->e($wf['name']) ?></div>
                <?php if (!empty($wf['description'])): ?>
                    <div class="wf-card-desc"><?= $this->e($this->truncate($wf['description'], 120)) ?></div>
                <?php endif; ?>
            </a>
        <?php endforeach; ?>
    </div>
    <?php endif; ?>
</div>