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

@@ -10,29 +10,38 @@
<div class="container-fluid">
<form id="main_form" method="POST"">
<input type="hidden" name="folders" id="folders" value="{{folders}}">
<input type="hidden" name="cwd" id="cwd" value="{{cwd}}">
{% if search_term is defined %}
<input type="hidden" name="term" id="view_term" value="{{search_term}}">
{% endif %}
<div class="row">
{% if "files_ip" in request.url %}
I
{% elif "files_sp" in request.url %}
S
{% else %}
R
{% endif %}
{% if folders %}
<div class="my-auto">
<span class="alert alert-primary">In: {{cwd}}</span>
<div class="mx-3 my-auto">
<span class="alert alert-primary">
{% if "files_ip" in request.url %}
<i class="fas fa-file-upload"></i>
{% set tmp_path=cwd | replace( "static/Import", "" ) + "/" %}
{% elif "files_sp" in request.url %}
<i class="fas fa-database"></i>
{% set tmp_path=cwd | replace( "static/Storage", "" ) + "/" %}
{% else %}
<i class="fas fa-trash-alt"></i>
{% set tmp_path=cwd | replace( "static/Bin", "" ) + "/" %}
{% endif %}
In: {{tmp_path}}</span>
</div class="col my-auto">
{% endif %}
<div class="input-group col-lg-4">
{{CreateSelect( "noo", noo, ["Oldest", "Newest"], "$('#offset').val(0)")|safe }}
{{CreateSelect( "how_many", how_many, ["10", "25", "50", "75", "100", "150", "200", "500"])|safe }}
<span style="border:0" class="sm-txt my-auto h-100 btn btn-outline-info disabled">grouped by:</span>
{{CreateSelect( "grouping", grouping, ["None", "Day", "Week", "Month"])|safe }}
{% if folders %}
<input type="hidden" name="grouping" id="grouping" value="{{grouping}}">
{{CreateFoldersSelect( folders )|safe }}
{% else %}
{{CreateFoldersSelect( folders )|safe }}
<span style="border:0" class="sm-txt my-auto h-100 btn btn-outline-info disabled">grouped by:</span>
{{CreateSelect( "grouping", grouping, ["None", "Day", "Week", "Month"])|safe }}
{% endif %}
</div class="input-group">
{% if search_term is defined %}
<div class="col my-auto">
@@ -114,6 +123,9 @@
</figure class="figure">
{% endif %}
{% endif %}
{% if not folders and obj.type.name == "Directory" %}
{% continue %}
{% endif %}
{% if grouping == "Day" %}
{% if last.printed != obj.file_details.day %}
{% if last.printed > 0 %}