{{ block make_treeview(treeviewData=nil) }}
{{ if isset(treeviewData)}}
{{ range index, folder := treeviewData.Folder.Folders }}
{{ folderId := treeviewData.IdentifierChain+"_"+index }}
<tr class="tr-filelist tr-folder">
  <td style="padding-left: {{ treeviewData.NestLevel * 2.5 }}%;"><label for="contents_{{folderId}}">{{folder.FolderName}}</label></td>
  <td>{{ fileSize(folder.TotalSize(), T, true) }}</td>
</tr>
<tr>
  <td colspan="2">
    <input id="contents_{{folderId}}" type="checkbox" class="filelist-checkbox"/>
    <table class="table-filelist">
      {{ yield make_treeview(treeviewData=makeTreeViewData(folder, treeviewData.NestLevel+1, folderId)) }}
    </table>
  </td>
</tr>
{{ end }}

{{ range _, file := treeviewData.Folder.Files }}
<tr class="tr-filelist tr-file">
  <td style="padding-left: {{ treeviewData.NestLevel * 2.5 }}%;">{{file.Filename()}}</td>
  <td>{{fileSize(file.Filesize, T, true)}}</td>
</tr>
{{ end }}
{{ end }}
{{ end }}
