{{define "mergeopts"}}
{{end}} {{define "mrs"}} {{template "layout-start" .}} {{template "flowlist" .Flow}} {{template "layout-end" .}} {{end}} {{define "flowlist"}}
{{if .CanNew}}{{t .NewKey}}{{end}}
{{if .Filters}} {{end}} {{if eq .Dir "asc"}} {{else}} {{end}}
{{end}} {{define "mr"}} {{template "layout-start" .}}

{{if .Banner}}{{.Banner.StateLabel}}{{else}}{{.MR.Status}}{{end}} {{if .MR.Draft}}{{t "mr.draft"}}{{end}}

{{.MR.Title}}

!{{.MR.Number}}{{if .Banner}} · {{.Banner.WhenLabel}}{{end}}

{{if .Banner}}

{{if .Banner.AuthorURL}}{{if .Banner.Avatar}}{{else}}{{.Banner.Initial}}{{end}}{{.Banner.Author}}{{else if .Banner.Author}}{{.Banner.Initial}} {{.Banner.Author}}{{end}} {{t "mr.wantsLead"}} {{.Banner.CommitPhrase}} {{t "mr.wantsFrom"}} {{.MR.SourceBranch}} {{t "mr.wantsInto"}} {{.MR.TargetBranch}} {{if ne (t "mr.wantsTail") "-"}}{{t "mr.wantsTail"}}{{end}}

{{end}} {{if .Labels}}

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

{{end}}

{{t "mr.pipeline"}}

{{if .MRPipe}} {{$pipe := .MRPipe}}
#{{$pipe.ID}} {{$pipe.Label}}
{{range $pipe.Stages}}
{{t "pipe.stage"}}: {{.Name}}
{{end}}
{{template "pipe-retry" (dict "Can" .CanWrite "CSRF" .CSRF "Path" .Repo.FullPath "ID" $pipe.ID "Failed" $pipe.Failed "Back" (printf "/%s/-/merge-requests/%d" .Repo.FullPath .MR.Number))}}
{{else}}{{t "mr.noPipeline"}}{{end}}

{{t "rev.title"}}

    {{range .Reviews}}
  • {{.Username}} {{.Label}} {{if and $.CanDismiss (or (eq .Status "changes") (eq .Status "rejected"))}}
    {{end}}
  • {{else}}
  • {{t "rev.none"}}
  • {{end}}
{{if .CanReview}}
{{if .CanApprove}}{{end}}
{{end}}
{{if and (eq .MR.Status "merged") .Banner}}

{{if .Banner.MergedBy}}{{t "mr.mergedByLead"}} {{if .Banner.MergedByURL}}{{.Banner.MergedBy}}{{else}}{{.Banner.MergedBy}}{{end}} {{t "mr.mergedByOn"}} {{.Banner.MergedDate}}{{else}}{{t "mr.mergedOn" .Banner.MergedDate}}{{end}} {{if .Banner.MergeShort}}{{.Banner.MergeShort}}{{end}}

{{else}} {{if .MergeBlocks}}

{{t "mr.block.why"}}

    {{range .MergeBlocks}}
  • {{.}}
  • {{end}}
{{end}} {{if and .CanMerge (not .MergeBlocks)}}
{{template "mergeopts" .}}
{{end}} {{if .CanForce}}

{{t "mr.force.warn"}}

{{template "mergeopts" .}}
{{end}}
{{if .CanClose}}
{{end}} {{if .CanReopen}}
{{end}}
{{end}}

{{t "mr.overview"}} {{t "mr.commits"}}{{if .Banner}} {{.Banner.NCommits}}{{end}} {{t "mr.pipelines"}}{{if .Banner}} {{.Banner.NPipes}}{{end}} {{t "mr.changes"}}{{if .Banner}} {{.Banner.NChanges}}{{end}}

{{if .MR.Description}}
{{.DescHTML}}
{{end}} {{if .CanEditMR}}
{{t "mr.edit"}}
{{end}}

{{t "mr.timeline"}}

    {{range .Timeline}}
  1. {{if .Actor}}{{if .ActorURL}}{{.Actor}}{{else}}{{.Actor}}{{end}}{{end}} {{if .URL}}{{.Text}}{{else}}{{.Text}}{{end}} {{.When}} {{if .Body}}
    {{.Body}}
    {{end}} {{if .HTML}}
    {{.HTML}}
    {{end}} {{range .Replies}}
    {{if .ActorURL}}{{.Actor}}{{else}}{{.Actor}}{{end}} {{.When}}
    {{.HTML}}
    {{end}} {{if and (eq .Kind "comment") $.CanComment}} {{t "issue.fromComment"}}{{end}}
  2. {{end}}
{{if .CanComment}}
{{end}}

{{t "mr.commits"}}

