list_sessions.html.twig 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {% import '@ChamiloTheme/Macros/box.html.twig' as macro %}
  2. {% autoescape false %}
  3. {% if not session is empty %}
  4. <div class="grid-session">
  5. {% for item in session %}
  6. {% set image %}
  7. {% if item.category %}
  8. <div class="category" style="background: {{ item.color.color }}; color:{{ item.color.luminosity }}">
  9. {{ item.category.name }}
  10. </div>
  11. {% endif %}
  12. <img src="{{ item.image }}" class="img-fluid">
  13. {% endset %}
  14. {% set title %}
  15. {% if item.show_actions %}
  16. <div class="float-right">
  17. <a class="btn btn-outline-secondary btn-sm" title="{{ "Edit"|get_lang }}" href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ row.id }}">
  18. <i class="fas fa-pencil-alt"></i>
  19. </a>
  20. </div>
  21. {% endif %}
  22. <h5 class="card-title">
  23. <a href="{{ item.url }}" class="" title="{{ item.title }}">{{ item.title }}</a>
  24. </h5>
  25. <div class="card-date d-flex flex-row bd-highlight">
  26. <span class="date px-2 bd-highlight">
  27. <i class="far fa-calendar"></i>
  28. {{ item.date }}
  29. </span>
  30. </div>
  31. <div class="card-details d-flex flex-row bd-highlight mb-3">
  32. <span class="num-users px-2 bd-highlight">
  33. <i class="fas fa-user"></i>
  34. {{ item.num_users }}
  35. </span>
  36. <span class="num-courses px-2 bd-highlight">
  37. <i class="fas fa-book"></i>
  38. {{ item.num_courses }}
  39. </span>
  40. </div>
  41. {#{% if item.description %}
  42. <div class="card-description">
  43. {{ item.description }}
  44. </div>
  45. {% endif %}#}
  46. {% if item.coach_name %}
  47. <div class="card-coach">
  48. {{ item.coach_name }}
  49. </div>
  50. {% endif %}
  51. {% endset %}
  52. {% set content %}
  53. <ul class="list-group list-group-flush">
  54. {% for row in item.courses %}
  55. <li class="list-group-item">
  56. <img src="{{ row.icon }}" width="32px">
  57. <a href="{{ row.link }}">{{ row.name }}</a>
  58. </li>
  59. {% endfor %}
  60. </ul>
  61. {% if item.student_info %}
  62. {% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
  63. <div class="card-report">
  64. <div class="student-info">
  65. {% if (item.student_info.progress is not null) %}
  66. {{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
  67. {% endif %}
  68. {% if (item.student_info.score is not null) %}
  69. {{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
  70. {% endif %}
  71. {% if (item.student_info.certificate is not null) %}
  72. {{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
  73. {% endif %}
  74. </div>
  75. </div>
  76. {% endif %}
  77. {% endif %}
  78. {% endset %}
  79. <div class="item-session">
  80. {{ macro.box_session(item.id, title, content, image) }}
  81. </div>
  82. {% endfor %}
  83. </div>
  84. {% endif %}
  85. {% endautoescape %}