Created
May 26, 2015 09:10
-
-
Save alborq/0fabef8531d5328b3edb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{% for item in appliControle %} | |
{% set htmlFile = "" %} | |
{% set isPerime = false %} | |
{% for file in item.DataFileNeeded %} | |
{% set htmlFile = htmlFile~ "<li>" %} | |
{% set htmlFile = htmlFile~ file.name %} | |
{% if file.lastUpdate.date|date('Y-m-d') == "now"|date('Y-m-d') %} | |
{% set htmlFile = htmlFile~ '<span class="uk-badge uk-badge-success uk-float-right">Récent</span>' %} | |
{% elseif file.lastUpdate.date|date('Y-m-d') < "now"|date_modify('-2 Day')|date('Y-m-d') %} | |
{% set htmlFile = htmlFile~ '<span class="uk-badge uk-badge-danger uk-float-right">Périmé</span>' %} | |
{% set isPerime = true %} | |
{% else %} | |
{% set htmlFile = htmlFile~ '<span class="uk-badge uk-badge-warning uk-float-right">Ancien</span>' %} | |
{% endif %} | |
{% set htmlFile = htmlFile~ "</li>" %} | |
{% endfor %} | |
<h3 class="uk-accordion-title"> | |
<input type="checkbox"> | |
{{ item.nomAppli }} | |
{% if isPerime %} | |
<span style="margin:4px !important;" class="uk-badge uk-badge-success uk-align-right">Donnée disponible</span> | |
{% else %} | |
<span style="margin:4px !important;" class="uk-badge uk-badge-success uk-align-right">Donnée disponible</span> | |
{% endif %} | |
</h3> | |
<div class="uk-accordion-content"> | |
<ul class="uk-list uk-list-line"> | |
{{ htmlFile|raw }} | |
</ul> | |
</div> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment