add year as path preprend for storage suggestion

This commit is contained in:
2021-02-09 19:36:56 +11:00
parent 893d48c8d5
commit b168b0c77b

View File

@@ -111,7 +111,7 @@
{% endif %}
{% endif %}
{% if obj.type.name != "Directory" %}
<figure id="{{obj.id}}" img="{{loop.index-1}}" class="figure mx-1" fname="{{obj.name}}" 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}})">
<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 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>
{% elif obj.type.name == "Video" %}
@@ -138,7 +138,8 @@ function GetSelnAsDiv()
{
seln=''
$('.highlight').each(function( index ) {
seln+='<div fname="' + $(this).attr('fname') + '" date="' + $(this).attr('date') +
seln+='<div fname="' + $(this).attr('fname') + '" yr="' + $(this).attr('yr') +
'" date="' + $(this).attr('date') +
'" class="px-1 mx-1">' + $(this).children().html() + '</div>'
} )
return '<div class="row col-lg-12">'+seln+'</div>'
@@ -170,13 +171,14 @@ function MoveDBox()
<p class="col">Moving the following files?</p>
</div>`
div+=GetSelnAsDiv()
yr=$('.highlight').first().attr('yr')
dt=$('.highlight').first().attr('date')
div+=`
<form class="form form-control-inline col-lg-12" method="POST" action="/move_files">
<div class="input-group col-lg-12">
<input type="text" name="prefix" class="input-group-prepend col-lg-2 form-control-plaintext text-right" value="To:
`
div+=dt+"-"
div+=yr+'/'+dt+"-"
div+=`"></input>
<input type="text" name="suffix" class="col-lg-3 form-control" placeholder="name"> </input>
</div>