{{/* Always rendered (independent of search-mode, unlike the bulk toolbar's own
Move-to dropdown) so the message context menu's Move-to submenu always has a
folder list to build from, search results included. */}}
Confirm Action
Are you sure you want to proceed?
{{/* Delete choice — Trash / Delete Permanently / Cancel — offered whenever the
message(s) being deleted aren't already under Trash (once they are, deleting
only has one real outcome, so that path still just uses the plain
confirmationModal above). */}}
{{/* z-index bumped above the compose popup's own 1080 (webmail_compose_widget.html)
so this still renders on top if it's open — same reasoning as
composeCloseDraftModal there. */}}
Delete
Move to Trash, or delete permanently?
{{template "compose_widget" .}}
{{template "webmail_shortcuts" .}}
{{end}}
{{/* msgRow renders one message-list row — . is a folderRow (webmail_mail.go). Shared
by the main list render above and webmailMailPoll's fragment response (the
periodic new-mail check, see the poll IIFE below) so a message polled in later
looks byte-identical to one rendered on initial page load. */}}
{{define "msgRow"}}
{{$rowHref := printf "/webmail/mail/%s/%d" .Folder .ID}}
{{$paneHref := printf "/webmail/mail/%s/%d/pane" .Folder .ID}}
{{$isDraft := eq .Folder "Drafts"}}
{{if $isDraft}}{{$rowHref = printf "/webmail/mail/compose?draft=%d&folder=Drafts" .ID}}{{end}}
{{$displayName := senderName .CachedFrom}}
{{if eq .Folder "Sent"}}{{if .CachedTo}}{{$displayName = senderName .CachedTo}}{{else}}{{$displayName = "(no recipient)"}}{{end}}{{end}}
{{end}}
{{/* folderTreeNode renders one sidebar folder row plus (if any) its children,
recursing into itself for each child — . is a *folderViewNode (webmail_mail.go's
buildFolderView), which carries everything needed (icon, counts, active state,
renameable/can-add-child/is-spam/is-trash) precomputed, so no shared state needs
threading through the recursion beyond the node itself. */}}
{{define "folderTreeNode"}}