Lindenii Project Forge
Login

/templates/repo_commit.html.tmpl (raw)

{{- define "repo_commit" -}}
<!DOCTYPE html>
<html lang="en">
	<head>
		{{ template "head_common" . }}
		<title>{{ .group_name }}/repos/{{ .repo_name }} &ndash; Lindenii Forge</title>
	</head>
	<body class="repo-commit">
		<div class="padding-wrapper scroll">
			<table id="commit-info-table">
				<thead>
					<tr class="title-row">
						<th colspan="2">Commit Info</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<th scope="row">ID</th>
						<td>{{ .commit_id }}</td>
					</tr>
					<tr>
						<th scope="row">Author</th>
						<td>{{ .commit_object.Author.Name }} &lt;<a href="mailto:{{ .commit_object.Author.Email }}">{{ .commit_object.Author.Email }}</a>&gt;</td>
					</tr>
					<tr>
						<th scope="row">Author Date</th>
						<td>{{ .commit_object.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</td>
					</tr>
					<tr>
						<th scope="row">Committer</th>
						<td>{{ .commit_object.Committer.Name }} &lt;<a href="mailto:{{ .commit_object.Committer.Email }}">{{ .commit_object.Committer.Email }}</a>&gt;</td>
					</tr>
					<tr>
						<th scope="row">Committer Date</th>
						<td>{{ .commit_object.Committer.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</td>
					</tr>
					<tr>
						<th scope="row">Message</th>
						<td><pre>{{ .commit_object.Message }}</pre></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="padding-wrapper scroll">
			{{ range .file_patches }}
				<div class="file-patch">
					{{ .From.Path }} {{ .From.Mode }} &rarr; {{ .To.Path }} {{ .To.Mode }}
					{{ range .Chunks }}
						{{ if eq .Type 0 }}
							<pre class="chunk chunk-unchanged">{{ .Content }}</pre>
						{{ else if eq .Type 1 }}
							<pre class="chunk chunk-addition">{{ .Content }}</pre>
						{{ else if eq .Type 2 }}
							<pre class="chunk chunk-deletion">{{ .Content }}</pre>
						{{ else }}
							<pre class="chunk chunk-unknown">{{ .Content }}</pre>
						{{ end }}
					{{ end }}
				</div>
			{{ end }}
		</div>
		<footer>
			{{ template "footer" . }}
		</footer>
	</body>
</html>
{{- end -}}