mirror of
https://github.com/go-gitea/gitea
synced 2024-11-25 17:32:45 +01:00
new template func
This commit is contained in:
parent
7509fa2c33
commit
ea375c0dcc
2 changed files with 4 additions and 1 deletions
|
@ -34,6 +34,9 @@ var Funcs template.FuncMap = map[string]interface{}{
|
||||||
"AppSubUrl": func() string {
|
"AppSubUrl": func() string {
|
||||||
return setting.AppSubUrl
|
return setting.AppSubUrl
|
||||||
},
|
},
|
||||||
|
"AppUrl": func() string {
|
||||||
|
return setting.AppUrl
|
||||||
|
},
|
||||||
"AppVer": func() string {
|
"AppVer": func() string {
|
||||||
return setting.AppVer
|
return setting.AppVer
|
||||||
},
|
},
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
{{if $entry.IsSubModule}}
|
{{if $entry.IsSubModule}}
|
||||||
<td>
|
<td>
|
||||||
<span class="icon octicon octicon-file-submodule"></span>
|
<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>
|
<a href="{{$commit.RefUrl}}">{{$entry.Name}}</a> @ <a href="{{$commit.RefUrl}}/commit/{{$commit.RefId}}">{{ShortSha $commit.RefId}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{$entry.Name}} @ {{ShortSha $commit.RefId}}
|
{{$entry.Name}} @ {{ShortSha $commit.RefId}}
|
||||||
|
|
Loading…
Reference in a new issue