Skip to content
Snippets Groups Projects
Select Git revision
  • bb644f00b8412184f5f89da217e1a4795f2ae51d
  • main default protected
  • issue-56
  • testing-systems
4 results

index.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    index.php 1.88 KiB
    <?php
    /**
     * @var array<string, string> $mapping
     * @var array<int, TracToGitlab\GitlabIssue> $issues
     */
    ?>
    <table class="default">
        <thead>
            <tr>
                <th><?= _('Issue') ?></th>
                <th><?= _('Typ') ?></th>
                <th><?= _('Status') ?></th>
                <th><?= _('Titel') ?></th>
                <th><?= _('Autor') ?></th>
                <th><?= _('Bearbeiter') ?></th>
            <? foreach ($mapping as $label => $abbrevation): ?>
                <th>
                    <abbr title="<?= htmlReady($label) ?>">
                        <?= htmlReady($abbrevation) ?>
                    </abbr>
                </th>
            <? endforeach; ?>
            </tr>
        </thead>
        <tbody>
        <? if (!$issues): ?>
            <tr>
                <td colspan="<?= 6 + count($mapping) ?>" style="text-align: center">
                    <?= _('Keine Issues für diesen Meilenstein und Typ') ?>
                </td>
            </tr>
        <? endif; ?>
        <? foreach ($issues as $issue): ?>
            <tr>
                <td>
                    <a href="<?= htmlReady($issue->web_url) ?>" target="_blank">
                        #<?= htmlReady($issue->iid) ?>
                    </a>
                </td>
                <td><?= htmlReady($issue->type) ?></td>
                <td>
                <? if ($issue->isClosed()): ?>
                    closed
                <? else: ?>
                    open
                <? endif; ?>
                </td>
                <td>
                    <a href="<?= htmlReady($issue->web_url) ?>" target="_blank">
                        <?= htmlReady($issue->title) ?>
                    </a>
                </td>
                <td><?= htmlReady($issue->author['username']) ?></td>
                <td><?= htmlReady($issue->assignee) ?></td>
            <? foreach ($mapping as $label => $abbrevation): ?>
                <td>
                    <?= $issue->getIconForQMLabel($label) ?>
                </td>
            <? endforeach; ?>
            </tr>
        <? endforeach; ?>
        </tbody>
    </table>