onecomptoir.html.twig 1.82 KB
Newer Older
Julien Jorry committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<div class="card mb-2">
	<div class="card-header" style='cursor:pointer;'>
		<h2>
			<a href='{{ path('show_comptoir', {'slug': comptoir.slug}) }}'>{{comptoir.name}}</a>
			{% if comptoir.groupe != null %}
				<h5 class="card-subtitle">{{'Groupe local'|trans}} : <a href='{{ path('show_groupe', {'slug': comptoir.groupe.slug}) }}'>{{comptoir.groupe.__toString()}}</a></h5>
			{% endif %}
		</h2>
	</div>
	<div class="card-body">
		{% if comptoir.content != null or comptoir.media != null %}
			<div class="card-text mb-3 clearfix">
				{% if comptoir.media != null %}
		              <img class="w-25 float-right mr-2" src="{% path comptoir.media, 'big' %}" alt="{{comptoir.name}}">
		        {% endif %}
		        {% if comptoir.content != null %}
17
					<p>
18
						{% if comptoir.content|striptags|length < 50 %}
19 20 21 22
							{{ comptoir.content|striptags|raw }}
						{% else %}
							{{ comptoir.content|striptags|truncate(50, true, '...')|raw }}</p>
						{% endif %}
Julien Jorry committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
				{% endif %}
	    	</div>
		{% endif %}
		{% if comptoir.getFullAddresse() != null %}
			<h5 class="card-title">{{ 'Adresse'|trans }} :</h5>
			<h6 class="card-title text-muted mb-3">{{comptoir.getFullAddresse()}}</h6>
			{# @TODO : afficher la carte avec le POI du comptoir #}
		{% endif %}
		{% if comptoir.contacts|length > 0%}
			<h5 class="card-title">{{ 'Contact'|trans }}{{ (comptoir.contacts|filter(v => v.enabled)|length > 1) ? 's' : '' }} :</h5>
          <ul class="list-group">
            {% for contact in comptoir.contacts|filter(v => v.enabled) %}
	            <li class="list-group-item">
	              <b>{{contact.name}}</b><br/>
	              {% if contact.tel != null %}{{contact.tel}}<br/>{% endif %}
	              {% if contact.email != null %}{{contact.email}}{% endif %}
	            </li>
            {% endfor %}
          </ul>
        {% endif %}
    </div>
</div>