index.html.twig 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. {% block content %}
  2. {% autoescape false %}
  3. {% if list_not_category|length > 0 and list_in_category|length > 0 %}
  4. <div class="link-page">
  5. <ul class="list-group mb-3">
  6. {% for item in list_not_category %}
  7. <li class="list-group-item">
  8. <h5 class="link-title mb-1">
  9. {{ item.link_validator }}
  10. <a href="{{ item.url }}" class="{{ item.visibility == true ? '' : 'text-muted' }}" target="{{ item.target }}">{{ item.title }}</a>
  11. <div class="toolbar">
  12. <div class="btn-group btn-group-sm">
  13. {{ item.toolbar }}
  14. </div>
  15. </div>
  16. </h5>
  17. {{ item.description }}
  18. </li>
  19. {% endfor %}
  20. </ul>
  21. {% for item in list_in_category %}
  22. <div class="link-accordion accordion" id="accordion_category">
  23. <div class="card">
  24. <h5 class="card-header" id="heading_{{ item.id }}">
  25. <a class="title-card" href="#" data-toggle="collapse" data-target="#collapse_{{ item.id }}" aria-expanded="true" aria-controls="collapse_{{ item.id }}">
  26. {{ item.title }}
  27. </a>
  28. <div class="float-right">
  29. <div class="btn-group btn-group-sm">
  30. {{ item.tools }}
  31. </div>
  32. </div>
  33. </h5>
  34. <div id="collapse_{{ item.id }}" class="collapse show" aria-labelledby="heading_{{ item.id }}" data-parent="#accordion_category">
  35. <div class="card-body">
  36. {{ item.description }}
  37. <ul class="list-group">
  38. {% for row in item.children %}
  39. <li class="list-group-item list-group-item-action">
  40. <h5 class="link-title mb-1">
  41. {{ row.link_validator }}
  42. <a href="{{ row.url }}" class="{{ row.visibility == true ? '' : 'text-muted' }}" target="{{ row.target }}">{{ row.title }}</a>
  43. <div class="toolbar">
  44. <div class="btn-group btn-group-sm">
  45. {{ row.toolbar }}
  46. </div>
  47. </div>
  48. </h5>
  49. {{ row.description }}
  50. </li>
  51. {% endfor %}
  52. </ul>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. {% endfor %}
  58. </div>
  59. {% else %}
  60. <div class="alert alert-info" role="alert">
  61. {{ 'There are no registered links'|trans }}
  62. </div>
  63. {% if is_allowed_to_edit %}
  64. <div id="no-data-view" class="tool-view">
  65. <h2>{{ "Links"|trans }}</h2>
  66. <img src="{{ "links.png"|icon(64) }}" width="64" height="64">
  67. <div class="controls">
  68. <a href="{{ web_self ~ "?" ~ _p.web_cid_query ~ "&action=addlink" }}" class="btn btn-outline-primary">
  69. {{ "Add links"|trans }}
  70. </a>
  71. </div>
  72. </div>
  73. {% endif %}
  74. {% endif %}
  75. {% endautoescape %}
  76. {% endblock %}