prettier repo list
[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 <table class="table table-hover">
11 <thead>
12 <tr>
13 <th colspan="2">Repo</th>
14 <th class="text-right">Last Pushed</th>
15 <th class="text-center">Hook</th>
16 </tr>
17 </thead>
18 <tbody>
19 <?php foreach ($repos as $repo) : ?>
20 <tr class="<?= $this->check($repo) ? "success" : "" ?>">
21 <td>
22 <?php if ($repo->fork) : ?>
23 <span title="fork" class="octicon octicon-repo-forked" aria-hidden="true"></span>
24 <?php elseif ($repo->private) : ?>
25 <span title="fork" class="octicon octicon-key" aria-hidden="true"></span>
26 <?php else : ?>
27 <span title="repo" class="octicon octicon-repo" aria-hidden="true"></span>
28 <?php endif; ?>
29 </td>
30 <th>
31 <a href="<?= $baseUrl->mod("./github/repo/".$repo->full_name) ?>">
32 <big class="text-primary" title="<?= $this->e($repo->description) ?>"><?= $this->e($repo->name) ?></big>
33 </a>
34 <br>
35 <small><?= $this->e($this->shorten($repo->description)) ?></small>
36 </th>
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-center">
39 <?php if ($this->check($repo)) : ?>
40 <form class="form" style="display: inline-block" method="post" action="<?= $baseUrl->mod("./github/repo/". $repo->full_name ."/hook/del") ?>">
41 <input type="hidden" name="returnback" value="1">
42 <button type="submit" class="btn btn-block btn-danger">
43 <span class="glyphicon glyphicon-remove"></span>
44 Remove Hook
45 </button>
46 </form>
47 <?php else : ?>
48 <form class="form-inline" style="display: inline-block" method="post" action="<?= $baseUrl->mod("./github/repo/". $repo->full_name ."/hook/add") ?>">
49 <div class="checkbox">
50 <label for="hook-tag">
51 <input id="hook-tag" type="checkbox" name="tag" value="1" checked>
52 Release
53 </label>
54 </div>
55 <div class="checkbox">
56 <label for="hook-release">
57 <input id="hook-release" type="checkbox" name="release" value="1" checked>
58 Upload
59 </label>
60 </div>
61 <input type="hidden" name="returnback" value="1">
62 <button type="submit" class="btn btn-block btn-primary">
63 <span class="glyphicon glyphicon-plus"></span>
64 Enable Hook
65 </button>
66 </form>
67 <?php endif; ?>
68 </div>
69 </td>
70 </tr>
71 <?php endforeach; ?>
72 </tbody>
73 </table>
74
75 <nav>
76 <ul class="pager">
77 <li class="<?= $links->getFirst() ?"":"disabled" ?>"><a href="?page=<?= $links->getPage("first") ?>" title="First Page"><span class="glyphicon glyphicon-fast-backward"></span></a></li>
78 <li class="<?= $links->getPrev() ?"":"disabled" ?>"><a href="?page=<?= $links->getPage("prev") ?>" rel="prev" title="Previous Page"><span class="glyphicon glyphicon-chevron-left"></span> Previous</a></li>
79 <li class="<?= $links->getNext() ?"":"disabled" ?>"><a href="?page=<?= $links->getPage("next") ?>" rel="next" title="Next Page">Next <span class="glyphicon glyphicon-chevron-right"></span></a></li>
80 <li class="<?= $links->getLast() ?"":"disabled" ?>"><a href="?page=<?= $links->getPage("last") ?>" title="Last Page"><span class="glyphicon glyphicon-fast-forward"></span></a></li>
81 </ul>
82 </nav>