2025-04-23 16:48:26 +00:00
|
|
|
{{if .CanSyncFork}}
|
2025-05-02 14:25:05 +00:00
|
|
|
<div class="ui positive message tw-flex tw-items-center" id="sync_fork_msg">
|
2025-04-23 16:48:26 +00:00
|
|
|
<div class="tw-flex-1">
|
2025-05-02 14:25:05 +00:00
|
|
|
{{$baseBranchHTML := HTMLFormat "<a href='%s'>%s:%s</a>" .BaseBranchLink .Repository.BaseRepo.FullName .BranchName}}
|
|
|
|
{{ctx.Locale.TrN .ForkCommitsBehind "repo.sync_fork.branch_behind_one" "repo.sync_fork.branch_behind_few" .ForkCommitsBehind $baseBranchHTML}}
|
2025-04-23 16:48:26 +00:00
|
|
|
</div>
|
2025-05-02 14:25:05 +00:00
|
|
|
<form method="post" action="{{.RepoLink}}/sync_fork">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
<input type="hidden" name="branch" value="{{.BranchName}}">
|
|
|
|
<button class="ui compact positive button tw-m-0">
|
|
|
|
{{ctx.Locale.Tr "repo.sync_fork.button"}}
|
|
|
|
</button>
|
|
|
|
</form>
|
2025-04-23 16:48:26 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|