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 14 kB

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
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>
5 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>
5 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
8 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
8 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
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
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. <div class="repository file list">
  89. {{template "repo/header" .}}
  90. <div class="ui container">
  91. <div class="ui negative message" style="display: none;">
  92. </div>
  93. {{template "base/alert" .}}
  94. {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
  95. <!-- <div class="ui repo-topic-edit grid form segment error" id="topic_edit" style="display:none">
  96. <div class="fourteen wide column">
  97. <div class="field">
  98. <div class="ui fluid multiple search selection dropdown">
  99. <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if lt (Add $i 1) (len $.Topics)}},{{end}}{{end}}">
  100. {{range .Topics}}
  101. <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>
  102. {{end}}
  103. <div class="text"></div>
  104. </div>
  105. </div>
  106. </div>
  107. <div class="two wide column">
  108. <a class="ui button primary" href="javascript:;" id="save_topic"
  109. data-link="{{.RepoLink}}/topics">{{.i18n.Tr "repo.topic.done"}}</a>
  110. </div>
  111. </div> -->
  112. {{end}}
  113. <div class="hide" id="validate_prompt">
  114. <span id="count_prompt">{{.i18n.Tr "repo.topic.count_prompt"}}</span>
  115. <span id="format_prompt">{{.i18n.Tr "repo.topic.format_prompt"}}</span>
  116. </div>
  117. <div class="ui repo-description stackable grid">
  118. {{if .RepoSearchEnabled}}
  119. <div class="ui repo-search four wide column">
  120. <form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
  121. <div class="field">
  122. <div class="ui action input">
  123. <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
  124. <button class="ui icon button" type="submit">
  125. <i class="search icon"></i>
  126. </button>
  127. </div>
  128. </div>
  129. </form>
  130. </div>
  131. {{end}}
  132. </div>
  133. {{if .Repository.IsArchived}}
  134. <div class="ui warning message">
  135. {{.i18n.Tr "repo.archive.title"}}
  136. </div>
  137. {{end}}
  138. {{template "repo/sub_menu" .}}
  139. <div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
  140. {{template "repo/branch_dropdown" .}}
  141. {{ $n := len .TreeNames}}
  142. {{ $l := Subtract $n 1}}
  143. <!-- If home page, show new PR. If not, show breadcrumb -->
  144. {{if eq $n 0}}
  145. {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
  146. <div class="fitted item">
  147. <a
  148. href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.BranchName | EscapePound}}">
  149. <button id="new-pull-request"
  150. class="ui compact basic button">{{if .PullRequestCtx.Allowed}}{{.i18n.Tr "repo.pulls.compare_changes"}}{{else}}{{.i18n.Tr "action.compare_branch"}}{{end}}</button>
  151. </a>
  152. {{if and .Repository.IsFork .PullRequestCtx.Allowed}}
  153. {{if gt .FetchUpstreamCnt 0 }}
  154. <a
  155. href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{if .UpstreamSameBranchName}}{{.BranchName | EscapePound}}{{else}}{{.BaseRepo.DefaultBranch | EscapePound}}{{end}}">
  156. <button id="new-pull-request" class="ui compact basic button"
  157. 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>
  158. </a>
  159. {{else if lt .FetchUpstreamCnt 0}}
  160. <a
  161. href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{.BaseRepo.DefaultBranch | EscapePound}}">
  162. <button id="new-pull-request" class="ui compact basic button"
  163. title="{{.i18n.Tr "repo.pulls.upstream_error"}}">{{.i18n.Tr "repo.pulls.fetch_upstream"}}</button>
  164. </a>
  165. {{else}}
  166. <a
  167. href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{if .UpstreamSameBranchName}}{{.BranchName | EscapePound}}{{else}}{{.BaseRepo.DefaultBranch | EscapePound}}{{end}}">
  168. <button id="new-pull-request" class="ui compact basic button"
  169. title="{{.i18n.Tr "repo.pulls.upstream_up_to_date"}}">{{.i18n.Tr "repo.pulls.fetch_upstream"}}</button>
  170. </a>
  171. {{end}}
  172. {{end}}
  173. </div>
  174. {{end}}
  175. {{else}}
  176. <div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section"
  177. href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}"
  178. title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span
  179. class="divider">/</span>{{if eq $i $l}}<span class="active section"
  180. title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span
  181. class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}"
  182. title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
  183. {{end}}
  184. <div class="right fitted item" id="file-buttons">
  185. <div class="ui tiny blue buttons">
  186. {{if .Repository.CanEnableEditor}}
  187. {{if .CanAddFile}}
  188. <a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"
  189. class="ui button">
  190. {{.i18n.Tr "repo.editor.new_file"}}
  191. </a>
  192. {{end}}
  193. {{if .CanUploadFile}}
  194. <a href="{{.RepoLink}}/_upload/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"
  195. class="ui button">
  196. {{.i18n.Tr "repo.editor.upload_file"}}
  197. </a>
  198. {{end}}
  199. {{end}}
  200. {{if and (ne $n 0) (not .IsViewFile) (not .IsBlame) }}
  201. <a href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}"
  202. class="ui button">
  203. {{.i18n.Tr "repo.file_history"}}
  204. </a>
  205. {{end}}
  206. </div>
  207. </div>
  208. <div class="fitted item">
  209. {{if eq $n 0}}
  210. {{if .Repository.IsTemplate}}
  211. <div class="ui tiny blue buttons">
  212. <a href="{{AppSubUrl}}/repo/create?template_id={{.Repository.ID}}" class="ui button">
  213. {{.i18n.Tr "repo.use_template"}}
  214. </a>
  215. </div>
  216. {{end}}
  217. {{end}}
  218. </div>
  219. <div class="fitted item">
  220. <!-- Only show clone panel in repository home page -->
  221. {{if eq $n 0}}
  222. <div class="ui action tiny input" id="clone-panel">
  223. {{if not $.DisableHTTP}}
  224. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
  225. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  226. </button>
  227. {{end}}
  228. {{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  229. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
  230. SSH
  231. </button>
  232. {{end}}
  233. {{if not $.DisableHTTP}}
  234. <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
  235. {{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  236. <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
  237. {{end}}
  238. {{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
  239. <button class="ui basic icon button poping up clipboard" id="clipboard-btn"
  240. data-original="{{.i18n.Tr "repo.copy_link"}}"
  241. data-success="{{.i18n.Tr "repo.copy_link_success"}}"
  242. data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}"
  243. data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
  244. {{svg "octicon-clippy" 16}}
  245. </button>
  246. {{end}}
  247. <div class="ui basic jump dropdown icon button poping up"
  248. data-content="{{.i18n.Tr "repo.download_archive"}}" data-variation="tiny inverted"
  249. data-position="top right">
  250. <i class="download icon"></i>
  251. <div class="menu">
  252. <a class="item"
  253. href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip" 16}}&nbsp;ZIP</a>
  254. <a class="item"
  255. href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip" 16}}&nbsp;TAR.GZ</a>
  256. </div>
  257. </div>
  258. </div>
  259. {{end}}
  260. </div>
  261. </div>
  262. <div class="ui container">
  263. <div class="ui mobile reversed stackable grid">
  264. <div class="ui ten wide tablet twelve wide computer column">
  265. {{if .IsViewFile}}
  266. {{template "repo/view_file" .}}
  267. {{else if .IsBlame}}
  268. {{template "repo/blame" .}}
  269. {{else}}
  270. {{template "repo/view_list" .}}
  271. {{end}}
  272. </div>
  273. <div class="ui six wide tablet four wide computer column">
  274. <div id="repo-desc" data-IsAdmin="{{.Permission.IsAdmin}}"
  275. data-IsArchived="{{.Repository.IsArchived}}">
  276. <h4 id="about-desc" class="ui header">简介</h4>
  277. <input type="hidden" id="edit-alias" value="{{.Repository.Alias}}">
  278. <p>
  279. {{if .Repository.DescriptionHTML}}
  280. <span class="description"
  281. style="word-break:break-all">{{.Repository.DescriptionHTML}}</span>
  282. {{else}}
  283. <span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>
  284. {{end}}
  285. </p>
  286. </div>
  287. {{if .Repository.Website}}
  288. <p class="ui">
  289. <i class="gray linkify icon"></i>
  290. <a class="link edit-link" target="_blank" title="{{.Repository.Website}}"
  291. href="{{.Repository.Website}}">{{.Repository.Website}}</a>
  292. </p>
  293. {{end}}
  294. <div class="ui" id="repo-topics" style="display: flex;position: relative;margin-bottom: 1.0rem;">
  295. <i class="grey bookmark icon"></i>
  296. <div id="repo-topics1" style="flex: 1;">
  297. {{range .Topics}}
  298. <a class="ui repo-topic small label topic"
  299. href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=">{{.Name}}</a>
  300. {{end}}
  301. </div>
  302. <div>
  303. {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<i id="manage_topic"
  304. style="cursor: pointer;" class="plus icon"></i>{{end}}
  305. </div>
  306. <div id="topic_edit" class="vue_menu" style="display:none">
  307. <div id="topic_edit1">
  308. </div>
  309. </div>
  310. </div>
  311. <p class="ui">
  312. <i class="grey code icon"></i>
  313. {{range .LanguageStats}}
  314. {{.Language}}
  315. {{end}}
  316. </p>
  317. {{if .LICENSE}}
  318. <p class="ui">
  319. <i class="grey clone icon"></i>
  320. {{.LICENSE}}
  321. </p>
  322. {{end}}
  323. <div class="ui divider"></div>
  324. <div>
  325. <h4 class="ui header">
  326. {{$lenCon := len .ContributorInfo}}
  327. {{if lt $lenCon 25 }}
  328. <strong>贡献者 ({{len .ContributorInfo}})</strong>
  329. {{else}}
  330. <strong>贡献者 ({{len .ContributorInfo}}+)</strong>
  331. {{end}}
  332. <div class="ui right">
  333. <!-- <a class="membersmore text grey" href="{{.RepoLink}}/contributors">全部 {{svg "octicon-chevron-right" 16}}</a> -->
  334. <a class="membersmore text grey"
  335. href="{{.RepoLink}}/contributors?type={{if .IsViewBranch}}branch{{else}}tag{{end}}&name={{.BranchName}}">全部
  336. {{svg "octicon-chevron-right" 16}}</a>
  337. </div>
  338. </h4>
  339. <div class="ui members" id="contributorInfo">
  340. {{range .ContributorInfo}}
  341. {{if .UserInfo}}
  342. <a href="{{AppSubUrl}}/{{.UserInfo.Name}}"><img class="ui avatar image"
  343. src="{{.UserInfo.RelAvatarLink}}"></a>
  344. {{else if .Email}}
  345. <a href="mailto:{{.Email}}" class="circular ui button">{{.Email}}</a>
  346. {{end}}
  347. {{end}}
  348. </div>
  349. </div>
  350. </div>
  351. </div>
  352. </div>
  353. </div>
  354. </div>
  355. <script type="text/javascript">
  356. // $(document).ready(function(){
  357. // $(".membersmore").click(function(){
  358. // $("#contributorInfo > a:nth-child(n+25)").show();
  359. // });
  360. // });
  361. </script>
  362. {{template "base/footer" .}}