A webmail client. Forked from https://git.sr.ht/~migadu/alps
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

59 righe
1.1 KiB

  1. {{template "head.html"}}
  2. <h1>koushin</h1>
  3. <p>
  4. <a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}">
  5. Back
  6. </a>
  7. </p>
  8. <h2>
  9. {{if .Message.Envelope.Subject}}
  10. {{.Message.Envelope.Subject}}
  11. {{else}}
  12. (No subject)
  13. {{end}}
  14. </h2>
  15. {{define "message-part-tree"}}
  16. {{/* nested templates can't access the parent's context */}}
  17. {{$ = index . 0}}
  18. {{with index . 1}}
  19. <a
  20. {{if .IsText}}
  21. href="{{$.Message.Uid}}?part={{.PathString}}"
  22. {{else}}
  23. href="{{$.Message.Uid}}/raw?part={{.PathString}}"
  24. {{end}}
  25. >
  26. {{if eq $.PartPath .PathString}}<strong>{{end}}
  27. {{.String}}
  28. {{if eq $.PartPath .PathString}}</strong>{{end}}
  29. </a>
  30. {{if gt (len .Children) 0}}
  31. <ul>
  32. {{range .Children}}
  33. <li>{{template "message-part-tree" (tuple $ .)}}</li>
  34. {{end}}
  35. </ul>
  36. {{end}}
  37. {{end}}
  38. {{end}}
  39. <p>Parts:</p>
  40. {{template "message-part-tree" (tuple $ .Message.PartTree)}}
  41. <hr>
  42. {{if .Body}}
  43. <p><a href="{{.Message.Uid}}/reply?part={{.PartPath}}">Reply</a></p>
  44. <pre>{{.Body}}</pre>
  45. {{else}}
  46. <p>Can't preview this message part.</p>
  47. <a href="{{.Message.Uid}}/raw?part={{.PartPath}}">Download</a>
  48. {{end}}
  49. {{template "foot.html"}}