KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

manage_aggregates.twig 3.8KB

9 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {% extends "layout.twig" %}
  2. {% block title %}${ "Manage Aggregates" | translate("aggregator") }{% endblock %}
  3. {% block content %}
  4. <table border="0" cellspacing="0" cellpadding="0" class="wide">
  5. <thead>
  6. <tr class="head">
  7. <th>${ "Name" | translate("aggregator") }</th>
  8. <th>${ "Feather" | translate("aggregator") }</th>
  9. <th>${ "Author" | translate("aggregator") }</th>
  10. <th>${ "Last Update" | translate("aggregator") }</th>
  11. ${ trigger.call("manage_aggregates_column_header") }
  12. <th colspan="2">${ "Controls" | translate }</th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. {% for aggregate in aggregates.paginated %}
  17. <tr class="aggregate {% if loop.last %} last{% endif %}">
  18. <td class="main">$aggregate.name <span class="sub">(<a href="$aggregate.url">${ "source" | translate("aggregator") }</a>)</a></td>
  19. <td>${ aggregate.feather | capitalize }</td>
  20. <td>${ aggregate.user.full_name | fallback(aggregate.user.login) }</td>
  21. <td>{% if aggregate.last_updated %}${ aggregate.last_updated | strftime }{% else %}<span class="sub">${ "never" | translate }</span>{% endif %}</td>
  22. ${ trigger.call("manage_aggregates_column", aggregate) }
  23. {% if visitor.group.can("edit_aggregate", "delete_aggregate", true) %}
  24. <td class="controls"><a href="{% admin "edit_aggregate&id=" ~ (aggregate.name | urlencode) %}" class="edit_link"><img src="$theme_url/images/icons/edit.png" alt="edit" /> ${ "edit" | translate }</a></td>
  25. <td class="controls"><a href="{% admin "delete_aggregate&id=" ~ (aggregate.name | urlencode) %}" class="delete_link"><img src="$theme_url/images/icons/delete.png" alt="delete" /> ${ "delete" | translate }</a></td>
  26. {% elseif visitor.group.can("edit_aggregate", "delete_aggregate") %}
  27. {% if visitor.group.can("edit_aggregate") %}
  28. <td class="controls" colspan="2"><a href="{% admin "edit_aggregate&id=" ~ (aggregate.name | urlencode) %}" class="edit_link"><img src="$theme_url/images/icons/edit.png" alt="edit" /> ${ "edit" | translate }</a></td>
  29. {% endif %}
  30. {% if visitor.group.can("delete_aggregate") %}
  31. <td class="controls" colspan="2"><a href="{% admin "delete_aggregate&id=" ~ (aggregate.name | urlencode) %}" class="delete_link"><img src="$theme_url/images/icons/delete.png" alt="delete" /> ${ "delete" | translate }</a></td>
  32. {% endif %}
  33. {% endif %}
  34. </tr>
  35. {% else %}
  36. <tr class="last">
  37. <td colspan="6" class="center"><span class="sub">${ "(none)" | translate }</span></td>
  38. </tr>
  39. {% endfor %}
  40. </tbody>
  41. </table>
  42. {% if aggregates.paginated and aggregates.pages > 1 %}
  43. <br />
  44. <div class="pagination">
  45. $aggregates.next_link
  46. $aggregates.prev_link
  47. <span class="pages">${ "Page %d of %d" | translate | format(aggregates.page, aggregates.pages) }</span>
  48. </div>
  49. {% endif %}
  50. {% if visitor.group.can("add_aggregate") %}
  51. <br />
  52. <a href="{% admin "new_aggregate" %}" class="button yay right">
  53. <img src="$theme_url/images/icons/add.png" alt="add" /> ${ "Add Aggregate" | translate("aggregator") }
  54. </a>
  55. <div class="clear"></div>
  56. {% endif %}
  57. {% endblock %}