Skip to content

Commit ea375c0

Browse files
committed
new template func
1 parent 7509fa2 commit ea375c0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

modules/template/template.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ var Funcs template.FuncMap = map[string]interface{}{
3434
"AppSubUrl": func() string {
3535
return setting.AppSubUrl
3636
},
37+
"AppUrl": func() string {
38+
return setting.AppUrl
39+
},
3740
"AppVer": func() string {
3841
return setting.AppVer
3942
},

templates/repo/view_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{{if $entry.IsSubModule}}
3131
<td>
3232
<span class="icon octicon octicon-file-submodule"></span>
33-
{{if $commit.RefUrl}}
33+
{{if $commit.RefUrl AppUrl}}
3434
<a href="{{$commit.RefUrl}}">{{$entry.Name}}</a> @ <a href="{{$commit.RefUrl}}/commit/{{$commit.RefId}}">{{ShortSha $commit.RefId}}</a>
3535
{{else}}
3636
{{$entry.Name}} @ {{ShortSha $commit.RefId}}

0 commit comments

Comments
 (0)