internal/web/templates/notifications.html

d7d409e545d4b0999652559ac53e94ce556b56f6
gitbay/internal/web/templates/notifications.html history · blame · raw

22 lines · 1130 bytes

 1{{define "title"}}notifications · {{.Site}}{{end}}
 2{{define "content"}}
 3<div class="listhead">
 4  <h1>Notifications</h1>
 5  <nav class="filters">
 6    <a {{if not .All}}class="active" aria-current="page" {{end}}href="/notifications">unread</a>
 7    <a {{if .All}}class="active" aria-current="page" {{end}}href="/notifications?all=1">all</a>
 8  </nav>
 9  <span class="spacer"></span>
10  {{if .Notices}}<form method="post" action="/notifications" class="inline"><button type="submit" class="btn">Mark all read</button></form>{{end}}
11</div>
12<ul class="issuelist">
13{{range .Notices}}<li>
14  <div class="issuemain">
15    <p class="title"><a href="{{.Href}}">{{.Actor}} {{.Summary}}</a></p>
16    <p class="meta"><a href="/{{.RepoPath}}">{{.RepoPath}}</a> · {{when .CreatedAt}}</p>
17  </div>
18  {{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}}
19</li>
20{{else}}<li class="empty">{{if .All}}nothing here yet{{else}}nothing unread — <a href="/notifications?all=1">show all</a>{{end}}</li>{{end}}
21</ul>
22{{end}}