HTML · 2085 bytes Raw Blame History
1 {{ define "page" -}}
2 <section class="shithub-repo-page">
3 {{ template "repo-header" . }}
4 <section class="shithub-pulls">
5 <header class="shithub-issues-head">
6 <h1>Pull requests</h1>
7 <div class="shithub-issues-actions">
8 <a href="/{{ .Owner }}/{{ .Repo.Name }}/compare" class="shithub-button shithub-button-primary">New pull request</a>
9 </div>
10 </header>
11
12 <nav class="shithub-issues-filter">
13 <a href="?state=open" class="shithub-issues-tab {{ if eq .State "open" }}shithub-issues-tab-active{{ end }}">
14 <span class="shithub-issues-dot shithub-issues-dot-open"></span>
15 {{ .OpenCount }} Open
16 </a>
17 <a href="?state=closed" class="shithub-issues-tab {{ if eq .State "closed" }}shithub-issues-tab-active{{ end }}">
18 <span class="shithub-issues-dot shithub-issues-dot-closed"></span>
19 {{ .ClosedCount }} Closed
20 </a>
21 </nav>
22
23 {{ if .Items }}
24 <ul class="shithub-issues-list">
25 {{ range .Items }}
26 <li class="shithub-issues-row">
27 <span class="shithub-issues-state shithub-issues-state-{{ printf "%s" .Row.State }}">
28 {{ if .Row.MergedAt.Valid }}⏵{{ else if eq (printf "%s" .Row.State) "open" }}{{ if .Row.Draft }}◔{{ else }}●{{ end }}{{ else }}✗{{ end }}
29 </span>
30 <div class="shithub-issues-body">
31 <a class="shithub-issues-title" href="/{{ $.Owner }}/{{ $.Repo.Name }}/pulls/{{ .Row.Number }}">
32 {{ .Row.Title }}
33 </a>
34 {{ if .Row.Draft }}<span class="shithub-pill">Draft</span>{{ end }}
35 <div class="shithub-issues-meta">
36 #{{ .Row.Number }}
37 <code>{{ .Row.HeadRef }}</code><code>{{ .Row.BaseRef }}</code>
38 opened
39 <time datetime="{{ .Row.CreatedAt.Time.Format "2006-01-02T15:04:05Z" }}">{{ relativeTime .Row.CreatedAt.Time }}</time>
40 {{ if .AuthorName }}by <a href="/{{ .AuthorName }}">{{ .AuthorName }}</a>{{ end }}
41 </div>
42 </div>
43 </li>
44 {{ end }}
45 </ul>
46 {{ else }}
47 <p class="shithub-issues-empty">No {{ .State }} pull requests.</p>
48 {{ end }}
49 </section>
50 </section>
51 {{- end }}