code.gitea.io/gitea@v1.22.3/templates/repo/editor/upload.tmpl (about)

     1  {{template "base/head" .}}
     2  <div role="main" aria-label="{{.Title}}" class="page-content repository file editor upload">
     3  	{{template "repo/header" .}}
     4  	<div class="ui container">
     5  		{{template "base/alert" .}}
     6  		<form class="ui comment form" method="post">
     7  			{{.CsrfTokenHtml}}
     8  			<div class="repo-editor-header">
     9  				<div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
    10  					<a class="section" href="{{$.BranchLink}}">{{.Repository.Name}}</a>
    11  					{{$n := len .TreeNames}}
    12  					{{$l := Eval $n "-" 1}}
    13  					{{range $i, $v := .TreeNames}}
    14  						<div class="breadcrumb-divider">/</div>
    15  						{{if eq $i $l}}
    16  							<input type="text" id="file-name" maxlength="255" value="{{$v}}" placeholder="{{ctx.Locale.Tr "repo.editor.add_subdir"}}" autofocus>
    17  							<span data-tooltip-content="{{ctx.Locale.Tr "repo.editor.filename_help"}}">{{svg "octicon-info"}}</span>
    18  						{{else}}
    19  							<span class="section"><a href="{{$.BranchLink}}/{{index $.TreePaths $i | PathEscapeSegments}}">{{$v}}</a></span>
    20  						{{end}}
    21  					{{end}}
    22  					<span>{{ctx.Locale.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}{{if not .IsNewFile}}/{{.TreePath | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "repo.editor.cancel_lower"}}</a></span>
    23  					<input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
    24  				</div>
    25  			</div>
    26  			<div class="field">
    27  				{{template "repo/upload" .}}
    28  			</div>
    29  			{{template "repo/editor/commit_form" .}}
    30  		</form>
    31  	</div>
    32  </div>
    33  {{template "base/footer" .}}