{{define "body"}}
<div class="row">
    <div class="nav-container full-width relative">
    <ol class="breadcrumb full-width">
        <li class="breadcrumb-item"></li>
        <li class="breadcrumb-item"><a href="/">root</a></li>
        {{range $item := .Paths}}
        <li class="breadcrumb-item{{if $item.Flag}} active{{end}}">{{if $item.Flag}}{{$item.Name}}{{else}}<a href="{{$item.Abs}}">{{$item.Name}}</a>{{end}}</li>
        {{end}}
    </ol>
    <div class="btn-group btn-breadcrumb">
        <a href="/upload{{.Path}}" class="btn btn-sm btn-success">Upload</a>
        <a href="/new{{.Path}}" class="btn btn-sm btn-primary">New</a>
        <a href="/move{{.Path}}" class="btn btn-sm btn-primary">Move</a>
        <a href="/delete{{.Path}}" class="btn btn-sm btn-danger">Delete</a>
    </div>
    </div>
</div>
<div class="row">
    <table class="table table-stripped table-hover">
    <thead>
        <tr>
            <th>Path</th>
            <th>Type</th>
            <th>Options</th>
        </tr>
    </thead>
    <tbody>
        {{if .Data}}
        {{range $item := .Data.Dirs}}
        <tr>
            <th><a href="{{$item.Abs}}">{{$item.Name}}/</a></th>
            <td>Directory</td>
            <td><div class="btn-group">
                <a href="/move{{$item.Abs}}" class="btn btn-sm btn-primary">Move</a>
                <a href="/delete{{$item.Abs}}" class="btn btn-sm btn-danger">Delete</a>
            </div></td>
        </tr>
        {{end}}
        {{range $item := .Data.Files}}
        <tr>
            <th><a href="{{$item.Abs}}">{{$item.Name}}</a></th>
            <td>File</td>
            <td><div class="btn-group">
                {{if not $item.Flag}}
                <a href="/index{{$item.Abs}}" class="btn btn-sm btn-success">Index</a>
                {{end}}
                <a href="/move{{$item.Abs}}" class="btn btn-sm btn-primary">Move</a>
                <a href="/delete{{$item.Abs}}" class="btn btn-sm btn-danger">Delete</a>
            </div></td>
        </tr>
        {{end}}
        {{end}}
    </tbody>
    </table>
</div>
{{end}}
