Fixing FileList IdentifierChain not available error
Cette révision appartient à :
Parent
b802cc0280
révision
4a26d50ed1
3 fichiers modifiés avec 5 ajouts et 6 suppressions
|
@ -1,7 +1,7 @@
|
|||
{{ block make_treeview(treeviewData=nil) }}
|
||||
{{ if isset(treeviewData)}}
|
||||
{{ range index, folder := treeviewData.Folder.Folders }}
|
||||
{{ folderId := IdentifierChain+"_"+index }}
|
||||
{{ folderId := treeviewData.IdentifierChain+"_"+index }}
|
||||
<tr class="tr-filelist tr-folder" style="--nest-level: {{ treeviewData.NestLevel }}">
|
||||
<td><label for="contents_{{folderId}}">{{folder.FolderName}}</label></td>
|
||||
<td>{{ fileSize(folder.TotalSize, T) }}</td>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<td colspan="2">
|
||||
<input id="contents_{{folderId}}" type="checkbox" class="filelist-checkbox">
|
||||
<table class="table-filelist">
|
||||
{{ yield make_treeview(treeviewData=makeTreeViewData(folder, treeviewData.NestLevel, T, folderId)) }}
|
||||
{{ yield make_treeview(treeviewData=makeTreeViewData(folder, treeviewData.NestLevel, folderId)) }}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<th>{{ T("size")}}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ yield make_treeview(treeviewData=makeTreeViewData(RootFolder, 0, T, "root")) }}
|
||||
{{ yield make_treeview(treeviewData=makeTreeViewData(RootFolder, 0, "root")) }}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ else }}
|
||||
|
|
|
@ -221,13 +221,12 @@ func defaultUserSettings(s string) bool {
|
|||
return config.Get().Users.DefaultUserSettings[s]
|
||||
}
|
||||
|
||||
func makeTreeViewData(f *filelist.FileListFolder, nestLevel int, T publicSettings.TemplateTfunc, identifierChain string) interface{} {
|
||||
func makeTreeViewData(f *filelist.FileListFolder, nestLevel int, identifierChain string) interface{} {
|
||||
return struct {
|
||||
Folder *filelist.FileListFolder
|
||||
NestLevel int
|
||||
T publicSettings.TemplateTfunc
|
||||
IdentifierChain string
|
||||
}{f, nestLevel, T, identifierChain}
|
||||
}{f, nestLevel, identifierChain}
|
||||
}
|
||||
func lastID(currentURL *url.URL, torrents []models.TorrentJSON) int {
|
||||
if len(torrents) == 0 {
|
||||
|
|
Référencer dans un nouveau ticket