Skip to content

Commit 378d6b8

Browse files
authored
Fix incorrect show-modal and show-panel class (#23660)
That's incorrect code caused by Copy&Paste. `show-modal` / `show-panel` are used by JS to show something, but these links have `href`, they should navigate to new page. Close #23657
1 parent e8433b7 commit 378d6b8

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

templates/repo/projects/view.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</div>
99
<div class="column right aligned">
1010
{{if and .CanWriteProjects (not .Repository.IsArchived)}}
11-
<a class="ui green button show-modal item" href="{{$.RepoLink}}/issues/new/choose?project={{$.Project.ID}}">{{.locale.Tr "repo.issues.new"}}</a>
11+
<a class="ui green button item" href="{{$.RepoLink}}/issues/new/choose?project={{$.Project.ID}}">{{.locale.Tr "repo.issues.new"}}</a>
1212
<a class="ui green button show-modal item" data-modal="#new-board-item">{{.locale.Tr "new_project_column"}}</a>
1313
{{end}}
1414
<div class="ui small modal new-board-modal" id="new-board-item">

templates/repo/settings/lfs.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<h4 class="ui top attached header">
88
{{.locale.Tr "repo.settings.lfs_filelist"}} ({{.locale.Tr "admin.total" .Total}})
99
<div class="ui right">
10-
<a class="ui tiny show-panel button" href="{{.Link}}/locks">{{.locale.Tr "repo.settings.lfs_locks"}}</a>
11-
<a class="ui primary tiny show-panel button" href="{{.Link}}/pointers">&nbsp;{{.locale.Tr "repo.settings.lfs_findpointerfiles"}}</a>
10+
<a class="ui tiny button" href="{{.Link}}/locks">{{.locale.Tr "repo.settings.lfs_locks"}}</a>
11+
<a class="ui primary tiny button" href="{{.Link}}/pointers">&nbsp;{{.locale.Tr "repo.settings.lfs_findpointerfiles"}}</a>
1212
</div>
1313
</h4>
1414
<table id="lfs-files-table" class="ui attached segment single line table">
@@ -25,7 +25,7 @@
2525
<td>{{FileSize .Size}}</td>
2626
<td>{{TimeSince .CreatedUnix.AsTime $.locale}}</td>
2727
<td class="right aligned">
28-
<a class="ui primary show-panel button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
28+
<a class="ui primary button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
2929
<button class="ui basic show-modal icon button" data-modal="#delete-{{.Oid}}">
3030
<span class="btn-octicon btn-octicon-danger tooltip" data-content="{{$.locale.Tr "repo.editor.delete_this_file"}}" data-position="bottom center">{{svg "octicon-trash"}}</span>
3131
</button>

templates/repo/settings/lfs_file.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<a class="ui mini basic button unescape-button gt-hidden">{{.locale.Tr "repo.unescape_control_characters"}}</a>
1313
<a class="ui mini basic button escape-button">{{.locale.Tr "repo.escape_control_characters"}}</a>
1414
{{end}}
15-
<a class="ui primary show-panel button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
15+
<a class="ui primary button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
1616
</div>
1717
</h4>
1818
<div class="ui attached table unstackable segment">

templates/repo/settings/lfs_pointers.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</span>
5757
</td>
5858
<td>
59-
<a class="ui primary show-panel button" href="{{$.LFSFilesLink}}/find?oid={{.Oid}}&size={{.Size}}&sha={{.SHA}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
59+
<a class="ui primary button" href="{{$.LFSFilesLink}}/find?oid={{.Oid}}&size={{.Size}}&sha={{.SHA}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
6060
</td>
6161
<td>{{if .InRepo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
6262
<td>{{if .Exists}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>

templates/user/settings/keys_gpg.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
{{$.locale.Tr "settings.delete_key"}}
5151
</button>
5252
{{if and (not .Verified) (ne $.VerifyingID .KeyID)}}
53-
<a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.locale.Tr "settings.gpg_key_verify"}}</a>
53+
<a class="ui primary tiny button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.locale.Tr "settings.gpg_key_verify"}}</a>
5454
{{end}}
5555
</div>
5656
<div class="left floated content">

templates/user/settings/keys_ssh.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
{{$.locale.Tr "settings.delete_key"}}
4343
</button>
4444
{{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}}
45-
<a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.locale.Tr "settings.ssh_key_verify"}}</a>
45+
<a class="ui primary tiny button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.locale.Tr "settings.ssh_key_verify"}}</a>
4646
{{end}}
4747

4848
</div>

0 commit comments

Comments
 (0)