Commit 86949f59 by Julien Jorry

Fix issue with image in template

parent 8ac17546
......@@ -8,7 +8,7 @@
<div class="card-text">
{% if news.media %}
{% set pathMedia = mediaurl(news.media, 'reference') %}
{% if pathMedia ends with '.jpg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %}
{% if pathMedia ends with '.jpg' or pathMedia ends with '.jpeg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %}
<img src="{% path news.media, 'reference' %}" style="max-width: 100%;"/>
{% else %}
<a href="{% path news.media, 'reference' %}">{{'Télécharger'|trans}}</a>
......
......@@ -11,7 +11,7 @@
<div class="card-text">
{% if new.media %}
{% set pathMedia = mediaurl(new.media, 'reference') %}
{% if pathMedia ends with '.jpg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %}
{% if pathMedia ends with '.jpg' or pathMedia ends with '.jpeg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %}
<img src="{% path new.media, 'reference' %}" style="max-width: 100%;"/>
{% else %}
<a href="{% path new.media, 'reference' %}">{{ 'Télécharger'|trans }}</a>
......
......@@ -9,7 +9,7 @@
<div class="card-text">
{% if news.media %}
{% set pathMedia = mediaurl(news.media, 'reference') %}
{% if pathMedia ends with '.jpg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %}
{% if pathMedia ends with '.jpg' or pathMedia ends with '.jpeg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %}
<img src="{% path news.media, 'reference' %}" style="max-width: 100%;"/>
{% else %}
<a href="{% path news.media, 'reference' %}">{{'Télécharger'|trans}}</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment