{{define "layout"}} {{template "title" .}}
{{$here := ""}}{{with field . "Repo"}}{{$here = printf "%s/%s" .OwnerName .Name}}{{end}}
{{with field . "Repo"}}
{{if field $ "RepoHome"}}

{{.OwnerName}}/{{.Name}}

{{else}}

{{.OwnerName}}/{{.Name}}

{{end}} {{if eq .Visibility "private"}}Private{{end}} {{if .Settings.Archived}}Archived{{end}} {{if $.Viewer}}
{{end}}
{{with field $ "Desc"}}

{{.}}

{{end}} {{with field $ "Topics"}}

{{range .}}{{.}} {{end}}

{{end}} {{with $.Repo.Settings.Website}}

{{.}}

{{end}} {{range field $ "Mirrors"}}

{{if eq .Direction "push"}}Mirrors to{{else}}Mirrors from{{end}} {{.Target}}{{if .Error}} · sync error: {{.Error}}{{else if .Synced}} · synced {{.Synced}}{{end}}

{{end}}
{{end}}
{{template "content" .}}
{{end}} {{define "mark"}}{{end}} {{define "reporow"}}
  • {{.OwnerName}}/{{.Name}}{{if eq .Visibility "private"}} Private{{end}}{{if .Settings.Archived}} Archived{{end}}

    {{if .Desc}}

    {{.Desc}}

    {{end}} {{if .Topics}}

    {{range .Topics}}{{.}} {{end}}

    {{end}}

    {{template "branchicon"}} {{.DefaultBranch}}{{if .License}} · {{.License}}{{end}}{{if .Updated}} · updated {{.Updated}}{{end}}

  • {{end}} {{define "refmenu"}}{{if .Branches}}
    {{template "branchicon"}} {{.Ref}}
    {{range .Branches}}{{.Name}} {{end}}All refs →
    {{else}}{{template "branchicon"}} {{.Ref}}{{end}}{{end}} {{define "branchicon"}}{{end}} {{define "sigbadge"}}{{sigLabel .State}}{{if .Signer}} · {{.Signer}}{{end}}{{end}} {{define "authorname"}}{{if .User}}{{.Name}}{{else}}{{.Name}}{{end}}{{end}} {{/* difffiles renders a parsed diff: one foldable section per file, with line-number gutters and review threads inline. Base and Can are the MR's comment endpoint and the viewer's write permission; the commit page passes neither and gets the same diff without thread controls. */}} {{define "difffiles"}}{{$base := .Base}}{{$can := .Can}} {{range .Files}}
    {{if eq .Status "renamed"}}{{.OldPath}} → {{end}}{{.Path}} {{if ne .Status "modified"}}{{.Status}}{{end}} {{if .Adds}}+{{.Adds}}{{end}}{{if .Dels}} −{{.Dels}}{{end}} {{if .Binary}}

    Binary file not shown.

    {{else}}
    {{range .Lines}}{{if eq .Class "hunk"}} {{else if eq .Class "meta"}} {{else}} {{end}}{{range .Threads}} {{end}}{{end}}
    {{.Text}}
    {{.Text}}
    {{if .OldLine}}{{.OldLine}}{{end}}{{if .NewLine}}{{.NewLine}}{{end}}{{if .Code}}{{.Code}}{{else}}{{.Content}}{{end}}
    {{if .Resolved}}

    resolved by {{.Resolved}}

    {{end}}{{range .Comments}}

    {{.Author}} {{when .CreatedAt}}

    {{.BodyHTML}}
    {{end}}{{template "threadact" dict "ID" .ID "Resolved" .Resolved "Base" $base "Can" $can}}
    {{end}}
    {{end}}{{end}} {{define "threadact"}}{{if .Can}}
    {{end}}{{end}}