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

home.tmpl 15 kB

4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
6 years ago
3 years ago
Template Repositories (#8768) * Start work on templates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Continue work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix IsTemplate vs IsGenerated Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tabs vs spaces * Tabs vs Spaces * Add templates to API & start adding tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix integration tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove unused User Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move template tests to existing repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor re-check updates and cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test cleanup Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix optionalbool Signed-off-by: jolheiser <john.olheiser@gmail.com> * make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Test fixes and icon change Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add new user and repo for tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests (finally) Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update meta repo with env variables Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move generation to create page Combine with repo create template Modify API search to prioritize owner for repo Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests and coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger and JS lint Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix API searching for own private repos Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change wording Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix repo search test. User had a private repo that didn't show up Signed-off-by: jolheiser <john.olheiser@gmail.com> * Another search test fix Signed-off-by: jolheiser <john.olheiser@gmail.com> * Clarify git content Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Feedback updates Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add topics WIP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Finish adding topics Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update locale Signed-off-by: jolheiser <john.olheiser@gmail.com>
6 years ago
Squashed commit of the following: commit 0afcb843d7ffd596991c4885cab768273a6eb42c Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 17:13:29 2016 -0600 Removed Upload stats as the upload table is just a temporary table commit 7ecd73ff5535612d79d471409173ee7f1fcfa157 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:42:41 2016 -0600 Fix for CodeMirror mode commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:03:33 2016 -0600 Made tabbing in editor use spaces commit 23af384c53206a8a40e11e45bf49d7a149c4adcd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:56:46 2016 -0600 Fix for data-url commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9 Merge: 7fc8a89 991ce42 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:42:53 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit 7fc8a89cb495478225b02d613e647f99a1489634 Merge: fd3d86c c03d040 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:40:00 2016 -0600 Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:39:44 2016 -0600 Code cleanup commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 29 15:38:23 2016 -0600 Code cleanup commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:36:01 2016 -0600 Code cleanup and fixes commit c2895dc742f25f8412879c9fa15e18f27f42f194 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:24:04 2016 -0600 Fixes per Unknwon's requests commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef Merge: 889e9fa ad7ea88 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 17:13:43 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go modules/setting/setting.go commit 889e9faf1bd8559a4979c8f46005d488c1a234d4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:09:18 2016 -0600 Fix in gogs.js commit 47603edf223f147b114be65f3bd27bc1e88827a5 Merge: bb57912 cf85e9e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:07:36 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit bb5791255867a71c11a77b639db050ad09c597a4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:02:18 2016 -0600 Update for using CodeMirror mode addon commit d10d128c51039be19e2af9c66c63db66a9f2ec6d Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 16:12:57 2016 -0600 Update for Edit commit 34a34982025144e3225e389f7849eb6273c1d576 Merge: fa1b752 1c7dcdd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 11:52:02 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go commit fa1b752be29cd455c5184ddac2ffe80b3489763e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 15 18:35:42 2016 -0600 Feature for editing, creating, uploading and deleting files
9 years ago
3 years ago
3 years ago
Squashed commit of the following: commit 0afcb843d7ffd596991c4885cab768273a6eb42c Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 17:13:29 2016 -0600 Removed Upload stats as the upload table is just a temporary table commit 7ecd73ff5535612d79d471409173ee7f1fcfa157 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:42:41 2016 -0600 Fix for CodeMirror mode commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:03:33 2016 -0600 Made tabbing in editor use spaces commit 23af384c53206a8a40e11e45bf49d7a149c4adcd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:56:46 2016 -0600 Fix for data-url commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9 Merge: 7fc8a89 991ce42 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:42:53 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit 7fc8a89cb495478225b02d613e647f99a1489634 Merge: fd3d86c c03d040 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:40:00 2016 -0600 Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:39:44 2016 -0600 Code cleanup commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 29 15:38:23 2016 -0600 Code cleanup commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:36:01 2016 -0600 Code cleanup and fixes commit c2895dc742f25f8412879c9fa15e18f27f42f194 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:24:04 2016 -0600 Fixes per Unknwon's requests commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef Merge: 889e9fa ad7ea88 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 17:13:43 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go modules/setting/setting.go commit 889e9faf1bd8559a4979c8f46005d488c1a234d4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:09:18 2016 -0600 Fix in gogs.js commit 47603edf223f147b114be65f3bd27bc1e88827a5 Merge: bb57912 cf85e9e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:07:36 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit bb5791255867a71c11a77b639db050ad09c597a4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:02:18 2016 -0600 Update for using CodeMirror mode addon commit d10d128c51039be19e2af9c66c63db66a9f2ec6d Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 16:12:57 2016 -0600 Update for Edit commit 34a34982025144e3225e389f7849eb6273c1d576 Merge: fa1b752 1c7dcdd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 11:52:02 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go commit fa1b752be29cd455c5184ddac2ffe80b3489763e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 15 18:35:42 2016 -0600 Feature for editing, creating, uploading and deleting files
9 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. {{template "base/head" .}}
  2. <style>
  3. .repository.file.list #repo-desc {
  4. font-size: 1.0em;
  5. margin-bottom: 1.0rem;
  6. }
  7. #contributorInfo>a:nth-child(n+26) {
  8. display: none;
  9. }
  10. #contributorInfo>a {
  11. width: 2.0em;
  12. float: left;
  13. margin: .25em;
  14. }
  15. .edit-link {
  16. vertical-align: top;
  17. display: inline-block;
  18. overflow: hidden;
  19. word-break: keep-all;
  20. white-space: nowrap;
  21. text-overflow: ellipsis;
  22. width: 16.5em;
  23. }
  24. #contributorInfo>a.circular {
  25. height: 2.0em;
  26. padding: 0;
  27. overflow: hidden;
  28. letter-spacing: 1.0em;
  29. text-indent: 0.6em;
  30. line-height: 2.0em;
  31. text-transform: capitalize;
  32. color: #FFF;
  33. }
  34. #contributorInfo>a.circular:nth-child(9n+1) {
  35. background-color: #4ccdec;
  36. }
  37. #contributorInfo>a.circular:nth-child(9n+2) {
  38. background-color: #e0b265;
  39. }
  40. #contributorInfo>a.circular:nth-child(9n+3) {
  41. background-color: #d884b7;
  42. }
  43. #contributorInfo>a.circular:nth-child(9n+4) {
  44. background-color: #8c6bdc;
  45. }
  46. #contributorInfo>a.circular:nth-child(9n+5) {
  47. background-color: #3cb99f;
  48. }
  49. #contributorInfo>a.circular:nth-child(9n+6) {
  50. background-color: #6995b9;
  51. }
  52. #contributorInfo>a.circular:nth-child(9n+7) {
  53. background-color: #ab91a7;
  54. }
  55. #contributorInfo>a.circular:nth-child(9n+8) {
  56. background-color: #bfd0aa;
  57. }
  58. .vue_menu {
  59. cursor: auto;
  60. position: absolute;
  61. outline: none;
  62. top: 100%;
  63. margin: 0em;
  64. padding: 0em 0em;
  65. background: #fff;
  66. font-size: 1em;
  67. text-shadow: none;
  68. text-align: left;
  69. /* -webkit-box-shadow: 0px 2px 3px 0px rgb(34 36 38 / 15%); */
  70. box-shadow: 0px 2px 3px 0px rgba(34, 36, 38, 0.15);
  71. border: 1px solid rgba(34, 36, 38, 0.15);
  72. border-radius: 0.28571429rem;
  73. -webkit-transition: opacity 0.1s ease;
  74. transition: opacity 0.1s ease;
  75. z-index: 11;
  76. will-change: transform, opacity;
  77. width: 100% !important;
  78. -webkit-animation-iteration-count: 1;
  79. animation-iteration-count: 1;
  80. -webkit-animation-duration: 300ms;
  81. animation-duration: 300ms;
  82. -webkit-animation-timing-function: ease;
  83. animation-timing-function: ease;
  84. -webkit-animation-fill-mode: both;
  85. animation-fill-mode: both;
  86. }
  87. </style>
  88. {{if and (.IsViewFile) (IpynbBool .TreePath)}}
  89. <link rel="stylesheet" href="{{StaticUrlPrefix}}/css/vp-notebook-debug.css?v={{MD5 AppVer}}" />
  90. {{end}}
  91. <div class="repository file list">
  92. {{template "repo/header" .}}
  93. <div class="ui container">
  94. <div class="ui negative message" style="display: none;">
  95. </div>
  96. {{template "base/alert" .}}
  97. {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
  98. <!-- <div class="ui repo-topic-edit grid form segment error" id="topic_edit" style="display:none">
  99. <div class="fourteen wide column">
  100. <div class="field">
  101. <div class="ui fluid multiple search selection dropdown">
  102. <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if lt (Add $i 1) (len $.Topics)}},{{end}}{{end}}">
  103. {{range .Topics}}
  104. <div class="ui small label topic transition visible" data-value="{{.Name}}" style="display: inline-block !important; cursor: default;">{{.Name}}<i class="delete icon"></i></div>
  105. {{end}}
  106. <div class="text"></div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="two wide column">
  111. <a class="ui button primary" href="javascript:;" id="save_topic"
  112. data-link="{{.RepoLink}}/topics">{{.i18n.Tr "repo.topic.done"}}</a>
  113. </div>
  114. </div> -->
  115. {{end}}
  116. <div class="hide" id="validate_prompt">
  117. <span id="count_prompt">{{.i18n.Tr "repo.topic.count_prompt"}}</span>
  118. <span id="format_prompt">{{.i18n.Tr "repo.topic.format_prompt"}}</span>
  119. </div>
  120. <div class="ui repo-description stackable grid">
  121. {{if .RepoSearchEnabled}}
  122. <div class="ui repo-search four wide column">
  123. <form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
  124. <div class="field">
  125. <div class="ui action input">
  126. <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
  127. <button class="ui icon button" type="submit">
  128. <i class="search icon"></i>
  129. </button>
  130. </div>
  131. </div>
  132. </form>
  133. </div>
  134. {{end}}
  135. </div>
  136. {{if .Repository.IsArchived}}
  137. <div class="ui warning message">
  138. {{.i18n.Tr "repo.archive.title"}}
  139. </div>
  140. {{end}}
  141. {{if not .IsViewFile}}
  142. {{template "repo/sub_menu" .}}
  143. {{end}}
  144. <div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
  145. {{template "repo/branch_dropdown" .}}
  146. {{ $n := len .TreeNames}}
  147. {{ $l := Subtract $n 1}}
  148. <!-- If home page, show new PR. If not, show breadcrumb -->
  149. {{if eq $n 0}}
  150. {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
  151. <div class="fitted item">
  152. <a
  153. href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.BranchName | EscapePound}}">
  154. <button id="new-pull-request"
  155. class="ui compact basic button">{{if .PullRequestCtx.Allowed}}{{.i18n.Tr "repo.pulls.compare_changes"}}{{else}}{{.i18n.Tr "action.compare_branch"}}{{end}}</button>
  156. </a>
  157. {{if and .Repository.IsFork .PullRequestCtx.Allowed}}
  158. {{if gt .FetchUpstreamCnt 0 }}
  159. <a
  160. href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{if .UpstreamSameBranchName}}{{.BranchName | EscapePound}}{{else}}{{.BaseRepo.DefaultBranch | EscapePound}}{{end}}">
  161. <button id="new-pull-request" class="ui compact basic button"
  162. title="{{$.i18n.Tr (TrN $.i18n.Lang .FetchUpstreamCnt "repo.pulls.commits_count_1" "repo.pulls.commits_count_n") .FetchUpstreamCnt}}">{{.i18n.Tr "repo.pulls.fetch_upstream"}}</button>
  163. </a>
  164. {{else if lt .FetchUpstreamCnt 0}}
  165. <a
  166. href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{.BaseRepo.DefaultBranch | EscapePound}}">
  167. <button id="new-pull-request" class="ui compact basic button"
  168. title="{{.i18n.Tr "repo.pulls.upstream_error"}}">{{.i18n.Tr "repo.pulls.fetch_upstream"}}</button>
  169. </a>
  170. {{else}}
  171. <a
  172. href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{if .UpstreamSameBranchName}}{{.BranchName | EscapePound}}{{else}}{{.BaseRepo.DefaultBranch | EscapePound}}{{end}}">
  173. <button id="new-pull-request" class="ui compact basic button"
  174. title="{{.i18n.Tr "repo.pulls.upstream_up_to_date"}}">{{.i18n.Tr "repo.pulls.fetch_upstream"}}</button>
  175. </a>
  176. {{end}}
  177. {{end}}
  178. </div>
  179. {{end}}
  180. {{else}}
  181. <div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section"
  182. href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}"
  183. title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span
  184. class="divider">/</span>{{if eq $i $l}}<span class="active section"
  185. title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span
  186. class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}"
  187. title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
  188. {{end}}
  189. <div class="right fitted item" id="file-buttons">
  190. <div class="ui tiny blue buttons">
  191. {{if .Repository.CanEnableEditor}}
  192. {{if .CanAddFile}}
  193. <a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"
  194. class="ui button">
  195. {{.i18n.Tr "repo.editor.new_file"}}
  196. </a>
  197. {{end}}
  198. {{if .CanUploadFile}}
  199. <a href="{{.RepoLink}}/_upload/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"
  200. class="ui button">
  201. {{.i18n.Tr "repo.editor.upload_file"}}
  202. </a>
  203. {{end}}
  204. {{end}}
  205. {{if and (ne $n 0) (not .IsViewFile) (not .IsBlame) }}
  206. <a href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}"
  207. class="ui button">
  208. {{.i18n.Tr "repo.file_history"}}
  209. </a>
  210. {{end}}
  211. </div>
  212. </div>
  213. <div class="fitted item">
  214. {{if eq $n 0}}
  215. {{if .Repository.IsTemplate}}
  216. <div class="ui tiny blue buttons">
  217. <a href="{{AppSubUrl}}/repo/create?template_id={{.Repository.ID}}" class="ui button">
  218. {{.i18n.Tr "repo.use_template"}}
  219. </a>
  220. </div>
  221. {{end}}
  222. {{end}}
  223. </div>
  224. <div class="fitted item">
  225. <!-- Only show clone panel in repository home page -->
  226. {{if eq $n 0}}
  227. <div class="ui action tiny input" id="clone-panel">
  228. {{if not $.DisableHTTP}}
  229. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
  230. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  231. </button>
  232. {{end}}
  233. {{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  234. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
  235. SSH
  236. </button>
  237. {{end}}
  238. {{if not $.DisableHTTP}}
  239. <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
  240. {{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  241. <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
  242. {{end}}
  243. {{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
  244. <button class="ui basic icon button poping up clipboard" id="clipboard-btn"
  245. data-original="{{.i18n.Tr "repo.copy_link"}}"
  246. data-success="{{.i18n.Tr "repo.copy_link_success"}}"
  247. data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}"
  248. data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
  249. {{svg "octicon-clippy" 16}}
  250. </button>
  251. {{end}}
  252. <div class="ui basic jump dropdown icon button poping up"
  253. data-content="{{.i18n.Tr "repo.download_archive"}}" data-variation="tiny inverted"
  254. data-position="top right">
  255. <i class="download icon"></i>
  256. <div class="menu">
  257. <a class="item"
  258. href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip" 16}}&nbsp;ZIP</a>
  259. <a class="item"
  260. href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip" 16}}&nbsp;TAR.GZ</a>
  261. </div>
  262. </div>
  263. </div>
  264. {{end}}
  265. </div>
  266. {{if and (.IsViewFile) (IpynbBool .TreePath)}}
  267. <div class="right fitted item">
  268. <button class="ui green button tiny" id="notebook-debug" style="display: flex;align-items: center;">
  269. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm8 10h6v2h-6v-2zm-3.333-3L5.838 9.172l1.415-1.415L11.495 12l-4.242 4.243-1.415-1.415L8.667 12z" fill="rgba(255,255,255,1)"/></svg>
  270. <span style="margin-left:0.3rem;font-size: 14px;">{{.i18n.Tr "repo.notebook_open"}}</span>
  271. </button>
  272. </div>
  273. {{end}}
  274. </div>
  275. <div class="ui container">
  276. <div class="ui mobile reversed stackable grid">
  277. {{if not .IsViewFile}}
  278. <div class="ui ten wide tablet twelve wide computer column">
  279. {{else}}
  280. <div class="ui sixteen wide tablet sixteen wide computer column">
  281. {{end}}
  282. {{if .IsViewFile}}
  283. {{template "repo/view_file" .}}
  284. {{else if .IsBlame}}
  285. {{template "repo/blame" .}}
  286. {{else}}
  287. {{template "repo/view_list" .}}
  288. {{end}}
  289. </div>
  290. {{if not .IsViewFile}}
  291. <div class="ui six wide tablet four wide computer column">
  292. <div id="repo-desc" data-IsAdmin="{{.Permission.IsAdmin}}"
  293. data-IsArchived="{{.Repository.IsArchived}}">
  294. <h4 id="about-desc" class="ui header">简介</h4>
  295. <input type="hidden" id="edit-alias" value="{{.Repository.Alias}}">
  296. <p>
  297. {{if .Repository.DescriptionHTML}}
  298. <span class="description"
  299. style="word-break:break-all">{{.Repository.DescriptionHTML}}</span>
  300. {{else}}
  301. <span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>
  302. {{end}}
  303. </p>
  304. </div>
  305. {{if .Repository.Website}}
  306. <p class="ui">
  307. <i class="gray linkify icon"></i>
  308. <a class="link edit-link" target="_blank" title="{{.Repository.Website}}"
  309. href="{{.Repository.Website}}">{{.Repository.Website}}</a>
  310. </p>
  311. {{end}}
  312. <div class="ui" id="repo-topics" style="display: flex;position: relative;margin-bottom: 1.0rem;">
  313. <i class="grey bookmark icon"></i>
  314. <div id="repo-topics1" style="flex: 1;">
  315. {{range .Topics}}
  316. <a class="ui repo-topic small label topic"
  317. href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=">{{.Name}}</a>
  318. {{end}}
  319. </div>
  320. <div>
  321. {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<i id="manage_topic"
  322. style="cursor: pointer;" class="plus icon"></i>{{end}}
  323. </div>
  324. <div id="topic_edit" class="vue_menu" style="display:none">
  325. <div id="topic_edit1">
  326. </div>
  327. </div>
  328. </div>
  329. <p class="ui">
  330. <i class="grey code icon"></i>
  331. {{range .LanguageStats}}
  332. {{.Language}}
  333. {{end}}
  334. </p>
  335. {{if .LICENSE}}
  336. <p class="ui">
  337. <i class="grey clone icon"></i>
  338. {{.LICENSE}}
  339. </p>
  340. {{end}}
  341. <div class="ui divider"></div>
  342. <div>
  343. <h4 class="ui header">
  344. {{$lenCon := len .ContributorInfo}}
  345. {{if lt $lenCon 25 }}
  346. <strong>贡献者 ({{len .ContributorInfo}})</strong>
  347. {{else}}
  348. <strong>贡献者 ({{len .ContributorInfo}}+)</strong>
  349. {{end}}
  350. <div class="ui right">
  351. <!-- <a class="membersmore text grey" href="{{.RepoLink}}/contributors">全部 {{svg "octicon-chevron-right" 16}}</a> -->
  352. <a class="membersmore text grey"
  353. href="{{.RepoLink}}/contributors?type={{if .IsViewBranch}}branch{{else}}tag{{end}}&name={{.BranchName}}">全部
  354. {{svg "octicon-chevron-right" 16}}</a>
  355. </div>
  356. </h4>
  357. <div class="ui members" id="contributorInfo">
  358. {{range .ContributorInfo}}
  359. {{if .UserInfo}}
  360. <a href="{{AppSubUrl}}/{{.UserInfo.Name}}"><img class="ui avatar image"
  361. src="{{.UserInfo.RelAvatarLink}}"></a>
  362. {{else if .Email}}
  363. <a href="mailto:{{.Email}}" class="circular ui button">{{.Email}}</a>
  364. {{end}}
  365. {{end}}
  366. </div>
  367. </div>
  368. </div>
  369. {{end}}
  370. </div>
  371. </div>
  372. </div>
  373. {{if and (.IsViewFile) (IpynbBool .TreePath)}}
  374. <div id="__vue-root"></div>
  375. <div id="__vue-self-data" data-branch="{{.BranchName}}" data-owner="{{.Repository.OwnerName}}" data-name="{{.SignedUser.Name}}" data-project="{{.Repository.Name}}"
  376. data-file="{{.TreePath}}">
  377. </div>
  378. {{end}}
  379. </div>
  380. {{if and (.IsViewFile) (IpynbBool .TreePath)}}
  381. <script src="{{StaticUrlPrefix}}/js/vp-notebook-debug.js?v={{MD5 AppVer}}"></script>
  382. {{end}}
  383. {{template "base/footer" .}}