forked from TagesschuleElementa/www.tagesschule-elementa.ch
install app files for djangocms-file==2.0.2
This commit is contained in:
0
templates/djangocms_file/default/.aldryn-folder
Normal file
0
templates/djangocms_file/default/.aldryn-folder
Normal file
26
templates/djangocms_file/default/file.html
Normal file
26
templates/djangocms_file/default/file.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<a href="{{ instance.file_src.url }}"
|
||||
{% if instance.link_target %} target="{{ instance.link_target }}"{% endif %}
|
||||
{% if instance.link_title %} title="{{ instance.link_title }}"{% endif %}
|
||||
{{ instance.attributes_str }}>
|
||||
{% if instance.file_name %}
|
||||
{{ instance.file_name }}
|
||||
{% else %}
|
||||
{{ instance.file_src.label }}
|
||||
{% endif %}
|
||||
{% if instance.show_file_size %}
|
||||
<span>{{ instance.file_src.size|filesizeformat }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
{% comment %}
|
||||
# https://github.com/divio/django-filer/blob/master/filer/models/filemodels.py
|
||||
{{ instance.file_src }}
|
||||
{{ instance.file_src.extension }}
|
||||
# Available variables:
|
||||
{{ instance.template }}
|
||||
{{ instance.file_name }}
|
||||
{{ instance.link_target }}
|
||||
{{ instance.link_title }}
|
||||
{{ instance.show_file_size }}
|
||||
{{ instance.attributes_str }}
|
||||
{% endcomment %}
|
||||
26
templates/djangocms_file/default/folder.html
Normal file
26
templates/djangocms_file/default/folder.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% load i18n %}
|
||||
|
||||
{% for file in folder_files %}
|
||||
<a href="{{ file.url }}"
|
||||
{% if instance.link_target %} target="{{ instance.link_target }}"{% endif %}
|
||||
{{ instance.attributes_str }}>
|
||||
{{ file }}
|
||||
{% if instance.show_file_size %}
|
||||
<span>{{ file.size|filesizeformat }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% if not forloop.last %}<br>{% endif %}
|
||||
{% empty %}
|
||||
<p>{% trans "No files were found in the specified folder." %}</p>
|
||||
{% endfor %}
|
||||
|
||||
{% comment %}
|
||||
# https://github.com/divio/django-filer/blob/master/filer/models/filemodels.py
|
||||
{{ instance.folder_src }}
|
||||
{{ instance.get_files }} or {{ folder_files }}
|
||||
# Available variables:
|
||||
{{ instance.template }}
|
||||
{{ instance.link_target }}
|
||||
{{ instance.show_file_size }}
|
||||
{{ instance.attributes_str }}
|
||||
{% endcomment %}
|
||||
Reference in New Issue
Block a user