diff options
author | slene <vslene@gmail.com> | 2014-04-13 09:35:36 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-04-13 09:35:36 +0800 |
commit | 52b4ab2aa589cf892b24e95872cbac7b6e78ed3a (patch) | |
tree | efa6799dd4b78d6e70a28ac9feaa4351836c201a /templates/repo | |
parent | 9ffa8a40836a5e3341267affbaef08acf4765a74 (diff) | |
download | gitea-52b4ab2aa589cf892b24e95872cbac7b6e78ed3a.tar.gz gitea-52b4ab2aa589cf892b24e95872cbac7b6e78ed3a.zip |
update with new git
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/single_list.tmpl | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/templates/repo/single_list.tmpl b/templates/repo/single_list.tmpl index b0c31d1e44..b12687bd7d 100644 --- a/templates/repo/single_list.tmpl +++ b/templates/repo/single_list.tmpl @@ -1,6 +1,6 @@ <div class="panel panel-default info-box"> <div class="panel-heading info-head"> - <a href="/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Oid.String}}">{{.LastCommit.Message}}</a> + <a href="/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Id}}">{{.LastCommit.Message}}</a> </div> <div class="panel-body info-content"> <a href="/user/{{.LastCommit.Author.Name}}">{{.LastCommit.Author.Name}}</a> <span class="text-muted">{{TimeSince .LastCommit.Author.When}}</span> @@ -15,40 +15,37 @@ </tr> </thead> <tbody> - {{if .HasParentPath}} - <tr class="has-parent"> - <td class="icon"><a href="{{.BranchLink}}{{.ParentPath}}"><i class="fa fa-reply"></i></a></td> - <td class="name"><a href="{{.BranchLink}}{{.ParentPath}}">..</a></td> - <td class="text"></td> - <td class="date"></td> - </tr> - {{end}} - {{range .Files}} - <tr - {{if .IsDir}}class="is-dir"{{end}}> - <td class="icon"> - <i class="fa {{if .IsDir}}fa-folder{{else}}fa-file-text-o{{end}}"></i> - </td> - <td class="name"> - <span class="wrap"> - {{if .IsDir}} - <a href="{{$.BranchLink}}/{{.Path}}">{{.Name}}</a> - {{else}} - <a href="{{$.BranchLink}}/{{.Path}}">{{.Name}}</a> - {{end}} - </span> - </td> - <td class="text"> - <span class="wrap"><a href="/{{$.Username}}/{{$.Reponame}}/commit/{{.Commit.Oid}}">{{.Commit.Message}}</a></span> - </td> - <td class="date"> - <span class="wrap">{{TimeSince .Commit.Committer.When}}</span> - </td> - </tr> - {{end}} + {{if .HasParentPath}} + <tr class="has-parent"> + <td class="icon"><a href="{{.BranchLink}}{{.ParentPath}}"><i class="fa fa-reply"></i></a></td> + <td class="name"><a href="{{.BranchLink}}{{.ParentPath}}">..</a></td> + <td class="text"></td> + <td class="date"></td> + </tr> + {{end}} + {{range $item := .Files}} + {{$entry := index $item 0}} + {{$commit := index $item 1}} + <tr {{if $entry.IsDir}}class="is-dir"{{end}}> + <td class="icon"> + <i class="fa {{if $entry.IsDir}}fa-folder{{else}}fa-file-text-o{{end}}"></i> + </td> + <td class="name"> + <span class="wrap"> + <a href="{{$.BranchLink}}/{{$.TreePath}}{{$entry.Name}}">{{$entry.Name}}</a> + </span> + </td> + <td class="text"> + <span class="wrap"><a href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Message}}</a></span> + </td> + <td class="date"> + <span class="wrap">{{TimeSince $commit.Committer.When}}</span> + </td> + </tr> + {{end}} </tbody> </table> </div> {{if .ReadmeExist}} {{template "repo/single_file" .}} -{{end}}
\ No newline at end of file +{{end}} |