Browse Source

new template func

pull/2203/head
Unknwon 9 years ago
parent
commit
ea375c0dcc
  1. 3
      modules/template/template.go
  2. 2
      templates/repo/view_list.tmpl

3
modules/template/template.go

@ -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
},

2
templates/repo/view_list.tmpl

@ -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}}

Loading…
Cancel
Save