can now toggle between folder or flat view, its a bit ugly, but it works

This commit is contained in:
2021-06-06 14:09:11 +10:00
parent b6156dad34
commit 7e2494884e
5 changed files with 44 additions and 16 deletions

View File

@@ -29,6 +29,20 @@ def CreateSelect(name, selected, list, js=""):
str += '</select>'
return str
def CreateFoldersSelect(selected):
str = f'<select id="folders" name="folders" style="color:#5bc0de;border:1px solid #5bc0de;"'
str += f'class="sm-txt form-control form-conrol-info" onChange="this.form.submit()">'
# if selected is true, then folders == true, so make this the selected option
if( selected ):
str += '<option selected value="True">In Folders</option>'
str += '<option value="False">Flat View</option>'
else:
str += '<option value="True">In Folders</option>'
str += '<option selected value="False">Flat View</option>'
str += '</select>'
return str
def SymlinkName(ptype, path, file):
sig_bit=file.replace(path, "")
last_dir=os.path.basename(path[0:-1])