diff --git a/public/assets/magnetico-web/css/style.css b/public/assets/magnetico-web/css/style.css index 93e308f..e64a6da 100644 --- a/public/assets/magnetico-web/css/style.css +++ b/public/assets/magnetico-web/css/style.css @@ -1,3 +1,3 @@ #content { margin-top: 80px; -} \ No newline at end of file +} diff --git a/templates/sortable_table_macro.html.twig b/templates/sortable_table_macro.html.twig index eb4ff21..8a9f60d 100644 --- a/templates/sortable_table_macro.html.twig +++ b/templates/sortable_table_macro.html.twig @@ -17,14 +17,20 @@ {% set orderBy = app.request.query.get('order-by') %} {% set order = app.request.query.get('order') %} {% for column, property in columns %} + {% set isCurrent = (property == orderBy) %} {% if property is not null %} {{ column | raw }} + 'order': (order and isCurrent) ? ('asc' == order|lower ? 'desc' : 'asc') : 'asc' + }) }}"> + {% if order and isCurrent %} + + {% endif %} + {% if isCurrent %}{% endif %}{{ column | raw }}{% if isCurrent %}{% endif %} + {% else %} {{ column | raw }} {% endif %} diff --git a/templates/torrent_list.html.twig b/templates/torrent_list.html.twig index e858c80..7a7e13e 100644 --- a/templates/torrent_list.html.twig +++ b/templates/torrent_list.html.twig @@ -5,7 +5,7 @@ {{ pagerfanta(torrents) }} - +
{{ sortable.sortable_columns({