diff options
author | Tim-Nicas Oelschläger <72873130+zokkis@users.noreply.github.com> | 2024-02-13 09:07:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 09:07:59 +0100 |
commit | b85e4a64fa26e1f20321c3a7cedf9fa05640ca48 (patch) | |
tree | 0ba88f8bb427f11b4bd37c60b2f6bd35f015e2bb | |
parent | 33d939096d93a1014d4961374939376260740cbc (diff) | |
download | gitea-b85e4a64fa26e1f20321c3a7cedf9fa05640ca48.tar.gz gitea-b85e4a64fa26e1f20321c3a7cedf9fa05640ca48.zip |
Show `View at this point in history` for every commit (#29122)
Shows the 'View at this point in history'-link (from #27354) for every
commit
before:
![image](https://github.com/go-gitea/gitea/assets/72873130/0e5cd763-e099-4bb4-9519-653fe21f85a6)
after:
![image](https://github.com/go-gitea/gitea/assets/72873130/2b57346f-51e3-4901-b85e-63a690878939)
-rw-r--r-- | templates/repo/commits_list.tmpl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index 7702770c40..4eb31e0e8e 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -78,9 +78,12 @@ {{end}} <td class="text right aligned gt-py-0"> <button class="btn interact-bg gt-p-3" data-tooltip-content="{{ctx.Locale.Tr "copy_hash"}}" data-clipboard-text="{{.ID}}">{{svg "octicon-copy"}}</button> - {{if $.FileName}} - <a class="btn interact-bg gt-p-3" data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}" href="{{printf "%s/src/commit/%s/%s" $commitRepoLink (PathEscape .ID.String) (PathEscapeSegments $.FileName)}}">{{svg "octicon-file-code"}}</a> - {{end}} + <a + class="btn interact-bg gt-p-3" + data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}" + href="{{if $.FileName}}{{printf "%s/src/commit/%s/%s" $commitRepoLink (PathEscape .ID.String) (PathEscapeSegments $.FileName)}}{{else}}{{printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}}{{end}}"> + {{svg "octicon-file-code"}} + </a> </td> </tr> {{end}} |