{{t "mr.pipelines"}}

{{if .PipeRows}}
    {{range .PipeRows}}
  • #{{.ID}} {{.Label}} {{template "pipe-retry" (dict "Can" $.CanWrite "CSRF" $.CSRF "Path" $.Repo.FullPath "ID" .ID "Failed" .Failed "Back" (printf "/%s/-/merge-requests/%d" $.Repo.FullPath $.MR.Number))}}
  • {{end}}
{{else}}

{{t "mr.noPipeline"}}

{{end}}

{{t "mr.changes"}}

{{if .CanApply}}

{{t "sug.applyWord"}}

{{t "sug.optional"}}

{{end}}
{{if .CommitDiff}}{{if .CommitDiff.Files}}{{template "repodiff" .}}{{else}}

{{t "mr.noDiff"}}

{{end}}{{else}}

{{t "mr.noDiff"}}

{{end}} {{if .CanComment}} {{end}}
{{template "layout-end" .}} {{end}} {{define "pipenav"}}

{{t "pipe.title"}} {{t "edit.title"}}

{{end}} {{define "pipelines"}} {{template "layout-start" .}}

{{t "pipe.title"}}

{{template "pipenav" .}}
{{t "pipe.showID"}}
{{if .CanWrite}}
{{end}}
{{template "pipe-rows" .}} {{if not .PipeRows}}{{end}}
{{t "pipe.col.status"}}{{t "pipe.col.pipeline"}}{{t "pipe.col.by"}}{{t "pipe.col.stages"}}
{{t "pipe.none"}}
{{template "layout-end" .}} {{end}} {{define "cancel-form"}}
{{if .C.Force}}{{end}}
{{end}} {{define "pipeline"}} {{template "layout-start" .}}

{{t "pipe.one"}} #{{.Pipe.ID}}

{{template "pipenav" .}}
{{.PipeLabel}}{{if .PipeSource}} {{.PipeSource}}{{end}} {{.Pipe.Ref}} {{.Pipe.CommitSHA}} {{template "pipe-retry" (dict "Can" .CanWrite "CSRF" .CSRF "Path" .Repo.FullPath "ID" .Pipe.ID "Failed" .PipeFailed "Back" (printf "/%s/-/pipelines/%d" .Repo.FullPath .Pipe.ID))}}{{if .PipeCancel}} {{template "cancel-form" (dict "C" .PipeCancel "CSRF" .CSRF "Action" (printf "/%s/-/pipelines/%d/cancel" .Repo.FullPath .Pipe.ID))}}{{end}}
{{if .PipeWait}}

{{t "pipe.waiting_for_job"}} {{.PipeWait}}

{{end}}

{{t "pipe.runningOn" .RunnerName}} · {{t "help.runnerDocs"}}

    {{range .PipeJobs}}
  • {{.Name}} {{.Label}}{{if .DNI}} {{t "pipe.dni"}}{{end}}{{if .Queue}} {{.Queue}}{{end}} {{.Stage}}
  • {{end}}
{{template "layout-end" .}} {{end}} {{define "pipe-rows"}} {{range .PipeRows}} {{$pipe := .}} {{.Label}}
{{.Duration}}
{{.When}}
#{{.ID}} {{if .Title}}
{{.Title}}
{{end}}
{{if .Ref}}{{.Ref}}{{end}} {{if .Short}}{{.Short}}{{end}} {{if .SourceLabel}}{{.SourceLabel}}{{if .MRNumber}} !{{.MRNumber}}{{end}}{{end}} {{if .Actor}}{{if .ActorURL}}{{end}}{{if .Avatar}}{{else}}{{.Initial}}{{end}}{{if .ActorURL}}{{end}}{{end}}
{{if .Actor}}{{if .ActorURL}}{{end}}{{if .Avatar}}{{.Actor}}{{else}}{{.Initial}}{{end}}{{if .ActorURL}}{{end}}{{end}}
{{range .Stages}}
{{t "pipe.stage"}}: {{.Name}}
{{end}}
{{template "pipe-retry" (dict "Can" $.CanWrite "CSRF" $.CSRF "Path" $.Repo.FullPath "ID" .ID "Failed" .Failed "Back" (printf "/%s/-/pipelines" $.Repo.FullPath))}}
{{end}} {{end}} {{define "pipe-retry"}} {{if .Can}}
{{t "pipe.retry"}}
{{end}} {{end}} {{define "job"}} {{template "layout-start" .}}

{{with .JobPage}}{{.Name}}{{end}}

{{template "pipenav" $}} {{with .JobPage}} {{$page := .}}

{{.Label}}{{if .Queue}} {{.Queue}}{{end}} {{t "pipe.started"}} {{.When}} {{t "pipe.by"}} {{if .ActorURL}}{{end}}{{if .Avatar}}{{else if .Actor}}{{.Initial}}{{end}} {{.Actor}}{{if .ActorURL}}{{end}}

