Skip to content

Commit b85e4a6

Browse files
authored
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)
1 parent 33d9390 commit b85e4a6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

templates/repo/commits_list.tmpl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@
7878
{{end}}
7979
<td class="text right aligned gt-py-0">
8080
<button class="btn interact-bg gt-p-3" data-tooltip-content="{{ctx.Locale.Tr "copy_hash"}}" data-clipboard-text="{{.ID}}">{{svg "octicon-copy"}}</button>
81-
{{if $.FileName}}
82-
<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>
83-
{{end}}
81+
<a
82+
class="btn interact-bg gt-p-3"
83+
data-tooltip-content="{{ctx.Locale.Tr "repo.commits.view_path"}}"
84+
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}}">
85+
{{svg "octicon-file-code"}}
86+
</a>
8487
</td>
8588
</tr>
8689
{{end}}

0 commit comments

Comments
 (0)