Skip to content

Commit

Permalink
Added archive list to utility
Browse files Browse the repository at this point in the history
  • Loading branch information
Mosnar committed Nov 26, 2018
1 parent 8e6d774 commit e4a155c
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions src/templates/_components/utilities/CompressUtility_content.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
{# @var craft \craft\web\twig\variables\CraftVariable #}

{% set archives = craft.compress.archives() %}
{% for archive in archives %}
{{ archive.id }}
{% endfor %}
<div class="readable">
<table class="data fullwidth fixed-layout">
<thead>
<tr>
<th>Archive ID</th>
<th>Asset</th>
<th>Date Created</th>
<th>Date Updated</th>
</tr>
</thead>
<tbody>

{% for item in archives %}
<tr>
<td>{{ item.id }}</td>
<td>{% if item.getAsset() %}{{ item.getAsset().title }}{% else %}Not Ready{% endif %}</td>
<td>{{ item.dateCreated|date('d/m/Y H:i:s') }}</td>
<td>{{ item.dateUpdated|date('d/m/Y H:i:s') }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

0 comments on commit e4a155c

Please sign in to comment.