本站源代码
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

37 Zeilen
2.0KB

  1. {{template "base/head" .}}
  2. <div class="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="ui secondary menu">
  9. <div class="item fitted treepath">
  10. <div class="ui breadcrumb field {{if .Err_TreePath}}error{{end}}">
  11. <a class="section" href="{{EscapePound $.BranchLink}}">{{.Repository.Name}}</a>
  12. {{ $n := len .TreeNames}}
  13. {{ $l := Subtract $n 1}}
  14. {{range $i, $v := .TreeNames}}
  15. <div class="divider"> / </div>
  16. {{if eq $i $l}}
  17. <input type="text" id="file-name" value="{{$v}}" placeholder="{{$.i18n.Tr "repo.editor.add_subdir"}}" autofocus>
  18. <span class="octicon octicon-info poping up" data-content="{{$.i18n.Tr "repo.editor.filename_help"}}" data-position="bottom center" data-variation="tiny inverted"></span>
  19. {{else}}
  20. <span class="section"><a href="{{EscapePound $.BranchLink}}/{{index $.TreePaths $i | EscapePound}}">{{$v}}</a></span>
  21. {{end}}
  22. {{end}}
  23. <span>{{.i18n.Tr "repo.editor.or"}} <a href="{{EscapePound $.BranchLink}}{{if not .IsNewFile}}/{{EscapePound .TreePath}}{{end}}">{{.i18n.Tr "repo.editor.cancel_lower"}}</a></span>
  24. <input type="hidden" id="tree_path" name="tree_path" value="{{.TreePath}}" required>
  25. </div>
  26. </div>
  27. </div>
  28. <div class="field">
  29. <div class="files"></div>
  30. <div class="ui basic button dropzone" id="dropzone" data-upload-url="{{.RepoLink}}/upload-file" data-remove-url="{{.RepoLink}}/upload-remove" data-csrf="{{.CsrfToken}}" data-accepts="{{.UploadAllowedTypes}}" data-max-file="{{.UploadMaxFiles}}" data-max-size="{{.UploadMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
  31. </div>
  32. {{template "repo/editor/commit_form" .}}
  33. </form>
  34. </div>
  35. </div>
  36. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1