summaryrefslogtreecommitdiff
path: root/got/view_tree.got
blob: 3b0b9ebdf5f9c520dd6c2d4dd65f05cfba88caa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!-- -*- Mode: HTML -*- -->
<h1>Index of {{.path | html}}</h1>
<table>
  {{if ne .path "/"}}
  <tr class="tree parent">
    <td><a href="..">parent directory</a></td>
    <td>tree</td>
    <td>-</td>
  </tr>
  {{end}}
  {{range $name, $file := .files}}
  <tr class="{{$file.Type}}">
    <td><a href="{{$name | html}}">{{$name | html}}</a></td>
    <td>{{$file.Type | html}}</td>
    <td>{{if lt $file.Size 0}}-{{else}}{{$file.Size | html}}{{end}}</td>
    <td>{{if eq $file.Type "blob"}}<form action="{{$name | html}}" method="GET"><input type="submit" value="Edit"/></form>{{end}}</td>
    <td><form action="{{$name | html}}" method="POST"><input type="hidden" name="_method" value="DELETE" /><input type="submit" value="Delete"/></form></td>
  </tr>
  {{end}}
</table>