install app files for djangocms-file==2.0.2

standalone
Simon Caminada 8 years ago
parent 7f59823ff7
commit 65ae889cc0

@ -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 %}

@ -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 %}
Loading…
Cancel
Save