Fork to maintain patches against the official gitea for https://code.ceondo.com https://github.com/go-gitea/gitea

home.tmpl 4.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {{template "base/head" .}}
  2. <div class="repository file list">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <div class="ui repo-description">
  7. <div id="repo-desc">
  8. {{if .Repository.DescriptionHTML}}<span class="description has-emoji">{{.Repository.DescriptionHTML}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
  9. <a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
  10. </div>
  11. {{if .RepoSearchEnabled}}
  12. <div class="ui repo-search">
  13. <form class="ui form" action="{{.RepoLink}}/search" method="get">
  14. <div class="field">
  15. <div class="ui action input">
  16. <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
  17. <button class="ui icon button" type="submit">
  18. <i class="search icon"></i>
  19. </button>
  20. </div>
  21. </div>
  22. </form>
  23. </div>
  24. {{end}}
  25. </div>
  26. {{template "repo/sub_menu" .}}
  27. <div class="ui secondary menu">
  28. {{if .PullRequestCtx.Allowed}}
  29. <div class="fitted item">
  30. <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{if .SignedUser.HasForkedRepo .BaseRepo.ID }}{{.SignedUser.Name}}:{{end}}{{.BranchName}}">
  31. <button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button>
  32. </a>
  33. </div>
  34. {{end}}
  35. {{template "repo/branch_dropdown" .}}
  36. {{ $n := len .TreeNames}}
  37. {{ $l := Subtract $n 1}}
  38. <div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
  39. <div class="right fitted item">
  40. {{if .Repository.CanEnableEditor}}
  41. <div id="file-buttons" class="ui tiny blue buttons">
  42. {{if .CanAddFile}}
  43. <a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button">
  44. {{.i18n.Tr "repo.editor.new_file"}}
  45. </a>
  46. {{end}}
  47. {{if .CanUploadFile}}
  48. <a href="{{.RepoLink}}/_upload/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button">
  49. {{.i18n.Tr "repo.editor.upload_file"}}
  50. </a>
  51. {{end}}
  52. </div>
  53. {{end}}
  54. <!-- Only show clone panel in repository home page -->
  55. {{if eq $n 0}}
  56. <div class="ui action tiny input" id="clone-panel">
  57. {{if not $.DisableHTTP}}
  58. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
  59. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  60. </button>
  61. {{end}}
  62. {{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  63. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
  64. SSH
  65. </button>
  66. {{end}}
  67. {{if not $.DisableHTTP}}
  68. <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
  69. {{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  70. <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
  71. {{end}}
  72. {{if or ((not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)))}}
  73. <button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
  74. <i class="octicon octicon-clippy"></i>
  75. </button>
  76. {{end}}
  77. <div class="ui basic jump dropdown icon button poping up" data-content="{{.i18n.Tr "repo.download_archive"}}" data-variation="tiny inverted" data-position="top right">
  78. <i class="download icon"></i>
  79. <div class="menu">
  80. <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="octicon octicon-file-zip"></i> ZIP</a>
  81. <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
  82. </div>
  83. </div>
  84. </div>
  85. {{end}}
  86. </div>
  87. </div>
  88. {{if .IsViewFile}}
  89. {{template "repo/view_file" .}}
  90. {{else}}
  91. {{template "repo/view_list" .}}
  92. {{end}}
  93. </div>
  94. </div>
  95. {{template "base/footer" .}}