diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-14 02:40:07 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-14 02:40:07 -0400 |
commit | 398809b135742ad8a7441f65fa7d0ccec318bd91 (patch) | |
tree | 63dd74d3d3926846c26cb9ca19cb4d9b3aa025ee /templates/repo/single.tmpl | |
parent | df7f20a87bf2ba1a9ce8f31d337d7334f42181d8 (diff) | |
download | gitea-398809b135742ad8a7441f65fa7d0ccec318bd91.tar.gz gitea-398809b135742ad8a7441f65fa7d0ccec318bd91.zip |
Combine UI and data in repo home page
Diffstat (limited to 'templates/repo/single.tmpl')
-rw-r--r-- | templates/repo/single.tmpl | 54 |
1 files changed, 12 insertions, 42 deletions
diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl index 54d06aed40..4a71ad3465 100644 --- a/templates/repo/single.tmpl +++ b/templates/repo/single.tmpl @@ -21,52 +21,22 @@ </div> <table id="gogs-source-table" class="table table-hover"> <thead class="hidden"> - <tr> - <th class="name">Filename</th> - <th class="size">Size</th> - <th class="date">Date modified</th> - <th class="text">Message</th> - </tr> + <tr> + <th class="name">Filename</th> + <th class="date">Date modified</th> + <th class="text">Message</th> + </tr> </thead> <tbody> - <tr class="is-dir"> - <td class="name" colspan="3"><i class="fa fa-folder"></i><a href="#">dir-1</a></td> - <td class="message">commit message</td> - </tr> - <tr class="is-dir"> - <td class="name" colspan="3"><i class="fa fa-folder"></i><a href="#">dir-2</a></td> - <td class="message"> commit message</td> - </tr> - <tr class="is-dir"> - <td class="name" colspan="3"><i class="fa fa-folder"></i><a href="#">dir-3</a></td> - <td class="message">commit message</td> - </tr> - <tr> - <td class="name"><i class="fa fa-file"></i><a href="#">file-1.txt</a></td> - <td class="size">177 B</td> - <td class="date"><time datetime="2011-10-20T06:51:01+08:00" data-title="true" title="20 October 2011 06:51">3 years ago</time></td> - <td class="text">commit message</td> - </tr> - <tr> - <td class="name"><i class="fa fa-file"></i><a href="#">file-2.txt</a></td> - <td class="size">177 B</td> - <td class="date"><time datetime="2011-10-20T06:51:01+08:00" data-title="true" title="20 October 2011 06:51">3 years ago</time></td> - <td class="text">commit message</td> - </tr><tr> - <td class="name"><i class="fa fa-file"></i><a href="#">file-3.txt</a></td> - <td class="size">177 B</td> - <td class="date"><time datetime="2011-10-20T06:51:01+08:00" data-title="true" title="20 October 2011 06:51">3 years ago</time></td> - <td class="text">commit message</td> - </tr> - + {{range .Files}} + <tr {{if .IsDir}}class="is-dir"{{end}}> + <td class="name"><i class="fa fa-file"></i><a href="#">{{.Name}}</a></td> + <td class="date"><time datetime="{{.Created}}" data-title="true" title="{{.Created}}">{{TimeSince .Created}}</time></td> + <td class="text">{{.Message}}</td> + </tr> + {{end}} </tbody> </table> </div> - <h4>Source Files:</h4> - <ul> - {{range .Files}} - <li>{{.Name}} - {{.Message}} - {{.Created}} - {{.IsFile}} - {{.IsDir}}</li> - {{end}} - </ul> </div> {{template "base/footer" .}}
\ No newline at end of file |