gitea源码

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {{template "base/head" .}}
  2. <div role="main" aria-label="{{.Title}}" class="page-content repository issue-list">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. {{template "repo/code/recently_pushed_new_branches" dict "RecentBranchesPromptData" .RecentBranchesPromptData}}
  7. {{if .PinnedIssues}}
  8. <div id="issue-pins" {{if .IsRepoAdmin}}data-is-repo-admin{{end}}>
  9. {{range .PinnedIssues}}
  10. <div class="issue-card tw-break-anywhere {{if $.IsRepoAdmin}}tw-cursor-grab{{end}}" data-move-url="{{$.Link}}/move_pin" data-issue-id="{{.ID}}">
  11. {{template "repo/issue/card" (dict "Issue" . "Page" $ "isPinnedIssueCard" true)}}
  12. </div>
  13. {{end}}
  14. </div>
  15. {{end}}
  16. <div class="list-header flex-text-block">
  17. {{template "repo/issue/search" .}}
  18. <a class="ui small button" href="{{.RepoLink}}/labels">{{ctx.Locale.Tr "repo.labels"}}</a>
  19. <a class="ui small button" href="{{.RepoLink}}/milestones">{{ctx.Locale.Tr "repo.milestones"}}</a>
  20. {{if not .Repository.IsArchived}}
  21. {{if .PageIsIssueList}}
  22. <a class="ui small primary button issue-list-new" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
  23. {{else}}
  24. <a class="ui small primary button new-pr-button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.Repository.Link}}/compare/{{.Repository.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "repo.pulls.new"}}</a>
  25. {{end}}
  26. {{else}}
  27. {{if not .PageIsIssueList}}
  28. <a class="ui small primary small button issue-list-new{{if not .PullRequestCtx.Allowed}} disabled{{end}}" href="{{if .PullRequestCtx.Allowed}}{{.PullRequestCtx.BaseRepo.Link}}/compare/{{.PullRequestCtx.BaseRepo.DefaultBranch | PathEscapeSegments}}...{{if ne .Repository.Owner.Name .PullRequestCtx.BaseRepo.Owner.Name}}{{PathEscape .Repository.Owner.Name}}:{{end}}{{.Repository.DefaultBranch | PathEscapeSegments}}{{end}}">{{ctx.Locale.Tr "action.compare_commits_general"}}</a>
  29. {{end}}
  30. {{end}}
  31. </div>
  32. {{template "repo/issue/filters" .}}
  33. <div id="issue-actions" class="issue-list-toolbar tw-hidden">
  34. <div class="issue-list-toolbar-left">
  35. {{template "repo/issue/openclose" .}}
  36. <!-- Total Tracked Time -->
  37. {{if .TotalTrackedTime}}
  38. <div class="ui compact tiny secondary menu">
  39. <span class="item" data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'>
  40. {{svg "octicon-clock"}}
  41. {{.TotalTrackedTime | Sec2Hour}}
  42. </span>
  43. </div>
  44. {{end}}
  45. </div>
  46. <div class="issue-list-toolbar-right">
  47. {{template "repo/issue/filter_actions" .}}
  48. </div>
  49. </div>
  50. {{template "shared/issuelist" dict "." . "listType" "repo"}}
  51. </div>
  52. </div>
  53. {{template "base/footer" .}}