<?php $this->layout('main', ['title' => __('Stations'), 'manual' => true]); ?>

<div class="card">
    <div class="card-header ch-alt">
        <h2><?=__('Manage Stations') ?></h2>

        <a class="btn bgm-blue btn-float" role="button" title="<?=__('Add %s', __('Station')) ?>" href="<?=$router->named('admin:stations:add') ?>">
            <span class="sr-only"><?=__('Add %s', __('Station')) ?></span>
            <i class="zmdi zmdi-plus"></i>
        </a>
    </div>
    <div class="table-responsive">
        <table class="table table-striped">
            <colgroup>
                <col width="30%">
                <col width="70%">
            </colgroup>
            <thead>
            <tr>
                <th><?=__('Actions') ?></th>
                <th><?=__('Station') ?></th>
            </tr>
            </thead>
            <tbody>
            <?php foreach((array)$stations as $record): ?>
                <tr class="input">
                    <td class="center">
                        <a class="btn btn-sm btn-primary" href="<?=$router->named('stations:index:index', ['station' => $record['id']]) ?>" target="_blank"><?=__('Manage') ?></a>
                        <a class="btn btn-sm btn-default" href="<?=$router->named('admin:stations:edit', ['id' => $record['id']]) ?>"><?=__('Edit') ?></a>
                        <a class="btn btn-sm btn-default" href="<?=$router->named('admin:stations:clone', ['id' => $record['id']]) ?>"><?=__('Clone') ?></a>
                        <a class="btn btn-sm btn-danger" href="<?=$router->named('admin:stations:delete', ['id' => $record['id'], 'csrf' => $csrf]) ?>"><?=__('Delete') ?></a>
                    </td>
                    <td>
                        <big><?=$this->e($record['name']) ?></big>
                    </td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    </div>
</div>
