You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

upload.tmpl 1.5KB

123456789101112131415161718192021222324252627282930313233
  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="500" 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" .}}