{{template "layout/header.html" .}} {{template "layout/nav.html" .}}
系统消息
{{if .Messages}}
{{if .UnreadCount}} {{end}}
{{range $i, $m := .Messages}} {{$link := ""}} {{if or (eq $m.NotifyType "post_approved") (eq $m.NotifyType "post_rejected")}} {{$link = printf "/posts/%d" (derefUint $m.RelatedID)}} {{else if or (eq $m.NotifyType "comment") (eq $m.NotifyType "comment_reply")}} {{if $m.CommentID}} {{$link = printf "/posts/%d#comment-%d" (derefUint $m.RelatedID) (derefUint $m.CommentID)}} {{else}} {{$link = printf "/posts/%d#comments" (derefUint $m.RelatedID)}} {{end}} {{else if or (eq $m.NotifyType "audit_approved") (eq $m.NotifyType "audit_rejected")}} {{$link = "/settings"}} {{end}} {{if $link}} {{end}}
{{$m.Title}}
{{$m.Content}}
{{index $.NotifyTypeNames $m.NotifyType}} {{$m.CreatedAt.Format "2006-01-02 15:04"}}
{{if not $m.IsRead}} {{end}}
{{if $link}}
{{end}} {{end}}
{{if .TotalPages}}
{{if .HasPrev}} 上一页 {{else}} 上一页 {{end}} {{.Page}} / {{.TotalPages}} {{if .HasNext}} 下一页 {{else}} 下一页 {{end}}
{{end}} {{else}}

暂无消息

{{end}}
{{template "layout/footer.html" .}}