New Sign in

fierj

Public

Tiny personal git forge

← fierj / templates / patch_view.html
{{template "head" .}}
{{define "title"}}{{.Patch.Title}} - {{.Repo}} - fierj{{end}}
{{template "repo-header" .}}
{{template "repo-tabs" .}}

<div class="thread-detail">
    <div class="thread-detail-header">
        <h2>{{.Patch.Title}}</h2>
        <span class="thread-state thread-state-{{.Patch.State}}">{{.Patch.State}}</span>
    </div>
    <p class="thread-meta-line">
        {{.Patch.AuthorName}} ·
        {{if .Patch.Branch}}branch: <code>{{.Patch.Branch}}</code> · {{end}}
        {{if .Patch.PatchFile}}file: <code>{{.Patch.PatchFile}}</code> · {{end}}
        {{timeAgo .Patch.Created}}
    </p>
</div>

{{if .Patch.Body}}
<div class="thread-comment">
    <div class="thread-comment-header">
        <strong>{{.Patch.AuthorName}}</strong>
        <span>{{timeAgo .Patch.Created}}</span>
    </div>
    <div class="thread-comment-body">{{.Patch.Body}}</div>
</div>
{{end}}

{{if .Diff}}
<pre><code>{{.Diff}}</code></pre>
{{end}}

{{if eq .Patch.State "open"}}
<div class="thread-actions" style="margin-top: var(--space-lg);">
    <form method="POST" action="/{{.Repo}}/patches/{{.Patch.ID}}/merge" style="display:inline;">
        <button type="submit" class="btn btn-primary">Merge</button>
    </form>
    <form method="POST" action="/{{.Repo}}/patches/{{.Patch.ID}}/close" style="display:inline;">
        <button type="submit" class="btn btn-secondary">Close without merging</button>
    </form>
</div>
{{end}}
{{template "foot" .}}