internal/web/templates/notifications.html
23 lines · 1173 bytes
1{{define "width"}}wide{{end}}
2{{define "title"}}notifications · {{.Site}}{{end}}
3{{define "content"}}
4<div class="listhead">
5 <h1>Notifications</h1>
6 <nav class="filters">
7 <a {{if not .All}}class="active" aria-current="page" {{end}}href="/notifications">unread</a>
8 <a {{if .All}}class="active" aria-current="page" {{end}}href="/notifications?all=1">all</a>
9 </nav>
10 <span class="spacer"></span>
11 {{if .Notices}}<form method="post" action="/notifications" class="inline"><button type="submit" class="btn">Mark all read</button></form>{{end}}
12</div>
13<ul class="issuelist rows">
14{{range .Notices}}<li>
15 <div class="issuemain">
16 <p class="title"><a href="{{.Href}}">{{.Actor}} {{.Summary}}</a></p>
17 <p class="meta"><a href="/{{.RepoPath}}">{{.RepoPath}}</a> · {{when .CreatedAt}}</p>
18 </div>
19 {{if not .Read}}<form method="post" action="/notifications" class="inline"><input type="hidden" name="id" value="{{.ID}}"><button type="submit" class="btn">Mark read</button></form>{{end}}
20</li>
21{{else}}<li class="empty">{{if .All}}nothing to show{{else}}no unread notifications — <a href="/notifications?all=1">show all</a>{{end}}</li>{{end}}
22</ul>
23{{end}}