aboutsummaryrefslogtreecommitdiff
path: root/forged/templates/mailing_list.tmpl
blob: 9144253e52c30a7cb006dc9c4fbca231c5087d47 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

{{/*
	SPDX-License-Identifier: AGPL-3.0-only
	SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
*/}}
{{- define "mailing_list" -}}
<!DOCTYPE html>
<html lang="en">
 	<head>
		{{- template "head_common" . -}}
		<title>{{- index .group_path 0 -}}{{- range $i, $s := .group_path -}}{{- if gt $i 0 -}}/{{- $s -}}{{- end -}}{{- end }}/-/lists/{{ .list_name }} – {{ .global.forge_title -}}</title>
	</head>
	<body class="mailing-list">
		{{- template "header" . -}}
		<main>
			<div class="padding-wrapper">
				<h2>{{ .list_name }}</h2>
				{{- if .list_description -}}
				<p>{{ .list_description }}</p>
				{{- end -}}
				<p><strong>Address:</strong> <code>{{ .list_email_address }}</code></p>
				{{- if .direct_access -}}
				<p><a href="subscribers/">Manage subscribers</a></p>
				{{- end -}}
			</div>
			<div class="padding-wrapper">
				<table class="wide">
					<thead>
						<tr>
							<th colspan="4" class="title-row">Archive</th>
						</tr>
						<tr>
							<th scope="col">Title</th>
							<th scope="col">Sender</th>
							<th scope="col">Date</th>
							<th scope="col">Raw</th>
						</tr>
					</thead>
					<tbody>
						{{- range .list_emails -}}
						<tr>
							<td><a href="message/{{ .id }}">{{ .title }}</a></td>
							<td>{{ .sender }}</td>
							<td>{{ .date }}</td>
							<td><a href="raw/{{ .id }}">download</a></td>
						</tr>
						{{- end -}}
					</tbody>
				</table>
			</div>
		</main>
		<footer>
			{{- template "footer" . -}}
		</footer>
	</body>
</html>
{{- end -}}