{{define "title"}}Message Inbox{{end}} {{define "content"}}

Messages

{{if .IsSentBox}}Sent{{else}}Inbox{{end}}

{{$Root := .}} {{$UserMap := .UserMap}} {{$Request := .Request}}
{{if .ViewThread}}
{{InputCSRF}}

Markdown formatting supported.

Reminder: don't share sensitive information over Direct Messages. Please review the Privacy Policy and Terms of Service as it pertains to DMs on the main website and the chat room.

{{range .ViewThread}}
{{$SourceUser := $UserMap.Get .SourceUserID}}
{{template "avatar-64x64" $SourceUser}}

{{$SourceUser.NameOrUsername}} {{if $SourceUser.IsAdmin}} Admin {{end}}

{{$SourceUser.Username}} {{if not $SourceUser.Certified}} Not Certified! {{end}}

{{ToMarkdown .Message}}
Sent {{SincePrettyCoarse .CreatedAt}} ago {{if not .Read}}UNREAD{{end}} {{if eq $Root.CurrentUser.ID $SourceUser.ID}}
{{InputCSRF}}
{{end}}

{{end}}
Found {{.ThreadPager.Total}} message{{Pluralize64 .ThreadPager.Total}} in this thread (page {{.ThreadPager.Page}} of {{.ThreadPager.Pages}}).
{{InputCSRF}}
{{if .ThreadPager.HasPrevious}} Previous {{end}} {{if .ThreadPager.HasNext}} Next Page {{end}}
{{else}}

You have {{.Unread}} unread message{{Pluralize64 .Unread}}. Select a message on the other column to read the conversation here.

{{end}}
Found {{.Pager.Total}} message{{Pluralize64 .Pager.Total}} (page {{.Pager.Page}} of {{.Pager.Pages}}).
{{if .Pager.HasPrevious}} Previous {{end}} {{if .Pager.HasNext}} Next Page {{end}}
{{end}}