<commit_before><?
$title = 'Manage Radio Stations &amp; Video Channels';
?>

<div class="buttons">
    <?=$this->viewHelper->button(array(
        'type'      => 'link',
        'class'     => 'large success',
        'href'      => $this->viewHelper->routeFromHere(array('action' => 'edit')),
        'icon'      => 'icon-plus-sign',
        'text'      => 'Add New Station',
    )) ?>
</div>

<h2>Current Active Stations</h2>

<h3>Radio Stations</h3>
<?
echo $this->viewHelper->renderHere('list', false, array('stations' => (array)$categories['audio']));
?>

<h3>Video Channels</h3>
<?
echo $this->viewHelper->renderHere('list', false, array('stations' => (array)$categories['video']));
?>

<h3>Internal Tracking</h3>
<?
echo $this->viewHelper->renderHere('list', false, array('stations' => (array)$categories['internal']));
?>

<h2>Stations Pending Review</h2>

<table class="table table-striped table-bordered table-condensed">
    <colgroup>
        <col width="17%" />
        <col width="8%" />
        <col width="40%" />
        <col width="35%" />
    </colgroup>
    <thead>
        <tr>
            <th>Actions</th>
            <th>Image</th>
            <th>Station</th>
            <th>Votes</th>
        </tr>
    </thead>
    <tbody>
    <? foreach($pending_stations as $record): ?>
        <tr class="input">
            <td class="center">
                <div class="btn-group">
                    <?=$this->viewHelper->button(array(
                        'type'      => 'small',
                        'href'      => $this->viewHelper->routeFromHere(array('action' => 'edit', 'id' => $record['id'])),
                        'text'      => 'Edit',
                    )) ?>
                    <?=$this->viewHelper->button(array(
                        'type'      => 'small',
                        'class'     => 'danger confirm-delete',
                        'href'      => $this->viewHelper->routeFromHere(array('action' => 'delete', 'id' => $record['id'])),
                        'text'      => 'Delete',
                    )) ?>
                </div>
            </td>
            <td class="center"><img src="<?=\PVL\Url::upload($record['image_url']) ?>" style="display: inline; max-width: 70px;"></td>
            <td>
                <div><big><?=$record['name'] ?></big></div>
                <div><?=$record['description'] ?></div>
                <div><?=$record['station_notes'] ?></div>
            </td>
            <td>
            <? foreach((array)$record['intake_votes'] as $station_id => $vote): ?>
                <div class="<? if ($vote['decision'] == 'Accept'): ?>text-success<? else: ?>text-danger<? endif; ?>"><b><?=$vote['name'] ?></b>: <?=$vote['decision'] ?> - <?=$vote['comments'] ?></div>
            <? endforeach; ?>
            </td>
        </tr>
    <? endforeach; ?>
    </tbody>
</table><commit_msg>Use correct color on station voting.<commit_after><?
$title = 'Manage Radio Stations &amp; Video Channels';
?>

<div class="buttons">
    <?=$this->viewHelper->button(array(
        'type'      => 'link',
        'class'     => 'large success',
        'href'      => $this->viewHelper->routeFromHere(array('action' => 'edit')),
        'icon'      => 'icon-plus-sign',
        'text'      => 'Add New Station',
    )) ?>
</div>

<h2>Current Active Stations</h2>

<h3>Radio Stations</h3>
<?
echo $this->viewHelper->renderHere('list', false, array('stations' => (array)$categories['audio']));
?>

<h3>Video Channels</h3>
<?
echo $this->viewHelper->renderHere('list', false, array('stations' => (array)$categories['video']));
?>

<h3>Internal Tracking</h3>
<?
echo $this->viewHelper->renderHere('list', false, array('stations' => (array)$categories['internal']));
?>

<h2>Stations Pending Review</h2>

<table class="table table-striped table-bordered table-condensed">
    <colgroup>
        <col width="17%" />
        <col width="8%" />
        <col width="40%" />
        <col width="35%" />
    </colgroup>
    <thead>
        <tr>
            <th>Actions</th>
            <th>Image</th>
            <th>Station</th>
            <th>Votes</th>
        </tr>
    </thead>
    <tbody>
    <? foreach($pending_stations as $record): ?>
        <tr class="input">
            <td class="center">
                <div class="btn-group">
                    <?=$this->viewHelper->button(array(
                        'type'      => 'small',
                        'href'      => $this->viewHelper->routeFromHere(array('action' => 'edit', 'id' => $record['id'])),
                        'text'      => 'Edit',
                    )) ?>
                    <?=$this->viewHelper->button(array(
                        'type'      => 'small',
                        'class'     => 'danger confirm-delete',
                        'href'      => $this->viewHelper->routeFromHere(array('action' => 'delete', 'id' => $record['id'])),
                        'text'      => 'Delete',
                    )) ?>
                </div>
            </td>
            <td class="center"><img src="<?=\PVL\Url::upload($record['image_url']) ?>" style="display: inline; max-width: 70px;"></td>
            <td>
                <div><big><?=$record['name'] ?></big></div>
                <div><?=$record['description'] ?></div>
                <div><?=$record['station_notes'] ?></div>
            </td>
            <td>
            <? foreach((array)$record['intake_votes'] as $station_id => $vote): ?>
                <div class="<? if ($vote['decision'] == 'Accept'): ?>text-success<? else: ?>text-error<? endif; ?>"><b><?=$vote['name'] ?></b>: <?=$vote['decision'] ?> - <?=$vote['comments'] ?></div>
            <? endforeach; ?>
            </td>
        </tr>
    <? endforeach; ?>
    </tbody>
</table>
{'fraction_non_alphanumeric': 0.21996527777777777, 'fraction_numerical': 0.006597222222222222, 'mean_word_length': 1.9528446950281906, 'pattern_counts': {'":': 0, '<': 163, '<?xml version=': 0, '>': 241, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2767961', 'n_tokens_mistral': 1776, 'n_tokens_neox': 1734, 'n_words': 306}