diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/view_list.tmpl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 3266a813e3..a99efab020 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -40,18 +40,19 @@ </tr> {{end}} {{range $item := .Files}} - {{$entry := index $item 0}} - {{$commit := index $item 1}} + {{$entry := $item.Entry}} + {{$commit := $item.Commit}} + {{$subModuleFile := $item.SubModuleFile}} <tr> <td class="name four wide"> <span class="truncate"> {{if $entry.IsSubModule}} {{svg "octicon-file-submodule"}} - {{$refURL := $commit.RefURL AppUrl $.Repository.FullName $.SSHDomain}} + {{$refURL := $subModuleFile.RefURL AppUrl $.Repository.FullName $.SSHDomain}} {{if $refURL}} - <a href="{{$refURL}}">{{$entry.Name}}</a><span class="at">@</span><a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a> + <a href="{{$refURL}}">{{$entry.Name}}</a><span class="at">@</span><a href="{{$refURL}}/commit/{{$subModuleFile.RefID}}">{{ShortSha $subModuleFile.RefID}}</a> {{else}} - {{$entry.Name}}<span class="at">@</span>{{ShortSha $commit.RefID}} + {{$entry.Name}}<span class="at">@</span>{{ShortSha $subModuleFile.RefID}} {{end}} {{else}} {{if $entry.IsDir}} |