1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 09:43:11 +00:00

new template func

This commit is contained in:
Unknwon 2015-12-13 23:16:58 -05:00
parent 7509fa2c33
commit ea375c0dcc
2 changed files with 4 additions and 1 deletions

View file

@ -34,6 +34,9 @@ var Funcs template.FuncMap = map[string]interface{}{
"AppSubUrl": func() string {
return setting.AppSubUrl
},
"AppUrl": func() string {
return setting.AppUrl
},
"AppVer": func() string {
return setting.AppVer
},

View file

@ -30,7 +30,7 @@
{{if $entry.IsSubModule}}
<td>
<span class="icon octicon octicon-file-submodule"></span>
{{if $commit.RefUrl}}
{{if $commit.RefUrl AppUrl}}
<a href="{{$commit.RefUrl}}">{{$entry.Name}}</a> @ <a href="{{$commit.RefUrl}}/commit/{{$commit.RefId}}">{{ShortSha $commit.RefId}}</a>
{{else}}
{{$entry.Name}} @ {{ShortSha $commit.RefId}}