{{t "pipe.raw"}}

{{t "pipe.runningOn" (or .Runner $.RunnerName)}}

{{t "pipe.utc"}}

{{range .Blocks}}{{if .Section}}
    {{range .Lines}}
  1. {{.N}}{{.Time}}{{range .Spans}}{{if .Class}}{{.Text}}{{else}}{{.Text}}{{end}}{{end}}
  2. {{end}}
{{else}}{{range .Lines}}
{{.N}}{{.Time}}{{range .Spans}}{{if .Class}}{{.Text}}{{else}}{{.Text}}{{end}}{{end}}
{{end}}{{end}}{{end}} {{if not .Blocks}}

{{t "pipe.emptyLog"}}

{{end}}
{{end}} {{template "layout-end" .}} {{end}} {{define "editor"}} {{template "layout-start" .}}

{{t "edit.title"}}

{{template "pipenav" .}}

{{t "edit.title"}}

{{.Editor.Status}}

{{if .Editor.Missing}}

{{t "edit.missing"}}

{{end}}
{{range .Editor.Rows}}{{.N}}{{end}}
{{range .Editor.Rows}}
{{.HTML}}
{{end}}
    {{range .Editor.Issues}}
  • {{.Line}}: {{.Text}}
  • {{end}}
{{if .CanWrite}} {{if .Editor.NeedsMR}}

{{t "edit.protectedHint"}}

{{end}} {{if .Editor.NeedsMR}}{{end}} {{range .Branches}}{{end}} {{end}}
{{template "layout-end" .}} {{end}} {{define "releases"}} {{template "layout-start" .}}

{{t "title.releases"}}

{{if .ReleaseOnly}}

{{if .Repo.Description}}{{.Repo.Description}} · {{end}}{{t "rel.onlyNote"}}

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

{{.Name}} {{.Tag}}

{{if not $.ReleaseOnly}}

{{short .CommitSHA}}

{{end}} {{if .Body}}
{{.Body}}
{{end}}
    {{$tag := .Tag}}{{$path := $.Repo.FullPath}} {{range .Assets}}
  • {{.Name}} {{.Size}} {{t "rel.bytes"}}{{if $.CanAdmin}}
    {{tip "rel.tip.deleteAsset"}}
    {{end}}
  • {{end}}
{{if $.CanAdmin}}
{{tip "rel.tip.delete"}}
{{end}}
{{else}}

{{t "rel.none"}}

{{end}} {{template "layout-end" .}} {{end}} {{define "approvalform"}} {{if .Approval}} {{if .Approval.Warn}}

{{.Approval.WarnText}}

{{end}} {{if .Approval.Locked}}

{{t "appr.locked"}} {{.Approval.GroupPath}}

{{t "appr.required"}}: {{if .Approval.MaintainerRequired}}{{t "appr.on"}}{{else}}{{t "appr.off"}}{{end}}

{{t "appr.count"}}: {{.Approval.RequiredCount}}

{{t "appr.developers"}}: {{if .Approval.DevelopersApprove}}{{t "appr.on"}}{{else}}{{t "appr.off"}}{{end}}

{{else}}
{{end}} {{end}} {{end}} {{define "roleselect"}} {{end}} {{define "settings"}} {{template "layout-start" .}}

{{t "title.settings"}}

{{if not .CanAdmin}}

{{t "set.onlyAdmin" (roleName .Role)}}

{{end}} {{if .CanAdmin}}

{{t "set.general"}} {{t "set.members"}} {{t "set.branches"}} {{t "set.tags"}} {{t "set.secrets"}} {{t "set.webhooks"}} {{t "appr.tab"}}

{{if eq .Tab "members"}}
{{template "roleselect" "developer"}}
    {{range .Members}}
  • {{template "usermark" .}}{{if and (not .Pending) .UserID}}{{.Username}}{{else}}{{.Username}}{{end}} · {{roleName .Role}} {{if .Pending}}{{t "set.pending"}}{{end}} {{if not .Pending}}
    {{end}}
  • {{end}}
{{else if eq .Tab "branches"}}
    {{range .Patterns}}
  • {{.}}
  • {{end}}

{{t "set.protectHint"}}

{{else if eq .Tab "tags"}}
    {{range .TagPatterns}}
  • {{.}}
  • {{end}}

{{t "set.tagHint"}}

{{else if eq .Tab "secrets"}} {{template "secretpanel" .}} {{else if eq .Tab "webhooks"}} {{template "webhookform" .}} {{else if eq .Tab "approvals"}} {{template "approvalform" .}} {{else}}

{{t "logo.hint"}}

{{t "set.delete"}}

