Added new Twig filter to sort a collection set.

Only currently used in admin/tree.html.twig but could be used in collection rights.
This commit is contained in:
Benoît Burnichon
2016-03-17 11:20:31 +01:00
parent 817b72c0b0
commit 9313f3da2b
2 changed files with 22 additions and 1 deletions

View File

@@ -166,7 +166,7 @@
</li>
{% endif %}
{% for collection in databox.get_collections() %}
{% for collection in databox.get_collections()|sort_collections %}
{% if (collection.get_base_id() in app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(['canadmin'])|keys
or collection.get_base_id() in app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(['manage'])|keys
or collection.get_base_id() in app.getAclForUser(app.getAuthenticatedUser()).get_granted_base(['modify_struct'])|keys) %}