{{template "layout/header.html" .}} {{template "layout/nav.html" .}}
{{if eq .CurrentTab "system"}}
系统消息
{{else if eq .CurrentTab "mention"}}
@艾特我的
{{else if eq .CurrentTab "like"}}
点赞通知
{{else if eq .CurrentTab "follow"}}
关注通知
{{else}}
全部消息
{{end}} {{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 eq $m.NotifyType "comment_mention"}} {{if $m.CommentID}} {{$link = printf "/posts/%d#mention-%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"}} {{else if eq $m.NotifyType "follow"}} {{$link = printf "/space/%d" (derefUint $m.RelatedID)}} {{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" .}}