1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00

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
This commit is contained in:
wxiaoguang 2023-03-24 00:52:20 +08:00 committed by GitHub
parent e8433b7fe6
commit 378d6b8491
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 8 deletions

View file

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

View file

@ -7,8 +7,8 @@
<h4 class="ui top attached header"> <h4 class="ui top attached header">
{{.locale.Tr "repo.settings.lfs_filelist"}} ({{.locale.Tr "admin.total" .Total}}) {{.locale.Tr "repo.settings.lfs_filelist"}} ({{.locale.Tr "admin.total" .Total}})
<div class="ui right"> <div class="ui right">
<a class="ui tiny show-panel button" href="{{.Link}}/locks">{{.locale.Tr "repo.settings.lfs_locks"}}</a> <a class="ui tiny button" href="{{.Link}}/locks">{{.locale.Tr "repo.settings.lfs_locks"}}</a>
<a class="ui primary tiny show-panel button" href="{{.Link}}/pointers">&nbsp;{{.locale.Tr "repo.settings.lfs_findpointerfiles"}}</a> <a class="ui primary tiny button" href="{{.Link}}/pointers">&nbsp;{{.locale.Tr "repo.settings.lfs_findpointerfiles"}}</a>
</div> </div>
</h4> </h4>
<table id="lfs-files-table" class="ui attached segment single line table"> <table id="lfs-files-table" class="ui attached segment single line table">
@ -25,7 +25,7 @@
<td>{{FileSize .Size}}</td> <td>{{FileSize .Size}}</td>
<td>{{TimeSince .CreatedUnix.AsTime $.locale}}</td> <td>{{TimeSince .CreatedUnix.AsTime $.locale}}</td>
<td class="right aligned"> <td class="right aligned">
<a class="ui primary show-panel button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a> <a class="ui primary button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
<button class="ui basic show-modal icon button" data-modal="#delete-{{.Oid}}"> <button class="ui basic show-modal icon button" data-modal="#delete-{{.Oid}}">
<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> <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>
</button> </button>

View file

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

View file

@ -56,7 +56,7 @@
</span> </span>
</td> </td>
<td> <td>
<a class="ui primary show-panel button" href="{{$.LFSFilesLink}}/find?oid={{.Oid}}&size={{.Size}}&sha={{.SHA}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a> <a class="ui primary button" href="{{$.LFSFilesLink}}/find?oid={{.Oid}}&size={{.Size}}&sha={{.SHA}}">{{$.locale.Tr "repo.settings.lfs_findcommits"}}</a>
</td> </td>
<td>{{if .InRepo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> <td>{{if .InRepo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
<td>{{if .Exists}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> <td>{{if .Exists}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>

View file

@ -50,7 +50,7 @@
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
{{if and (not .Verified) (ne $.VerifyingID .KeyID)}} {{if and (not .Verified) (ne $.VerifyingID .KeyID)}}
<a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.locale.Tr "settings.gpg_key_verify"}}</a> <a class="ui primary tiny button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.locale.Tr "settings.gpg_key_verify"}}</a>
{{end}} {{end}}
</div> </div>
<div class="left floated content"> <div class="left floated content">

View file

@ -42,7 +42,7 @@
{{$.locale.Tr "settings.delete_key"}} {{$.locale.Tr "settings.delete_key"}}
</button> </button>
{{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}} {{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}}
<a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.locale.Tr "settings.ssh_key_verify"}}</a> <a class="ui primary tiny button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.locale.Tr "settings.ssh_key_verify"}}</a>
{{end}} {{end}}
</div> </div>