A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 

99 рядки
2.6 KiB

  1. {{define "subscribers"}}
  2. {{template "header" .}}
  3. <style>
  4. .toolbar {
  5. text-align: right;
  6. margin: 1em 0;
  7. }
  8. </style>
  9. <div class="snug content-container {{if not .CanEmailSub}}clean{{end}}">
  10. {{if .Silenced}}
  11. {{template "user-silenced"}}
  12. {{end}}
  13. {{if .Collection.Collection}}{{template "collection-breadcrumbs" .}}{{end}}
  14. <h1>Subscribers</h1>
  15. {{if .Collection.Collection}}
  16. {{template "collection-nav" .Collection}}
  17. <nav class="pager sub">
  18. <a href="/me/c/{{.Collection.Alias}}/subscribers" {{if eq .Filter ""}}class="selected"{{end}}>Email ({{len .EmailSubs}})</a>
  19. <a href="/me/c/{{.Collection.Alias}}/subscribers?filter=fediverse" {{if eq .Filter "fediverse"}}class="selected"{{end}}>Followers ({{len .Followers}})</a>
  20. </nav>
  21. {{end}}
  22. {{if .Flashes -}}
  23. <ul class="errors">
  24. {{range .Flashes}}<li class="urgent">{{.}}</li>{{end}}
  25. </ul>
  26. {{- end}}
  27. {{ if eq .Filter "fediverse" }}
  28. <table class="classy export">
  29. <tr>
  30. <th style="width: 60%">Username</th>
  31. <th colspan="2">Since</th>
  32. </tr>
  33. {{if and (gt (len .Followers) 0) (not .FederationEnabled)}}
  34. <div class="alert info">
  35. <p><strong>Federation is disabled on this server</strong>, so followers won't receive any new posts.</p>
  36. </div>
  37. {{end}}
  38. {{ if gt (len .Followers) 0 }}
  39. {{range $el := .Followers}}
  40. <tr>
  41. <td><a href="{{.ActorID}}">@{{.EstimatedHandle}}</a></td>
  42. <td>{{.CreatedFriendly}}</td>
  43. </tr>
  44. {{end}}
  45. {{ else }}
  46. <tr>
  47. <td colspan="2">No followers yet.</td>
  48. </tr>
  49. {{ end }}
  50. </table>
  51. {{ else }}
  52. {{if or .CanEmailSub .EmailSubs}}
  53. {{if not .CanEmailSub}}
  54. <div class="alert info">
  55. <p><strong>Email subscriptions are disabled on this server</strong>, so no new emails will be sent out.</p>
  56. </div>
  57. {{end}}
  58. {{if not .EmailSubsEnabled}}
  59. <div class="alert info">
  60. <p><strong>Email subscriptions are disabled</strong>. {{if .EmailSubs}}No new emails will be sent out.{{end}} To enable email subscriptions, turn the option on from your blog's <a href="/me/c/{{.Collection.Alias}}#updates">Customize</a> page.</p>
  61. </div>
  62. {{end}}
  63. <table class="classy export">
  64. <tr>
  65. <th style="width: 60%">Email Address</th>
  66. <th colspan="2">Since</th>
  67. </tr>
  68. {{ if .EmailSubs }}
  69. {{range $el := .EmailSubs}}
  70. <tr>
  71. <td><a href="mailto:{{.Email.String}}">{{.Email.String}}</a></td>
  72. <td>{{.SubscribedFriendly}}</td>
  73. </tr>
  74. {{end}}
  75. {{ else }}
  76. <tr>
  77. <td colspan="2">No subscribers yet.</td>
  78. </tr>
  79. {{ end }}
  80. </table>
  81. {{end}}
  82. {{ end }}
  83. </div>
  84. {{template "foot" .}}
  85. {{template "body-end" .}}
  86. {{end}}