mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-27 18:01:21 +03:00
3e044d2c9f
Fix regression from https://github.com/go-gitea/gitea/pull/25539: https://github.com/go-gitea/gitea/pull/26519#issuecomment-1678825200. Before: <img width="429" alt="Screenshot 2023-08-15 at 15 46 12" src="https://github.com/go-gitea/gitea/assets/115237/a818f60a-77a2-48fe-8e6f-363d152ccb1e"> After: <img width="424" alt="Screenshot 2023-08-15 at 15 46 19" src="https://github.com/go-gitea/gitea/assets/115237/c90159e2-ced2-4a74-8a0f-a1b2b5d0b565"> <img width="605" alt="Screenshot 2023-08-15 at 15 56 11" src="https://github.com/go-gitea/gitea/assets/115237/3ded6f57-86f4-422a-86cb-56dd2c216dee">
33 lines
1.4 KiB
Handlebars
33 lines
1.4 KiB
Handlebars
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository file editor upload">
|
|
{{template "repo/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
<form class="ui comment form" method="post">
|
|
{{.CsrfTokenHtml}}
|
|
<div class="repo-editor-header">
|
|
<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
|
|
<a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
|
|
{{$n := len .TreeNames}}
|
|
{{$l := Eval $n "-" 1}}
|
|
{{range $i, $v := .TreeNames}}
|
|
<div class="breadcrumb-divider">/</div>
|
|
{{if eq $i $l}}
|
|
<input type="text" id="file-name" value="{{$v}}" placeholder="{{$.locale.Tr "repo.editor.add_subdir"}}" autofocus>
|
|
<span data-tooltip-content="{{$.locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
|
|
{{else}}
|
|
<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
|
|
{{end}}
|
|
{{end}}
|
|
<span>{{.locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{.TreePath | PathEscapeSegments}}{{end}}">{{.locale.Tr "repo.editor.cancel_lower"}}</a></span>
|
|
<input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
{{template "repo/upload" .}}
|
|
</div>
|
|
{{template "repo/editor/commit_form" .}}
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|