summaryrefslogtreecommitdiffstats
path: root/templates/repo/commits.tmpl
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-19 13:14:56 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-19 13:14:56 -0400
commit757f360949989214a9161f17a82aedf2b647457a (patch)
tree173e02a4f31ea9ebefe653d3b5e54d25d2dee585 /templates/repo/commits.tmpl
parent04b0ba6852c7cc5b5512e9005db304c9bdacc045 (diff)
downloadgitea-757f360949989214a9161f17a82aedf2b647457a.tar.gz
gitea-757f360949989214a9161f17a82aedf2b647457a.zip
Render data in commit list page
Diffstat (limited to 'templates/repo/commits.tmpl')
-rw-r--r--templates/repo/commits.tmpl43
1 files changed, 15 insertions, 28 deletions
diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl
index 53c14d364a..04ca19afc8 100644
--- a/templates/repo/commits.tmpl
+++ b/templates/repo/commits.tmpl
@@ -13,41 +13,28 @@
</div>
<table class="panel-footer table commit-list table table-striped">
<thead>
- <tr>
- <th class="author">Author</th>
- <th class="sha">Commit</th>
- <th class="message">Message</th>
- <th class="date">Date</th>
- </tr>
+ <tr>
+ <th class="author">Author</th>
+ <th class="sha">Commit</th>
+ <th class="message">Message</th>
+ <th class="date">Date</th>
+ </tr>
</thead>
<tbody>
+ {{ $username := .Username}}
+ {{ $reponame := .Reponame}}
+ {{$r := List .Commits}}
+ {{range $r}}
<tr>
- <td class="author"><img class="avatar" src="#" alt=""/>CommitUser</td>
- <td class="sha"><a class="label label-success" href="#">d91b380</a></td>
- <td class="message">Fix Synchronize to delete service objects in subduers upon move</td>
- <td class="date">3 years ago</td>
- </tr>
- <tr>
- <td class="author"><img class="avatar" src="#" alt=""/>CommitUser</td>
- <td class="sha"><a class="label label-success" href="#">d91b380</a></td>
- <td class="message">Fix Synchronize to delete service objects in subduers upon move</td>
- <td class="date">3 years ago</td>
- </tr>
- <tr>
- <td class="author"><img class="avatar" src="#" alt=""/>CommitUser</td>
- <td class="sha"><a class="label label-success" href="#">d91b380</a></td>
- <td class="message">Fix Synchronize to delete service objects in subduers upon move</td>
- <td class="date">3 years ago</td>
+ <td class="author"><img class="avatar" src="{{AvatarLink .Committer.Email}}" alt=""/>{{.Committer.Name}}</td>
+ <td class="sha"><a class="label label-success" href="/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 7}} </a></td>
+ <td class="message">{{.Message}} </td>
+ <td class="date">{{TimeSince .Committer.When}}</td>
</tr>
+ {{end}}
</tbody>
</table>
</div>
- <ul>
- {{$r := List .Commits}}
- {{range $r}}
- <li>{{.Committer.Name}} - {{.Id}} - {{.Message}} - {{.Committer.When}}</li>
- {{end}}
- </ul>
</div>
</div>
{{template "base/footer" .}} \ No newline at end of file