forked from hinterland/hearth
feat: vendor gitea 1.16.2
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
{{if .DefaultBranchBranch}}
|
||||
<h4 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "repo.default_branch"}}
|
||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
|
||||
{{if and $.IsWriter $.Repository.CanContentChange (not .IsDeleted)}}
|
||||
<a role="button" class="right" href="{{.RepoLink}}/settings/branches" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.branches.switch_default_branch"}}">
|
||||
{{svg "octicon-arrow-switch"}}
|
||||
</a>
|
||||
@@ -15,7 +15,7 @@
|
||||
</h4>
|
||||
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped fixed table single line">
|
||||
<table class="ui very basic fixed table single line">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -31,7 +31,7 @@
|
||||
</td>
|
||||
{{/* FIXME: here and below, the tw-overflow-visible is not quite right but it is still needed the moment: to show the important buttons when the width is narrow */}}
|
||||
<td class="tw-text-right tw-overflow-visible">
|
||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
|
||||
{{if and $.IsWriter $.Repository.CanContentChange (not .IsDeleted)}}
|
||||
<button class="btn interact-bg show-create-branch-modal tw-p-2"
|
||||
data-modal="#create-branch-modal"
|
||||
data-branch-from="{{$.DefaultBranchBranch.DBBranch.Name}}"
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted) (not $.IsMirror)}}
|
||||
{{if and $.IsWriter $.Repository.CanContentChange (not .IsDeleted)}}
|
||||
<button class="btn interact-bg tw-p-2 show-modal show-rename-branch-modal"
|
||||
data-is-default-branch="true"
|
||||
data-modal="#rename-branch-modal"
|
||||
@@ -71,7 +71,7 @@
|
||||
{{end}}
|
||||
|
||||
<h4 class="ui top attached header tw-flex tw-items-center tw-justify-between">
|
||||
<div class="tw-flex tw-items-center">
|
||||
<div class="flex-text-block">
|
||||
{{ctx.Locale.Tr "repo.branches"}}
|
||||
</div>
|
||||
</h4>
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped fixed table single line">
|
||||
<table class="ui very basic fixed table single line">
|
||||
<tbody>
|
||||
{{range .Branches}}
|
||||
<tr>
|
||||
@@ -133,14 +133,14 @@
|
||||
<span class="ui orange large label" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.included_desc"}}">
|
||||
{{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "repo.branch.included"}}
|
||||
</span>
|
||||
{{else if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
|
||||
<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}?expand=1">
|
||||
{{else if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
|
||||
<a href="{{$.PullRequestCtx.MakeDefaultCompareLink .DBBranch.Name}}?expand=1">
|
||||
<button id="new-pull-request" class="ui compact basic button tw-mr-0">{{if $.CanPull}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}</button>
|
||||
</a>
|
||||
{{end}}
|
||||
{{else if and .LatestPullRequest.HasMerged .MergeMovedOn}}
|
||||
{{if and (not .DBBranch.IsDeleted) $.AllowsPulls (gt .CommitsAhead 0)}}
|
||||
<a href="{{$.RepoLink}}/compare/{{PathEscapeSegments $.DefaultBranchBranch.DBBranch.Name}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{PathEscape $.Owner.Name}}:{{end}}{{PathEscapeSegments .DBBranch.Name}}?expand=1">
|
||||
<a href="{{$.PullRequestCtx.MakeDefaultCompareLink .DBBranch.Name}}?expand=1">
|
||||
<button id="new-pull-request" class="ui compact basic button tw-mr-0">{{if $.CanPull}}{{ctx.Locale.Tr "repo.pulls.compare_changes"}}{{else}}{{ctx.Locale.Tr "action.compare_branch"}}{{end}}</button>
|
||||
</a>
|
||||
{{end}}
|
||||
@@ -157,7 +157,7 @@
|
||||
</td>
|
||||
{{/* FIXME: here and above, the tw-overflow-visible is not quite right */}}
|
||||
<td class="three wide tw-text-right tw-overflow-visible">
|
||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted)}}
|
||||
{{if and $.IsWriter $.Repository.CanContentChange (not .DBBranch.IsDeleted)}}
|
||||
<button class="btn interact-bg tw-p-2 show-modal show-create-branch-modal"
|
||||
data-branch-from="{{.DBBranch.Name}}"
|
||||
data-branch-from-urlcomponent="{{PathEscapeSegments .DBBranch.Name}}"
|
||||
@@ -179,7 +179,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .DBBranch.IsDeleted) (not $.IsMirror)}}
|
||||
{{if and $.IsWriter $.Repository.CanContentChange (not .DBBranch.IsDeleted)}}
|
||||
<button class="btn interact-bg tw-p-2 show-modal show-rename-branch-modal"
|
||||
data-is-default-branch="false"
|
||||
data-old-branch-name="{{.DBBranch.Name}}"
|
||||
@@ -189,10 +189,10 @@
|
||||
{{svg "octicon-pencil"}}
|
||||
</button>
|
||||
{{end}}
|
||||
{{if and $.IsWriter (not $.IsMirror) (not $.Repository.IsArchived) (not .IsProtected)}}
|
||||
{{if and $.IsWriter $.Repository.CanContentChange (not .IsProtected)}}
|
||||
{{if .DBBranch.IsDeleted}}
|
||||
<button class="btn interact-bg tw-p-2 link-action restore-branch-button" data-url="{{$.Link}}/restore?branch_id={{.DBBranch.ID}}&name={{.DBBranch.Name}}&page={{$.Page.Paginater.Current}}" data-tooltip-content="{{ctx.Locale.Tr "repo.branch.restore" (.DBBranch.Name)}}">
|
||||
<span class="text blue">
|
||||
<span class="tw-text-blue">
|
||||
{{svg "octicon-reply"}}
|
||||
</span>
|
||||
</button>
|
||||
@@ -230,7 +230,6 @@
|
||||
|
||||
<form class="ui form" id="create-branch-form" action="" data-base-action="{{.Link}}/_new/branch/" method="post">
|
||||
<div class="content">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field">
|
||||
{{ctx.Locale.Tr "repo.branch.create_new_branch"}}
|
||||
<span id="modal-create-branch-from-span"></span>
|
||||
@@ -250,9 +249,8 @@
|
||||
</div>
|
||||
<form class="ui form" action="{{$.Repository.Link}}/branches/rename" method="post">
|
||||
<div class="content">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="field default-branch-warning">
|
||||
<span class="text red">{{ctx.Locale.Tr "repo.branch.warning_rename_default_branch"}}</span>
|
||||
<span class="tw-text-red">{{ctx.Locale.Tr "repo.branch.warning_rename_default_branch"}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<span class="text" data-rename-branch-to="{{ctx.Locale.Tr "repo.branch.rename_branch_to"}}"></span>
|
||||
|
||||
Reference in New Issue
Block a user