aboutsummaryrefslogtreecommitdiff
path: root/forged/templates/repo_log.tmpl
blob: 28aeed0f5238ab1e03da41db0dce56ba5e10ccd0 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

{{/*
	SPDX-License-Identifier: AGPL-3.0-only
	SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
*/}}
{{- define "repo_log" -}}
{{- $root := . -}}
<!DOCTYPE html>
<html lang="en">
	<head>
		{{- template "head_common" . -}}
		<title>Log &ndash; {{ .repo_name }} &ndash; {{ template "group_path_plain" .group_path }} &ndash; {{ .global.forge_title -}}</title>
	</head>
	<body class="repo-log">
		{{- template "header" . -}}
		<main>
			<div class="repo-header">
				<h2>{{- .repo_name -}}</h2>
				<ul class="nav-tabs-standalone">
					<li class="nav-item">
						<a class="nav-link" href="../{{- template "ref_query" $root -}}">Summary</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="../tree/{{- template "ref_query" $root -}}">Tree</a>
					</li>
					<li class="nav-item">
						<a class="nav-link active" href="../log/{{- template "ref_query" $root -}}">Log</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="../branches/">Branches</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="../tags/">Tags</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="../contrib/">Merge requests</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="../settings/">Settings</a>
					</li>
				</ul>
			</div>
			<div class="repo-header-extension">
				<div class="repo-header-extension-content">
					{{- .repo_description -}}
				</div>
			</div>
			<div class="scroll">
				{{- if .ref_name -}}
				<p>
				<strong>
				Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
				</strong>
				</p>
				{{- end -}}
				<table id="commits" class="wide">
					<thead>
						<tr class="title-row">
							<th colspan="4">Commits {{ if .ref_name }} on {{ .ref_name }}{{ end -}}</th>
						</tr>
						<tr>
							<th scope="col">ID</th>
							<th scope="col">Title</th>
							<th scope="col">Author</th>
							<th scope="col">Author date</th>
						</tr>
					</thead>
					<tbody>
						{{- range .commits -}}
							<tr>
								<td class="commit-id"><a href="../commit/{{- .Hash -}}">{{- .Hash -}}</a></td>
								<td class="commit-title">{{- .Message | first_line -}}</td>
								<td class="commit-author">
									<a class="email-name" href="mailto:{{- .Author.Email -}}">{{- .Author.Name -}}</a>
								</td>
								<td class="commit-time">
									{{- .Author.When.Format "2006-01-02 15:04:05 -0700" -}}
								</td>
							</tr>
						{{- end -}}
						{{- if dereference_error .commits_err -}}
							Error while obtaining commit log: {{ .commits_err }}
						{{- end -}}
					</tbody>
				</table>
			</div>
		</main>
		<footer>
			{{- template "footer" . -}}
		</footer>
	</body>
</html>
{{- end -}}