Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link to file from its history #27354

Merged
merged 10 commits into from
Oct 2, 2023
8 changes: 7 additions & 1 deletion templates/repo/commits_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<tr>
<th class="three wide">{{ctx.Locale.Tr "repo.commits.author"}}</th>
<th class="two wide sha">SHA1</th>
<th class="nine wide message">{{ctx.Locale.Tr "repo.commits.message"}}</th>
<th class="seven wide message">{{ctx.Locale.Tr "repo.commits.message"}}</th>
<th class="two wide right aligned">{{ctx.Locale.Tr "repo.commits.date"}}</th>
{{if $.FileName}}<th class="two wide right aligned">{{ctx.Locale.Tr "repo.diff.view_file"}}</th>{{end}}
denyskon marked this conversation as resolved.
Show resolved Hide resolved
</tr>
</thead>
<tbody class="commit-list">
Expand Down Expand Up @@ -76,6 +77,11 @@
{{else}}
<td class="text right aligned">{{TimeSince .Author.When ctx.Locale}}</td>
{{end}}
{{if $.FileName}}
<td class="text right aligned">
<a class="ui basic button copy-commit-sha" href="{{printf "%s/src/commit/%s/%s" $commitRepoLink (PathEscape .ID.String) $.FileName}}">{{svg "octicon-file-code"}}</a>
denyskon marked this conversation as resolved.
Show resolved Hide resolved
</td>
{{end}}
</tr>
{{end}}
</tbody>
Expand Down