From 4dd5cd2f296d3e9088f5640b2a9b44ad0aae61f2 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Tue, 22 Jun 2021 18:31:57 +1000 Subject: [PATCH] fixed BUG-36: view details showing all entries -- its a bit crap as its only import dir, but its functional again --- BUGs | 1 - templates/file_list.html | 21 ++++++++++++++++++++- templates/files.html | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/BUGs b/BUGs index 60b8e77..bbf0570 100644 --- a/BUGs +++ b/BUGs @@ -2,4 +2,3 @@ BUG-35: when restarting paweb, the symlinks in static/* are missing, so view file (and move/delete) dont work. - suggest the validation code at the start of pa_job_manager, just creates the Symlink, and then remove creation of symlink in Import -- need to consider when someone adds/modifies paths in settings, to revalidate -BUG-36: view details is just doing it for ALL entries, so this needs a how_many / offset or is too SLOW (may in fact need to re-think this whole view - might make more sense to be a toggle on an exising file view, OR, search?) diff --git a/templates/file_list.html b/templates/file_list.html index 7591ef0..d9d0cd3 100644 --- a/templates/file_list.html +++ b/templates/file_list.html @@ -1,9 +1,28 @@ {% extends "base.html" %} {% block main_content %}

{{page_title}}

+
+ + + + + +
+
+ {{CreateSelect( "noo", noo, ["Oldest", "Newest","A to Z", "Z to A"], "$('#offset').val(0)")|safe }} + {{CreateSelect( "how_many", how_many, ["10", "25", "50", "75", "100", "150", "200", "500"])|safe }} +
+
+ +  {{how_many}} files  + +
+
+
+ {% for obj in entry_data %} {% if obj.type.name != "Directory" %} - + {% else %} {% endif %} diff --git a/templates/files.html b/templates/files.html index 89c6ff6..15f103d 100644 --- a/templates/files.html +++ b/templates/files.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block main_content %}
-
+ {% if search_term is defined %}
NameSize (MB)Path PrefixHash
{% if obj.type.name == "Directory" %} @@ -35,7 +54,7 @@ {% endif %} {{obj.file_details.size_mb}}{{obj.in_dir.path_prefix}}{{obj.file_details.hash}}{{obj.file_details.size_mb}}{{obj.in_dir.in_path.path_prefix.replace("static/","")}}/{{obj.in_dir.rel_path}}{{obj.file_details.hash}}