summaryrefslogtreecommitdiffstats
path: root/templates/repo/single_list.tmpl
blob: b0c31d1e44ac1a52296d516c76f3058daff50bb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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}}