changed Photo class and DB table to be Files, also reflected through templates/files* - files.html is not used yet
This commit is contained in:
27
templates/file_list.html
Normal file
27
templates/file_list.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.html" %} {% block main_content %}
|
||||
<div class="container">
|
||||
<h3 class="offset-lg-2">{{page_title}} -- {{view_path}}</h3>
|
||||
<div class="row">
|
||||
<table class="table table table-sm col-xl-12">
|
||||
<thead><tr class="thead-light"><th>Name</th><th>Size (MB)</th><th>Hash</th></tr></thead><tbody>
|
||||
{% for obj in file_list %}
|
||||
<tr><td>
|
||||
{% if obj.type=="Directory" %}
|
||||
<i class="fas fa-folder"></i>
|
||||
{% elif obj.type=="Image" %}
|
||||
<i class="fas fa-file-image"></i>
|
||||
{% elif obj.type=="Video" %}
|
||||
<i class="fas fa-file-video"></i>
|
||||
{% else %}
|
||||
<i class="fas fa-question-circle"></i>
|
||||
{% endif %}
|
||||
{% if obj.type=="Image" %}
|
||||
<a href="{{symlink}}/{{obj.name}}"><img width="128" height="128" src="data:image/jpeg;base64,{{obj.thumbnail}}"></img></a>
|
||||
{% endif %}
|
||||
{{obj.name}}
|
||||
</td></td><td>{{obj.size_mb}}</td><td>{{obj.hash}}</tr>
|
||||
{% endfor %}
|
||||
</tbody></table>
|
||||
</div class="row">
|
||||
</div class="container">
|
||||
{% endblock main_content %}
|
||||
Reference in New Issue
Block a user