Skip to content

Commit aebfe5c

Browse files
committed
Use shared tag name template
1 parent 1e34774 commit aebfe5c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

templates/repo/commits_list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<pre class="commit-body tw-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre>
7474
{{end}}
7575
{{range (index $.CommitsTagsMap .ID.String)}}
76-
{{- template "repo/tag/name" dict "RepoFullName" $.Repository.FullName "TagName" .TagName "IsRelease" (not .IsTag) -}}
76+
{{- template "repo/tag/name" dict "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}}
7777
{{end}}
7878
</td>
7979
{{if .Committer}}

templates/repo/graph/commits.tmpl

+1-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
</a>
4343
{{end}}
4444
{{else if eq $refGroup "tags"}}
45-
<a class="ui labelled basic tiny button" href="{{$.RepoLink}}/src/tag/{{.ShortName|PathEscape}}">
46-
{{svg "octicon-tag"}} {{.ShortName}}
47-
</a>
45+
{{- template "repo/tag/name" dict "RepoLink" $.Repository.Link "TagName" .ShortName -}}
4846
{{else if eq $refGroup "remotes"}}
4947
<a class="ui labelled basic tiny button" href="{{$.RepoLink}}/src/commit/{{$commit.Rev|PathEscape}}">
5048
{{svg "octicon-cross-reference"}} {{.ShortName}}

templates/repo/tag/name.tmpl

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<a href="/{{.RepoFullName}}/releases/tag/{{.TagName}}"><span class="ui label{{if .IsRelease}} primary{{end}}">{{.TagName}}</span></a>
1+
<a class="ui label basic tiny button{{if .IsRelease}} primary{{end}}" href="{{.RepoLink}}/src/tag/{{.TagName|PathEscape}}">
2+
{{svg "octicon-tag"}} {{.TagName}}
3+
</a>

0 commit comments

Comments
 (0)