Example #1
0
def getEditFolderPage(
    user,
    folder,
    parent,
    files,
    is_empty,
    errors=None,
    title="",
    description="",
    messages=None,
    admin_context="",
    gallery_context="",
):
    editfolder = Template(name="templates.editfolder")
    editfolder.user = user
    if folder:
        editfolder.folder = folder.replace("\\", "/")
        editfolder.folder_name = path.basename(folder)
    else:
        editfolder.folder = ""
        editfolder.folder_name = ""
    editfolder.files = files
    editfolder.parent = parent
    editfolder.errors = errors
    editfolder.messages = messages
    editfolder.is_empty = is_empty
    editfolder.description = description
    editfolder.title = title
    editfolder.admin_context = admin_context
    editfolder.gallery_context = gallery_context

    return editfolder.serialize(output="html")