inital commit
[pharext/pharext.org] / app / views / github / index.phtml
1 <?php $this->layout("layout") ?>
2
3 <div class="page-header">
4 <h1>
5 Github Repositories
6 <small>Manage your pharext webhook</small>
7 </h1>
8 </div>
9
10 <?php if (isset($exception)) : ?>
11 <?= $this->fetch("alert") ?>
12 <?php elseif (isset($repos)) : ?>
13
14 <table class="table table-hover">
15 <thead>
16 <tr>
17 <th>Repo</th>
18 <th class="text-center">Fork</th>
19 <th class="text-right">Last Pushed</th>
20 <th class="text-right">Hook</th>
21 </tr>
22 </thead>
23 <tbody>
24 <?php foreach ($repos as $repo) : ?>
25 <tr class="<?= $this->check($repo) ? "success" : "" ?>">
26 <th>
27 <a href="<?= $baseUrl->mod("./github/repo/".$repo->full_name) ?>">
28 <big class="text-primary" title="<?= $this->e($repo->description) ?>"><?= $this->e($repo->name) ?></big>
29 </a>
30 <br>
31 <small><?= $this->e($this->shorten($repo->description)) ?></small>
32 </th>
33 <td class="text-center"><?php if ($repo->fork) : ?>
34 <span title="fork" class="octicon octicon-repo-forked" aria-hidden="true"></span>
35 <?php endif; ?>
36 </td>
37 <td class="text-right"><time datetime="<?= $this->e($repo->pushed_at) ?>"><?= $this->e($this->utc($repo->pushed_at)->format("Y-m-d H:i T")) ?></time></td>
38 <td class="text-right">
39 <a class="btn btn-primary <?= $this->check($repo) ? "disabled":"" ?>"
40 href="<?= $baseUrl->mod("./github/repo/".$repo->full_name) ?>">
41 <span class="glyphicon glyphicon-plus" title="Add pharext hook"></span></a>
42 <a class="btn btn-danger <?= !$this->check($repo) ? "disabled":"" ?>"
43 href="<?= $baseUrl->mod(["path" => "github/repo", "query" => "hook=del&repo=". urlencode($repo->full_name)]) ?>">
44 <span class="glyphicon glyphicon-remove" title="Remove hook"></span></a>
45 </td>
46 </tr>
47 <?php endforeach; ?>
48 </tbody>
49 </table>
50
51 <nav>
52 <ul class="pager">
53 <?php
54 $first= $this->link("first");
55 $prev = $this->link("prev");
56 $next = $this->link("next");
57 $last = $this->link("last");
58 ?>
59 <li class="<?= $first ?"":"disabled" ?>"><a href="?page=<?= $first ?>" title="First Page"><span class="glyphicon glyphicon-fast-backward"></span></a></li>
60 <li class="<?= $prev ?"":"disabled" ?>"><a href="?page=<?= $prev ?>" rel="prev" title="Previous Page"><span class="glyphicon glyphicon-chevron-left"></span> Previous</a></li>
61 <li class="<?= $next ?"":"disabled" ?>"><a href="?page=<?= $next ?>" rel="next" title="Next Page">Next <span class="glyphicon glyphicon-chevron-right"></span></a></li>
62 <li class="<?= $last ?"":"disabled" ?>"><a href="?page=<?= $last ?>" title="Last Page"><span class="glyphicon glyphicon-fast-forward"></span></a></li>
63 </ul>
64 </nav>
65 <?php endif; ?>