summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff/whitespace_dropdown.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
commitdd136858f1ea40ad3c94191d647487fa4f31926c (patch)
tree58fec94a7b2a12510c9664b21793f1ed560c6518 /templates/repo/diff/whitespace_dropdown.tmpl
parentInitial commit. (diff)
downloadforgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.tar.xz
forgejo-dd136858f1ea40ad3c94191d647487fa4f31926c.zip
Adding upstream version 9.0.0.upstream/9.0.0upstreamdebian
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/repo/diff/whitespace_dropdown.tmpl')
-rw-r--r--templates/repo/diff/whitespace_dropdown.tmpl30
1 files changed, 30 insertions, 0 deletions
diff --git a/templates/repo/diff/whitespace_dropdown.tmpl b/templates/repo/diff/whitespace_dropdown.tmpl
new file mode 100644
index 0000000..c54de16
--- /dev/null
+++ b/templates/repo/diff/whitespace_dropdown.tmpl
@@ -0,0 +1,30 @@
+<div class="ui dropdown tiny basic button" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.whitespace_button"}}">
+ {{svg "gitea-whitespace"}}
+ <div class="menu">
+ <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=show-all&show-outdated={{$.ShowOutdatedComments}}">
+ <label class="tw-pointer-events-none">
+ <input class="tw-mr-2 tw-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "show-all"}} checked{{end}}>
+ {{ctx.Locale.Tr "repo.diff.whitespace_show_everything"}}
+ </label>
+ </a>
+ <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-all&show-outdated={{$.ShowOutdatedComments}}">
+ <label class="tw-pointer-events-none">
+ <input class="tw-mr-2 tw-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-all"}} checked{{end}}>
+ {{ctx.Locale.Tr "repo.diff.whitespace_ignore_all_whitespace"}}
+ </label>
+ </a>
+ <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-change&show-outdated={{$.ShowOutdatedComments}}">
+ <label class="tw-pointer-events-none">
+ <input class="tw-mr-2 tw-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-change"}} checked{{end}}>
+ {{ctx.Locale.Tr "repo.diff.whitespace_ignore_amount_changes"}}
+ </label>
+ </a>
+ <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-eol&show-outdated={{$.ShowOutdatedComments}}">
+ <label class="tw-pointer-events-none">
+ <input class="tw-mr-2 tw-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-eol"}} checked{{end}}>
+ {{ctx.Locale.Tr "repo.diff.whitespace_ignore_at_eol"}}
+ </label>
+ </a>
+ </div>
+</div>
+<a class="ui tiny basic button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}&whitespace={{$.WhitespaceBehavior}}&show-outdated={{$.ShowOutdatedComments}}" data-tooltip-content="{{if .IsSplitStyle}}{{ctx.Locale.Tr "repo.diff.show_unified_view"}}{{else}}{{ctx.Locale.Tr "repo.diff.show_split_view"}}{{end}}">{{if .IsSplitStyle}}{{svg "gitea-join"}}{{else}}{{svg "gitea-split"}}{{end}}</a>