mirror of
https://gitee.com/gitea/gitea.git
synced 2024-12-05 21:28:45 +08:00
59eb660b1a
Some of those are still Copy&Paste problems. This PR: * Only cleans the legacy incorrect code, doesn't change or improve the "action" logic. * Remove the redundant `$('.toggle.button').on('click')`, now `$('.show-panel.button').on('click')` handles that kinds of buttons Actually, there is only one correct "toggle button" in code, the one on the webhook page. No need to backport.
32 lines
1.9 KiB
Handlebars
32 lines
1.9 KiB
Handlebars
<div class="ui dropdown tiny basic button icon-button" data-tooltip-content="{{.locale.Tr "repo.diff.whitespace_button"}}">
|
|
{{svg "gitea-whitespace"}}
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
<div class="menu">
|
|
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=show-all">
|
|
<label class="gt-pointer-events-none">
|
|
<input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "show-all"}} checked{{end}}>
|
|
{{.locale.Tr "repo.diff.whitespace_show_everything"}}
|
|
</label>
|
|
</a>
|
|
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-all">
|
|
<label class="gt-pointer-events-none">
|
|
<input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-all"}} checked{{end}}>
|
|
{{.locale.Tr "repo.diff.whitespace_ignore_all_whitespace"}}
|
|
<label>
|
|
</a>
|
|
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-change">
|
|
<label class="gt-pointer-events-none">
|
|
<input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-change"}} checked{{end}}>
|
|
{{.locale.Tr "repo.diff.whitespace_ignore_amount_changes"}}
|
|
</label>
|
|
</a>
|
|
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-eol">
|
|
<label class="gt-pointer-events-none">
|
|
<input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-eol"}} checked{{end}}>
|
|
{{.locale.Tr "repo.diff.whitespace_ignore_at_eol"}}
|
|
</label>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<a class="ui tiny basic button icon-button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}&whitespace={{$.WhitespaceBehavior}}" data-tooltip-content="{{if .IsSplitStyle}}{{.locale.Tr "repo.diff.show_unified_view"}}{{else}}{{.locale.Tr "repo.diff.show_split_view"}}{{end}}">{{if .IsSplitStyle}}{{svg "gitea-join"}}{{else}}{{svg "gitea-split"}}{{end}}</a>
|