gitea源码

123456789101112131415161718192021222324252627282930313233
  1. <div class="ui dropdown tiny basic button" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.options_button"}}">
  2. {{svg "octicon-kebab-horizontal"}}
  3. <div class="menu">
  4. {{if .Issue.Index}}
  5. <a class="item" href="{{$.RepoLink}}/pulls/{{.Issue.Index}}.patch" download="{{.Issue.Index}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
  6. <a class="item" href="{{$.RepoLink}}/pulls/{{.Issue.Index}}.diff" download="{{.Issue.Index}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
  7. {{else if $.PageIsWiki}}
  8. <a class="item" href="{{$.RepoLink}}/wiki/commit/{{PathEscape .Commit.ID.String}}.patch" download="{{ShortSha .Commit.ID.String}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
  9. <a class="item" href="{{$.RepoLink}}/wiki/commit/{{PathEscape .Commit.ID.String}}.diff" download="{{ShortSha .Commit.ID.String}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
  10. {{else if .Commit.ID.String}}
  11. <a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.patch" download="{{ShortSha .Commit.ID.String}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
  12. <a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.diff" download="{{ShortSha .Commit.ID.String}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
  13. {{end}}
  14. <a id="expand-files-btn" class="item">{{ctx.Locale.Tr "repo.pulls.expand_files"}}</a>
  15. <a id="collapse-files-btn" class="item">{{ctx.Locale.Tr "repo.pulls.collapse_files"}}</a>
  16. {{if .Issue.Index}}
  17. {{if .ShowOutdatedComments}}
  18. <a class="item" href="?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated=false">
  19. <label class="tw-pointer-events-none">
  20. {{ctx.Locale.Tr "repo.issues.review.option.hide_outdated_comments"}}
  21. </label>
  22. </a>
  23. {{else}}
  24. <a class="item" href="?style={{if $.IsSplitStyle}}split{{else}}unified{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated=true">
  25. <label class="tw-pointer-events-none">
  26. {{ctx.Locale.Tr "repo.issues.review.option.show_outdated_comments"}}
  27. </label>
  28. </a>
  29. {{end}}
  30. {{end}}
  31. </div>
  32. </div>