本站源代码
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

85 lines
3.2KB

  1. {{template "base/head" .}}
  2. <div class="repository diff {{if .PageIsComparePull}}compare pull{{end}}">
  3. {{template "repo/header" .}}
  4. <div class="ui container {{if .IsSplitStyle}}fluid padded{{end}}">
  5. {{if .PageIsComparePull}}
  6. <h2 class="ui header">
  7. {{if not .Repository.IsArchived}}
  8. {{.i18n.Tr "repo.pulls.compare_changes"}}
  9. <div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
  10. {{ else }}
  11. {{.i18n.Tr "action.compare_commits_general"}}
  12. {{ end }}
  13. </h2>
  14. <div class="ui segment choose branch">
  15. <span class="octicon octicon-git-compare"></span>
  16. <div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
  17. <div class="ui basic small button">
  18. <span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseName}}:{{$.BaseBranch}}</span>
  19. <i class="dropdown icon"></i>
  20. </div>
  21. <div class="menu">
  22. <div class="ui icon search input">
  23. <i class="filter icon"></i>
  24. <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
  25. </div>
  26. <div class="scrolling menu">
  27. {{range .Branches}}
  28. <div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{EscapePound .}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{EscapePound $.HeadBranch}}">{{$.BaseName}}:{{.}}</div>
  29. {{end}}
  30. </div>
  31. </div>
  32. </div>
  33. ...
  34. <div class="ui floating filter dropdown">
  35. <div class="ui basic small button">
  36. <span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadUser.Name}}:{{$.HeadBranch}}</span>
  37. <i class="dropdown icon"></i>
  38. </div>
  39. <div class="menu">
  40. <div class="ui icon search input">
  41. <i class="filter icon"></i>
  42. <input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
  43. </div>
  44. <div class="scrolling menu">
  45. {{range .HeadBranches}}
  46. <div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{EscapePound $.BaseBranch}}...{{if not $.PullRequestCtx.SameRepo}}{{$.HeadUser.Name}}:{{end}}{{EscapePound .}}">{{$.HeadUser.Name}}:{{.}}</div>
  47. {{end}}
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. {{end}}
  53. {{if .IsNothingToCompare}}
  54. <div class="ui segment">{{.i18n.Tr "repo.pulls.nothing_to_compare"}}</div>
  55. {{else if .PageIsComparePull}}
  56. {{if .HasPullRequest}}
  57. <div class="ui segment">
  58. {{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
  59. </div>
  60. {{else}}
  61. {{if not .Repository.IsArchived}}
  62. <div class="ui info message show-form-container">
  63. <button class="ui button green show-form">{{.i18n.Tr "repo.pulls.new"}}</button>
  64. </div>
  65. {{ else }}
  66. <div class="ui warning message">
  67. {{.i18n.Tr "repo.archive.title"}}
  68. </div>
  69. {{ end }}
  70. <div class="pullrequest-form" style="display: none">
  71. {{template "repo/issue/new_form" .}}
  72. </div>
  73. {{template "repo/commits_table" .}}
  74. {{template "repo/diff/box" .}}
  75. {{end}}
  76. {{else}}
  77. {{template "repo/commits_table" .}}
  78. {{template "repo/diff/box" .}}
  79. {{end}}
  80. </div>
  81. </div>
  82. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1