now using uselist=False to ensure file_details, dir_details, in_dir are one-to-one, and dont have useless list of 1 element. updated TODO to reflect order of how to tackle change over to paths and dirs
This commit is contained in:
@@ -108,41 +108,41 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if grouping == "Day" %}
|
||||
{% if last.printed != obj.file_details[0].day %}
|
||||
{% if last.printed != obj.file_details.day %}
|
||||
{% if last.printed > 0 %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row pl-3"><h6>Day: {{obj.file_details[0].day}} of {{obj.file_details[0].month}}/{{obj.file_details[0].year}}</h6></div>
|
||||
<div class="row pl-3"><h6>Day: {{obj.file_details.day}} of {{obj.file_details.month}}/{{obj.file_details.year}}</h6></div>
|
||||
<div class="row pl-3">
|
||||
{% set last.printed = obj.file_details[0].day %}
|
||||
{% set last.printed = obj.file_details.day %}
|
||||
{% endif %}
|
||||
{% elif grouping == "Week" %}
|
||||
{% if last.printed != obj.file_details[0].woy %}
|
||||
{% if last.printed != obj.file_details.woy %}
|
||||
{% if last.printed > 0 %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row pl-3"><h6>Week #: {{obj.file_details[0].woy}} of {{obj.file_details[0].year}}</h6></div>
|
||||
<div class="row pl-3"><h6>Week #: {{obj.file_details.woy}} of {{obj.file_details.year}}</h6></div>
|
||||
<div class="row pl-3">
|
||||
{% set last.printed = obj.file_details[0].woy %}
|
||||
{% set last.printed = obj.file_details.woy %}
|
||||
{% endif %}
|
||||
{% elif grouping == "Month" %}
|
||||
{% if last.printed != obj.file_details[0].month %}
|
||||
{% if last.printed != obj.file_details.month %}
|
||||
{% if last.printed > 0 %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row pl-3"><h6>Month: {{obj.file_details[0].month}} of {{obj.file_details[0].year}}</h6></div>
|
||||
<div class="row pl-3"><h6>Month: {{obj.file_details.month}} of {{obj.file_details.year}}</h6></div>
|
||||
<div class="row pl-3">
|
||||
{% set last.printed = obj.file_details[0].month %}
|
||||
{% set last.printed = obj.file_details.month %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if obj.type.name != "Directory" %}
|
||||
{% if (not folders) or ((obj.in_dir[0].path_prefix+'/'+obj.name) | TopLevelFolderOf(cwd)) %}
|
||||
<figure id="{{obj.id}}" img="{{loop.index-1}}" class="figure mx-1" fname="{{obj.name}}" yr="{{obj.file_details[0].year}}" date="{{obj.file_details[0].year}}{{"%02d" % obj.file_details[0].month}}{{"%02d" % obj.file_details[0].day}}" details="{{obj.name}} (Date: {{obj.file_details[0].day}}/{{obj.file_details[0].month}}/{{obj.file_details[0].year}})">
|
||||
{% if (not folders) or ((obj.in_dir.path_prefix+'/'+obj.name) | TopLevelFolderOf(cwd)) %}
|
||||
<figure id="{{obj.id}}" img="{{loop.index-1}}" class="figure mx-1" fname="{{obj.name}}" yr="{{obj.file_details.year}}" date="{{obj.file_details.year}}{{"%02d" % obj.file_details.month}}{{"%02d" % obj.file_details.day}}" details="{{obj.name}} (Date: {{obj.file_details.day}}/{{obj.file_details.month}}/{{obj.file_details.year}})">
|
||||
{% if obj.type.name=="Image" %}
|
||||
<a href="{{obj.in_dir[0].path_prefix}}/{{obj.name}}"><img class="thumb" height="{{size}}" src="data:image/jpeg;base64,{{obj.file_details[0].thumbnail}}"></img></a>
|
||||
<a href="{{obj.in_dir.path_prefix}}/{{obj.name}}"><img class="thumb" height="{{size}}" src="data:image/jpeg;base64,{{obj.file_details.thumbnail}}"></img></a>
|
||||
{% elif obj.type.name == "Video" %}
|
||||
<div style="position:relative; width:100%">
|
||||
<a href="{{obj.in_dir[0].path_prefix}}/{{obj.name}}"><img class="thumb" style="display:block" height="{{size}}" src="data:image/jpeg;base64,{{obj.file_details[0].thumbnail}}"></img></a>
|
||||
<a href="{{obj.in_dir.path_prefix}}/{{obj.name}}"><img class="thumb" style="display:block" height="{{size}}" src="data:image/jpeg;base64,{{obj.file_details.thumbnail}}"></img></a>
|
||||
<div style="position:absolute; top: 2; left: 2;">
|
||||
<i style="font-size:32;background-color:black;color:white" class="fas fa-film"></i>
|
||||
</div>
|
||||
@@ -153,8 +153,8 @@
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if folders %}
|
||||
{% if (cwd != obj.dir_details[0].path_prefix) and (obj.dir_details[0].path_prefix | TopLevelFolderOf(cwd)) %}
|
||||
<figure class="px-1 dir" dir={{obj.dir_details[0].path_prefix}}>
|
||||
{% if (cwd != obj.dir_details.path_prefix) and (obj.dir_details.path_prefix | TopLevelFolderOf(cwd)) %}
|
||||
<figure class="px-1 dir" dir={{obj.dir_details.path_prefix}}>
|
||||
<i style="font-size:{{size|int-22}};" class="fas fa-folder"></i>
|
||||
<figcaption class="figure-caption text-center">{{obj.name}}</figcaption>
|
||||
</figure class="figure">
|
||||
|
||||
Reference in New Issue
Block a user