Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/layouts/partials/helpers/treeview.jet.html
kilo 424e26d476 Fix file list indent (#1450)
* Fix file list indent

* Lower indent
2017-08-31 09:49:59 +10:00

26 lignes
947 o
HTML

{{ block make_treeview(treeviewData=nil) }}
{{ if isset(treeviewData)}}
{{ range index, folder := treeviewData.Folder.Folders }}
{{ folderId := treeviewData.IdentifierChain+"_"+index }}
<tr class="tr-filelist tr-folder" style="padding-left: {{ treeviewData.NestLevel * 2.5 }}%;">
<td><label for="contents_{{folderId}}">{{folder.FolderName}}</label></td>
<td>{{ fileSize(folder.TotalSize(), T) }}</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)}}</td>
</tr>
{{ end }}
{{ end }}
{{ end }}