course_catalog.html.twig 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {% import "@ChamiloTheme/Macros/box.html.twig" as macro %}
  2. {% autoescape false %}
  3. <div class="catalog" style="width: 100%;">
  4. <h2>{{ 'Course Catalog'|get_lang }}</h2>
  5. <div class="search">
  6. <div class="row">
  7. <div class="col-md-6">
  8. {{ select }}
  9. </div>
  10. <div class="col-md-6">
  11. {{ search }}
  12. </div>
  13. </div>
  14. </div>
  15. <div class="list-course">
  16. {% for item in courses %}
  17. <div class="item-course">
  18. {% set image %}
  19. {% if item.category != '' %}
  20. <div class="category">
  21. {{ item.category }}
  22. </div>
  23. {% endif %}
  24. <a href="{{ item.url }}" title="{{ item.title }}">
  25. <img class="card-img-top" alt="{{ item.title }}" src="{{ item.image }}" data-holder-rendered="true" style="width: 100%; display: block;">
  26. </a>
  27. <div class="card-tools">
  28. {{ item.description_ajax }}
  29. </div>
  30. {% endset %}
  31. {% set content %}
  32. <div class="card-title">
  33. <h5 class="title">
  34. <a title="{{ item.title }}" href="{{ item.url }}">{{ item.title}}</a>
  35. </h5>
  36. </div>
  37. <div class="card-author mb-2">
  38. <i class="fa fa-graduation-cap" aria-hidden="true"></i>
  39. {% if item.teachers | length >= 3 %}
  40. <a id="plist-{{ loop.index }}" data-trigger="focus" tabindex="0" role="button" class="list-name" data-toggle="popover" title="{{ 'CourseTeachers' | trans }}" data-html="true">
  41. {{ 'Course Teachers' | trans }}
  42. </a>
  43. <div id="popover-content-plist-{{ loop.index }}" style="display: none;">
  44. {% for teacher in item.teachers %}
  45. <div class="popover-teacher">
  46. <a href="{{ teacher.url }}" class="ajax name" data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
  47. {{ teacher.firstname }} {{ teacher.lastname }}
  48. </a>
  49. </div>
  50. {% endfor %}
  51. </div>
  52. {% else %}
  53. {% for teacher in item.teachers %}
  54. <a href="{{ teacher.url }}" class="ajax name" data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
  55. {{ teacher.firstname }} {{ teacher.lastname }}
  56. </a>
  57. {% endfor %}
  58. {% endif %}
  59. </div>
  60. {% if item.ranking %}
  61. <div class="ranking">
  62. {{ item.ranking }}
  63. </div>
  64. {% endif %}
  65. {% endset %}
  66. {{ macro.panel_course(item.id, '', content, '', '', '', image) }}
  67. </div>
  68. {% endfor %}
  69. </div>
  70. {{ pagination }}
  71. </div>
  72. {% endautoescape %}