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

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
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
Add Octicon SVG spritemap (#10107) * Add octicon SVG sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Static prefix Signed-off-by: jolheiser <john.olheiser@gmail.com> * SVG for all repo icons Signed-off-by: jolheiser <john.olheiser@gmail.com> * make vendor Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap out octicons Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move octicons to top of less imports Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Definitely not a search/replace Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed regex Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move to more generic calls and webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * make svg -> make webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg-sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed a test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg from makefile Signed-off-by: jolheiser <john.olheiser@gmail.com> * Suggestions Signed-off-by: jolheiser <john.olheiser@gmail.com> * Attempt to fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert timetracking test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap .octicon for .svg in less Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add aria-hidden Signed-off-by: jolheiser <john.olheiser@gmail.com> * Replace mega-octicon Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix webpack globbing on Windows Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert Co-Authored-By: silverwind <me@silverwind.io> * Fix octions from upstream Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix Vue and missed JS function Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add JS helper and PWA Signed-off-by: jolheiser <john.olheiser@gmail.com> * Preload SVG Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <matti@mdranta.net>
5 years ago
Add Octicon SVG spritemap (#10107) * Add octicon SVG sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Static prefix Signed-off-by: jolheiser <john.olheiser@gmail.com> * SVG for all repo icons Signed-off-by: jolheiser <john.olheiser@gmail.com> * make vendor Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap out octicons Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move octicons to top of less imports Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Definitely not a search/replace Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed regex Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move to more generic calls and webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * make svg -> make webpack Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg-sprite Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Missed a test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Remove svg from makefile Signed-off-by: jolheiser <john.olheiser@gmail.com> * Suggestions Signed-off-by: jolheiser <john.olheiser@gmail.com> * Attempt to fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert timetracking test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Swap .octicon for .svg in less Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add aria-hidden Signed-off-by: jolheiser <john.olheiser@gmail.com> * Replace mega-octicon Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix webpack globbing on Windows Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert Co-Authored-By: silverwind <me@silverwind.io> * Fix octions from upstream Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix Vue and missed JS function Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add JS helper and PWA Signed-off-by: jolheiser <john.olheiser@gmail.com> * Preload SVG Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <matti@mdranta.net>
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
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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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+25){
  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. {{template "base/alert" .}}
  92. {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
  93. <!-- <div class="ui repo-topic-edit grid form segment error" id="topic_edit" style="display:none">
  94. <div class="fourteen wide column">
  95. <div class="field">
  96. <div class="ui fluid multiple search selection dropdown">
  97. <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if lt (Add $i 1) (len $.Topics)}},{{end}}{{end}}">
  98. {{range .Topics}}
  99. <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>
  100. {{end}}
  101. <div class="text"></div>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="two wide column">
  106. <a class="ui button primary" href="javascript:;" id="save_topic"
  107. data-link="{{.RepoLink}}/topics">{{.i18n.Tr "repo.topic.done"}}</a>
  108. </div>
  109. </div> -->
  110. {{end}}
  111. <div class="hide" id="validate_prompt">
  112. <span id="count_prompt">{{.i18n.Tr "repo.topic.count_prompt"}}</span>
  113. <span id="format_prompt">{{.i18n.Tr "repo.topic.format_prompt"}}</span>
  114. </div>
  115. <div class="ui repo-description stackable grid">
  116. {{if .RepoSearchEnabled}}
  117. <div class="ui repo-search four wide column">
  118. <form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
  119. <div class="field">
  120. <div class="ui action input">
  121. <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
  122. <button class="ui icon button" type="submit">
  123. <i class="search icon"></i>
  124. </button>
  125. </div>
  126. </div>
  127. </form>
  128. </div>
  129. {{end}}
  130. </div>
  131. {{if .Repository.IsArchived}}
  132. <div class="ui warning message">
  133. {{.i18n.Tr "repo.archive.title"}}
  134. </div>
  135. {{end}}
  136. {{template "repo/sub_menu" .}}
  137. <div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
  138. {{template "repo/branch_dropdown" .}}
  139. {{ $n := len .TreeNames}}
  140. {{ $l := Subtract $n 1}}
  141. <!-- If home page, show new PR. If not, show breadcrumb -->
  142. {{if eq $n 0}}
  143. {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
  144. <div class="fitted item">
  145. <a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{if ne .Repository.Owner.Name .BaseRepo.Owner.Name}}{{.Repository.Owner.Name}}:{{end}}{{.BranchName | EscapePound}}">
  146. <button id="new-pull-request" class="ui compact basic button">{{if .PullRequestCtx.Allowed}}{{.i18n.Tr "repo.pulls.compare_changes"}}{{else}}{{.i18n.Tr "action.compare_branch"}}{{end}}</button>
  147. </a>
  148. {{if and .Repository.IsFork .PullRequestCtx.Allowed}}
  149. {{if gt .FetchUpstreamCnt 0 }}
  150. <a href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{.BaseRepo.DefaultBranch | EscapePound}}">
  151. <button id="new-pull-request" class="ui compact basic button" 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>
  152. </a>
  153. {{else if lt .FetchUpstreamCnt 0}}
  154. <a href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{.BaseRepo.DefaultBranch | EscapePound}}">
  155. <button id="new-pull-request" class="ui compact basic button" title="{{.i18n.Tr "repo.pulls.upstream_error"}}">{{.i18n.Tr "repo.pulls.fetch_upstream"}}</button>
  156. </a>
  157. {{else}}
  158. <a href="{{.Repository.Link}}/compare/{{.BranchName | EscapePound}}...{{.BaseRepo.Owner.Name}}:{{.BaseRepo.DefaultBranch | EscapePound}}">
  159. <button id="new-pull-request" class="ui compact basic button" title="{{.i18n.Tr "repo.pulls.upstream_up_to_date"}}">{{.i18n.Tr "repo.pulls.fetch_upstream"}}</button>
  160. </a>
  161. {{end}}
  162. {{end}}
  163. </div>
  164. {{end}}
  165. {{else}}
  166. <div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
  167. {{end}}
  168. <div class="right fitted item" id="file-buttons">
  169. <div class="ui tiny blue buttons">
  170. {{if .Repository.CanEnableEditor}}
  171. {{if .CanAddFile}}
  172. <a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button">
  173. {{.i18n.Tr "repo.editor.new_file"}}
  174. </a>
  175. {{end}}
  176. {{if .CanUploadFile}}
  177. <a href="{{.RepoLink}}/_upload/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button">
  178. {{.i18n.Tr "repo.editor.upload_file"}}
  179. </a>
  180. {{end}}
  181. {{end}}
  182. {{if and (ne $n 0) (not .IsViewFile) (not .IsBlame) }}
  183. <a href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}" class="ui button">
  184. {{.i18n.Tr "repo.file_history"}}
  185. </a>
  186. {{end}}
  187. </div>
  188. </div>
  189. <div class="fitted item">
  190. {{if eq $n 0}}
  191. {{if .Repository.IsTemplate}}
  192. <div class="ui tiny blue buttons">
  193. <a href="{{AppSubUrl}}/repo/create?template_id={{.Repository.ID}}" class="ui button">
  194. {{.i18n.Tr "repo.use_template"}}
  195. </a>
  196. </div>
  197. {{end}}
  198. {{end}}
  199. </div>
  200. <div class="fitted item">
  201. <!-- Only show clone panel in repository home page -->
  202. {{if eq $n 0}}
  203. <div class="ui action tiny input" id="clone-panel">
  204. {{if not $.DisableHTTP}}
  205. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
  206. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  207. </button>
  208. {{end}}
  209. {{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  210. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
  211. SSH
  212. </button>
  213. {{end}}
  214. {{if not $.DisableHTTP}}
  215. <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
  216. {{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  217. <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
  218. {{end}}
  219. {{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
  220. <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">
  221. {{svg "octicon-clippy" 16}}
  222. </button>
  223. {{end}}
  224. <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">
  225. <i class="download icon"></i>
  226. <div class="menu">
  227. <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip">{{svg "octicon-file-zip" 16}}&nbsp;ZIP</a>
  228. <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz">{{svg "octicon-file-zip" 16}}&nbsp;TAR.GZ</a>
  229. </div>
  230. </div>
  231. </div>
  232. {{end}}
  233. </div>
  234. </div>
  235. <div class="ui container">
  236. <div class="ui mobile reversed stackable grid">
  237. <div class="ui ten wide tablet twelve wide computer column">
  238. {{if .IsViewFile}}
  239. {{template "repo/view_file" .}}
  240. {{else if .IsBlame}}
  241. {{template "repo/blame" .}}
  242. {{else}}
  243. {{template "repo/view_list" .}}
  244. {{end}}
  245. </div>
  246. <div class="ui six wide tablet four wide computer column">
  247. <div id="repo-desc">
  248. <h4 id="about-desc" class="ui header">简介
  249. <!-- <a class="edit-icon" href="javascript:void(0)">
  250. <i class="gray edit outline icon"></i>
  251. </a> -->
  252. </h4>
  253. <p>
  254. {{if .Repository.DescriptionHTML}}
  255. <span class="description" style="word-break:break-all">{{.Repository.DescriptionHTML}}</span>
  256. {{else}}
  257. <span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>
  258. {{end}}
  259. </p>
  260. </div>
  261. {{if .Repository.Website}}
  262. <p class="ui">
  263. <i class="gray linkify icon"></i>
  264. <a class="link edit-link" target="_blank" title="{{.Repository.Website}}" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
  265. </p>
  266. {{end}}
  267. <div class="ui" id="repo-topics" style="display: flex;position: relative;margin-bottom: 1.0rem;">
  268. <i class="grey bookmark icon"></i>
  269. <div id="repo-topics1" style="flex: 1;">
  270. <!-- {{if not .Topics}}
  271. <span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>
  272. {{end}} -->
  273. {{range .Topics}}
  274. <a class="ui repo-topic small label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>
  275. {{end}}
  276. </div>
  277. <div>
  278. {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<i id="manage_topic" style="cursor: pointer;" class="plus icon"></i>{{end}}
  279. </div>
  280. <div id="topic_edit" class="vue_menu" style="display:none">
  281. <div id="topic_edit1">
  282. </div>
  283. </div>
  284. </div>
  285. <p class="ui">
  286. <i class="grey code icon"></i>
  287. {{range .LanguageStats}}
  288. {{.Language}}
  289. {{end}}
  290. </p>
  291. {{if .LICENSE}}
  292. <p class="ui">
  293. <i class="grey clone icon"></i>
  294. {{.LICENSE}}
  295. </p>
  296. {{end}}
  297. <div class="ui divider"></div>
  298. <div>
  299. <h4 class="ui header">
  300. <strong>贡献者 ({{len .ContributorInfo}})</strong>
  301. <div class="ui right">
  302. <a class="membersmore text grey" href="javascript:;">全部 {{svg "octicon-chevron-right" 16}}</a>
  303. </div>
  304. </h4>
  305. <div class="ui members" id="contributorInfo">
  306. {{range .ContributorInfo}}
  307. {{if .UserInfo}}
  308. <a href="{{AppSubUrl}}/{{.UserInfo.Name}}"><img class="ui avatar image" src="{{.UserInfo.RelAvatarLink}}"></a>
  309. {{else if .Email}}
  310. <a href="mailto:{{.Email}}" class="circular ui button">{{.Email}}</a>
  311. {{end}}
  312. {{end}}
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. <script type="text/javascript">
  321. $(document).ready(function(){
  322. $(".membersmore").click(function(){
  323. $("#contributorInfo > a:nth-child(n+25)").show();
  324. });
  325. });
  326. </script>
  327. {{template "base/footer" .}}