{% extends "base.html" %} {% block main_content %}
{% if search_term is defined %} {% endif %}
{% if OPT.folders %}
{% if "files_ip" in request.url %} {% set tmp_path=OPT.cwd | replace( "static/Import", "" ) + "/" %} {% elif "files_sp" in request.url %} {% set tmp_path=OPT.cwd | replace( "static/Storage", "" ) + "/" %} {% elif "files_rbp" in request.url %} {% set tmp_path=OPT.cwd | replace( "static/Bin", "" ) + "/" %} {% endif %} {{tmp_path}}
{% endif %}
{{CreateSelect( "noo", OPT.noo, ["Oldest", "Newest","A to Z", "Z to A"], "$('#offset').val(0)", "rounded-start py-2")|safe }} {{CreateSelect( "how_many", OPT.how_many|string, ["10", "25", "50", "75", "100", "150", "200", "500"])|safe }} {% if OPT.folders %} {{CreateFoldersSelect( OPT.folders, "rounded-end" )|safe }} {% else %} {{CreateFoldersSelect( OPT.folders )|safe }} grouped by: {{CreateSelect( "grouping", OPT.grouping, ["None", "Day", "Week", "Month"], "", "rounded-end")|safe }} {% endif %}
{% if search_term is defined %}
Searched for: '{{search_term}}'
{% endif %}
 {{OPT.how_many}} files  {% set nxt_disabled="" %} {% if entry_data and entry_data|length < OPT.how_many|int %} {% set nxt_disabled="disabled" %} {% endif %} {% if "files_rbp" in request.url %}
{% if OPT.size == 64 %} {% set bt="btn-info text-white" %} {% else %} {% set bt="btn-outline-info" %} {% endif %} {% if OPT.size == 96 %} {% set bt="btn-info text-white" %} {% else %} {% set bt="btn-outline-info" %} {% endif %} {% if OPT.size == 128 %} {% set bt="btn-info text-white" %} {% else %} {% set bt="btn-outline-info" %} {% endif %} {% if OPT.size == 192 %} {% set bt="btn-info text-white" %} {% else %} {% set bt="btn-outline-info" %} {% endif %} {% if OPT.size == 256 %} {% set bt="btn-info text-white" %} {% else %} {% set bt="btn-outline-info" %} {% endif %}
{% set eids=namespace( str="" ) %} {# gather all the file eids and collect them in case we go gallery mode #} {% for obj in entry_data %} {% if obj.type.name != "Directory" %} {% set eids.str = eids.str + obj.id|string +"," %} {% endif %} {% endfor %}
{% set ecnt=namespace( val=0 ) %}
{% set last = namespace(printed=0) %} {# rare event of empty folder, still need to show back button #} {% if OPT.folders and entry_data|length == 0 %} {% if OPT.cwd != OPT.root %}
Back
{% set ecnt.val=ecnt.val+1 %} {% else %}
{% endif %} {% endif %} {% if not entry_data %} No matches for: '{{search_term}}' {% endif %} {% for obj in entry_data %} {% if loop.index==1 and OPT.folders %} {% if OPT.cwd != OPT.root %}
Back
{% set ecnt.val=ecnt.val+1 %} {% else %} {# create an even lighter-grey, unclickable back button - so folders dont jump around when you go into them #}
{% endif %} {% endif %} {% if not OPT.folders and obj.type.name == "Directory" %} {% continue %} {% endif %} {% if OPT.grouping == "Day" %} {% if last.printed != obj.file_details.day %}
Day: {{obj.file_details.day}} of {{obj.file_details.month}}/{{obj.file_details.year}}
{% set last.printed = obj.file_details.day %} {% endif %} {% elif OPT.grouping == "Week" %} {% if last.printed != obj.file_details.woy %}
Week #: {{obj.file_details.woy}} of {{obj.file_details.year}}
{% set last.printed = obj.file_details.woy %} {% endif %} {% elif OPT.grouping == "Month" %} {% if last.printed != obj.file_details.month %}
Month: {{obj.file_details.month}} of {{obj.file_details.year}}
{% set last.printed = obj.file_details.month %} {% endif %} {% endif %} {% if obj.type.name == "Image" or obj.type.name == "Video" or obj.type.name == "Unknown" %} {% if (not OPT.folders) or ((obj.in_dir.in_path.path_prefix+'/'+obj.in_dir.rel_path+'/'+obj.name) | TopLevelFolderOf(OPT.cwd)) %}
{% if obj.type.name=="Image" or obj.type.name=="Unknown" %}
{% if obj.file_details.thumbnail %} {{obj.name}} {% else %} {% endif %} {% if search_term is defined %}
{% endif %}
{% elif obj.type.name == "Video" %}
{% if obj.file_details.thumbnail %} {{obj.name}} {% else %} {% endif %}
{% if search_term is defined %}
{% endif %}
{% endif %}
{% set ecnt.val=ecnt.val+1 %} {% endif %} {% elif obj.type.name == "Directory" %} {% if OPT.folders %} {% 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(OPT.cwd) %}
{{obj.name}}
{% set ecnt.val=ecnt.val+1 %} {% endif %} {% endif %} {% endif %} {% endfor %}
{% endblock main_content %} {% block script_content %} {% endblock script_content %}