-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renaming of the created filters to be more understandable ('gogo_*' instead of 'gogo*') New filters gogo_taxonomy and gogo_textarea (it truncades long texts and add a button 'Show more/less') Filters can use JS functions added to the template context ____________________________________________________________________________ Renommage des filtres créés pour être plus intelligible ('gogo_*' au lieu de 'gogo*') Nouveaux filtres pour gogo_taxonomy et gogo_textarea (il tronque les textes longs et ajoute un bouton 'Afficher plus/moins') Les filtres peuvent utiliser des fonctions JS ajoutées au contexte du template
- Loading branch information
Showing
13 changed files
with
61 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,55 @@ | ||
{% set here = "components/element/" %} | ||
{# -------------- #} | ||
{# BODY DEFAULT #} | ||
{# -------------- #} | ||
{% set longDescription = element.getProperty('longDescription') %} | ||
{% if longDescription %} | ||
<div class="section row sectionlongDescription" style="padding-bottom:0"> | ||
<div class="col s12 description long-descrition"> | ||
<span>{{ longDescription|safe }}</span> | ||
{% if element.longDescriptionMore %} | ||
<span style="display:none" class="description-more">{{ element.longDescriptionMore|safe }}</span> | ||
<a class="show-more-description">Afficher plus</a> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
{{ element.getProperty('longDescription')|gogo_textarea(truncate = 40) }} | ||
|
||
{# Contact infos #} | ||
{{ 'Informations générales'|gogotitle }} | ||
{{ 'Informations générales'|gogo_title }} | ||
|
||
{# Address #} | ||
{{ element.getProperty('address')|gogotext }} | ||
{{ element.getProperty('address')|gogo_text }} | ||
|
||
{# Tel #} | ||
{{ element.getProperty('telephone')|gogotext }} | ||
{{ element.getProperty('telephone')|gogo_text }} | ||
|
||
{# Mail #} | ||
{{ element.getProperty('email')|gogoemail(isPending = element.isPending()) }} | ||
{{ element.getProperty('email')|gogo_email(isPending = element.isPending()) }} | ||
|
||
{# WebSite #} | ||
{{ element.getProperty('website')|gogourl }} | ||
{{ element.getProperty('website')|gogo_url }} | ||
|
||
{% set urls = element.urls %} | ||
{% if urls %} | ||
{% for currentUrl in urls %} | ||
{{ url.value|gogourl }} | ||
{{ url.value|gogo_url }} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{{ ''|gogoseparator }} | ||
{{ ''|gogo_separator }} | ||
|
||
{# Categories #} | ||
<div class="field field-taxonomy"> | ||
{% import here ~ 'category-value.html.njk' as categoryRenderer %} | ||
{% for mainCategoryValue in rootCategoriesValues %} | ||
{{ categoryRenderer.renderCategoryValue(mainCategoryValue) }} | ||
{% endfor %} | ||
</div> | ||
{{ element.getProperty('rootCategoriesValues')|gogo_taxonomy }} | ||
|
||
{{ element.getProperty('tags')|gogotags}} | ||
{{ element.getProperty('tags')|gogo_tags}} | ||
|
||
{% if element.getProperty('commitment') %} | ||
{{ ''|gogoseparator }} | ||
{{ 'Engagement Citoyen'|gogotitle }} | ||
{{ element.getProperty('commitment')|gogotext }} | ||
{{ ''|gogo_separator }} | ||
{{ 'Engagement Citoyen'|gogo_title }} | ||
{{ element.getProperty('commitment')|gogo_text }} | ||
{% endif %} | ||
|
||
{# Open Hours #} | ||
{% if element.formatedOpenHours|length or element.getProperty('openHoursMoreInfos') %} | ||
{{ ''|gogoseparator }} | ||
{{ "Horaires d'ouverture"|gogotitle }} | ||
{{ element.formatedOpenHours|gogoopenhours }} | ||
{{ element.getProperty('openHoursMoreInfos')|gogootext }} | ||
{{ ''|gogo_separator }} | ||
{{ "Horaires d'ouverture"|gogo_title }} | ||
{{ element.formatedOpenHours|gogo_openhours }} | ||
{{ element.getProperty('openHoursMoreInfos')|gogo_text }} | ||
{% endif %} | ||
|
||
{# Vidéo #} | ||
{% if element.getProperty('vimeoId') %} | ||
{{ ''|gogoseparator }} | ||
{{ 'Video'|gogotitle }} | ||
{{ element.getProperty('vimeoId')|gogovimeo }} | ||
{{ ''|gogo_separator }} | ||
{{ 'Video'|gogo_title }} | ||
{{ element.getProperty('vimeoId')|gogo_vimeo }} | ||
{% endif %} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
src/views/components/element/element-filters/gogo_taxonomy.html.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="field field-taxonomy"> | ||
{% import 'components/element/category-value.html.njk' as categoryRenderer %} | ||
{% for mainCategoryValue in value %} | ||
{{ categoryRenderer.renderCategoryValue(mainCategoryValue) }} | ||
{% endfor %} | ||
</div> |
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
src/views/components/element/element-filters/gogo_textarea.html.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% if value %} | ||
{% set longText = splitLongText(value, truncate, 20) %} | ||
<div class="section row sectionlongDescription" style="padding-bottom:0"> | ||
<div class="col s12 description long-descrition"> | ||
<span>{{ longText.first|safe }}</span> | ||
{% if longText.second %} | ||
<span style="display:none" class="description-more">{{ longText.second|safe }}</span> | ||
<a class="show-more-description">Afficher plus</a> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endif %} |
File renamed without changes.
File renamed without changes.
File renamed without changes.