diff options
author | slene <vslene@gmail.com> | 2014-03-20 13:31:24 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-03-20 13:31:24 +0800 |
commit | 24678d73f59abd46141ef6fece7966e1f9c5c8f3 (patch) | |
tree | 703b9cf24bcd7af41be88ef4134c8d21e94bd1fc /templates/repo/single_list.tmpl | |
parent | 805732fdc76c55659a3ee4b9d1a655ba3c9a0abc (diff) | |
download | gitea-24678d73f59abd46141ef6fece7966e1f9c5c8f3.tar.gz gitea-24678d73f59abd46141ef6fece7966e1f9c5c8f3.zip |
read single file
Diffstat (limited to 'templates/repo/single_list.tmpl')
-rw-r--r-- | templates/repo/single_list.tmpl | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/templates/repo/single_list.tmpl b/templates/repo/single_list.tmpl new file mode 100644 index 0000000000..b0c31d1e44 --- /dev/null +++ b/templates/repo/single_list.tmpl @@ -0,0 +1,54 @@ +<div class="panel panel-default info-box"> + <div class="panel-heading info-head"> + <a href="/{{.Username}}/{{.Reponame}}/commit/{{.LastCommit.Oid.String}}">{{.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> + </div> + <table class="panel-footer table file-list"> + <thead class="hidden"> + <tr> + <th class="icon"></th> + <th class="name">Filename</th> + <th class="text">Message</th> + <th class="date">Date modified</th> + </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}} + </tbody> + </table> +</div> +{{if .ReadmeExist}} + {{template "repo/single_file" .}} +{{end}}
\ No newline at end of file |