{{end}} {{end}} {{template "layout-end" .}} {{end}} {{define "secretpanel"}}

{{t "set.invisibleHint"}}

{{if .Secrets}}
{{range .Secrets}}{{end}}
{{t "set.secretName"}} {{t "wh.flags"}} {{t "wh.actions"}}
{{.Name}} {{if .Protected}}{{t "vis.protected"}}{{end}} {{if .Invisible}}{{t "set.invisible"}}{{end}}
{{if .Invisible}}
{{t "action.replace"}}
{{else}}
{{t "action.edit"}}
{{end}}
{{end}}

{{t "set.valuesHidden"}}

{{end}} {{define "webhookform"}}
{{if .HookEdit.ID}}

{{t "wh.edit"}}

{{end}}
{{t "wh.token"}}
  • {{range .HookSecrets}}
  • {{end}}
{{t "wh.tokenHint"}}
{{range .HookEdit.Extra}}{{end}}
{{if .HookEdit.ID}}{{t "action.cancel"}}{{end}}
{{if .Hooks}}
{{range .Hooks}} {{if .Deliveries}}{{end}} {{end}}
{{t "set.whName"}} {{t "wh.url"}} {{t "wh.events"}} {{t "wh.actions"}}
{{.Name}} {{presetName .Preset}} {{.Method}} {{.URL}} {{range .Badges}}{{.}}{{end}}{{if .Filter}}{{.Filter}}{{end}}
{{t "action.edit"}}
{{if $.HookTargets}}{{end}}
{{range .Deliveries}}{{.EventType}} → {{.StatusCode}} {{.Error}} {{end}}
{{if .HookTargets}}

{{t "wh.copyTitle"}}

{{t "wh.copyTip"}}

{{end}} {{end}}
{{end}} {{define "group"}} {{template "layout-start" .}}

{{if eq .Tab "members"}}{{t "group.tab.members"}}{{else if eq .Tab "settings"}}{{t "group.tab.settings"}}{{else}}{{.Group.Name}}{{end}}

{{if and (ne .Tab "members") (ne .Tab "settings")}}{{if .Group.Description}}

{{.Group.Description}}

{{end}}{{end}} {{if eq .Tab "members"}} {{if .CanAdmin}}
{{template "roleselect" (printf "%s" .Group.DefaultRole)}}
{{end}}
    {{range .Members}}
  • {{template "usermark" .}}{{if and (not .Pending) .UserID}}{{.Username}}{{else}}{{.Username}}{{end}} · {{roleName .Role}} {{if eq .UserID $.Group.OwnerID}}{{t "group.owner"}}{{end}} {{if .Pending}}{{t "set.pending"}}{{end}} {{if and $.CanAdmin (not .Pending) (ne .UserID $.Group.OwnerID)}}
    {{end}}
  • {{end}}
{{else if eq .Tab "settings"}}

{{t "new.roleHint"}}

{{t "appr.tab"}}

{{template "approvalform" .}}

{{t "logo.hint"}}

{{t "set.secrets"}}

{{template "secretpanel" .}} {{if .IsOwner}}

{{t "own.transfer"}}

{{if .Candidates}}

{{t "own.confirm" (index .Candidates 0).Username}}

{{else}}

{{t "own.needMember"}}

{{end}} {{end}}

{{t "runner.title"}}

{{t "runner.groupLead"}} {{t "help.runnerDocs"}}

{{if .RunnerOptIn}}{{t "runner.optinOn"}}{{else}}{{t "runner.optinOff"}}{{end}} {{tip "runner.tip.optin"}}

{{if .OptInNames}}

{{t "runner.optinWho"}} {{range $i, $n := .OptInNames}}{{if $i}}, {{end}}{{$n}}{{end}}

{{end}}
{{template "runnerlist" (dict "Runners" .RunnerList "CSRF" .CSRF "Delete" (printf "/groups/%s/runners/delete" .Group.Path) "Token" .NewRunnerToken "New" (printf "/groups/%s/runners/token" .Group.Path) "Base" .BaseURL)}}

{{t "set.webhooks"}}

{{t "group.secretsNote"}}

{{template "webhookform" .}} {{else}} {{if .Heat}}{{template "heatmap" .Heat}}{{end}}
{{t "repo.sortPushed"}} {{t "group.sort"}} {{if eq .SortBy "name"}}{{if eq .SortDir "desc"}}↓{{else}}↑{{end}}{{end}}
    {{range .Cards}}
  • {{template "namemark" .Repo}} {{.Repo.Name}} {{template "visicon" .Repo.Visibility}} ★ {{.Stars}} {{.Pushed}} · {{t "group.created" .When}}
    ⋯
  • {{else}}
  • {{t "group.empty"}}
  • {{end}}
{{end}} {{template "layout-end" .}} {{end}}