New Sign in

fierj

Public

Tiny personal git forge

← fierj / templates / patch_list.html
{{template "head" .}}
{{define "title"}}patches - {{.Repo}} - fierj{{end}}
{{template "repo-header" .}}
{{template "repo-tabs" .}}

<div class="threads-header">
    <div class="threads-state-toggle">
        <a href="/{{.Repo}}/patches?state=open" {{if eq .State "open" }} class="active" {{end}}>Open</a>
        <a href="/{{.Repo}}/patches?state=merged" {{if eq .State "merged" }} class="active" {{end}}>Merged</a>
        <a href="/{{.Repo}}/patches?state=closed" {{if eq .State "closed" }} class="active" {{end}}>Closed</a>
    </div>
    <a href="/{{.Repo}}/patches/new" class="btn btn-primary">New patch</a>
</div>

{{if .FreeBranches}}
<div class="patch-branches-hint">
    <strong>Branches available for merge:</strong>
    {{range .FreeBranches}}<code>{{.}}</code> {{end}}
</div>
{{end}}

{{if .Patches}}
<div class="thread-list">
    {{range .Patches}}
    <div class="thread-list-item">
        <svg class="icon thread-icon-{{.State}}" viewBox="0 0 16 16" fill="currentColor">
            {{if eq .State "open"}}
            <path
                d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354Z" />
            {{else if eq .State "merged"}}
            <path
                d="M5.45 5.154A4.25 4.25 0 0 0 9.25 7.5h1.378a2.251 2.251 0 1 1 0 1.5H9.25A5.734 5.734 0 0 1 5 7.123v3.505a2.25 2.25 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.95-.218Z" />
            {{else}}
            <path
                d="M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 3.25 1Zm9.5 5.5a.75.75 0 0 1 .75.75v3.378a2.251 2.251 0 1 1-1.5 0V7.25a.75.75 0 0 1 .75-.75Zm-2.03-5.273a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1-1.06 1.06L12 3.56v2.69a.75.75 0 0 1-1.5 0V3.56l-.72.72a.75.75 0 0 1-1.06-1.06Z" />
            {{end}}
        </svg>
        <div class="thread-list-content">
            <a href="/{{$.Repo}}/patches/{{.ID}}" class="thread-title">{{.Title}}</a>
            <span class="thread-meta">
                {{if .Branch}}branch: <code>{{.Branch}}</code> · {{end}}
                {{.AuthorName}} · {{timeAgo .Updated}}
            </span>
        </div>
    </div>
    {{end}}
</div>
{{else}}
<div class="empty-state">
    <p>No {{.State}} patches.</p>
</div>
{{end}}
{{template "foot" .}}