first cut of paths actually working with folder viewing - for now defaulting on for both Storage only

This commit is contained in:
2021-05-01 18:16:45 +10:00
parent b6b98ae5ca
commit 5e03650ed5
5 changed files with 65 additions and 38 deletions

View File

@@ -104,11 +104,6 @@
{% endif %}
{% for obj in entry_data %}
{% if loop.index==1 and folders %}
{% if obj.type.name != "Directory" %}
{% set root=obj.in_dir.in_path.path_prefix %}
{% else %}
{% set root=obj.dir_details.in_path.path_prefix %}
{% endif %}
{% if cwd != root %}
<figure class="px-1 dir" dir={{cwd|ParentPath}}>
<span style="font-size:{{(size|int-22)/2}}" class="fa-stack">
@@ -165,9 +160,14 @@
{% endif %}
{% else %}
{% if folders %}
{# if not the top-level of the path and it is a top-level folder, then display a folder icon #}
{% if (cwd != obj.dir_details.in_path.path_prefix or obj.dir_details.rel_path|length > 0) and ((obj.dir_details.in_path.path_prefix+'/'+obj.dir_details.rel_path) | TopLevelFolderOf(cwd)) %}
<figure class="px-1 dir" dir={{obj.dir_details.in_path.path_prefix+'/'+obj.dir_details.rel_path}}>
{% if obj.dir_details.rel_path | length %}
{% set dirname=obj.dir_details.in_path.path_prefix+'/'+obj.dir_details.rel_path %}
{% else %}
{% set dirname=obj.dir_details.in_path.path_prefix %}
{% endif %}
{# if this dir is the toplevel of the cwd, show the folder icon #}
{% if dirname| TopLevelFolderOf(cwd) %}
<figure class="px-1 dir" dir={{dirname}}>
<i style="font-size:{{size|int-22}};" class="fas fa-folder"></i>
<figcaption class="figure-caption text-center">{{obj.name}}</figcaption>
</figure class="figure">