pending.html.twig 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <div class="media">
  2. <div class="media-left">
  3. <a href="#">
  4. <img class="media-object" src="{{ user_avatar }}" alt="{{ user.completeName }}">
  5. </a>
  6. </div>
  7. <div class="media-body">
  8. <h3 class="media-heading">{{ user.completeName }}</h3>
  9. <p>{{ user.username }}</p>
  10. </div>
  11. </div>
  12. <br>
  13. {% for survey in surveys %}
  14. {% set course_code = survey.course ? survey.course.code : '' %}
  15. {% set session_id = survey.session ? survey.session.id : 0 %}
  16. <div class="panel panel-default">
  17. <div class="panel-body">
  18. <div>
  19. <a href="{{ _p.web_main ~ 'survey/fillsurvey.php?' ~ {'course': course_code, 'invitationcode': survey.invitation_code, 'cidReq': course_code, 'id_session': session_id}|url_encode }}">
  20. {{ survey.title }}
  21. </a>
  22. </div>
  23. <ul class="list-inline">
  24. {% if survey.course %}
  25. <li>
  26. <span class="label" style="background-color: {{ survey.session ? '#00496D' : '#458B00' }}">
  27. {{ survey.course.title }}
  28. {% if survey.session %}
  29. ({{ survey.session.name }})
  30. {% endif %}
  31. </span>
  32. </li>
  33. {% endif %}
  34. <li>
  35. {{ 'FromDateXToDateY'|get_lang|format(survey.avail_from|api_convert_and_format_date(2), survey.avail_till|api_convert_and_format_date(2)) }}
  36. </li>
  37. </ul>
  38. </div>
  39. </div>
  40. {% else %}
  41. <div class="alert alert-info">
  42. {{ 'NoPendingSurveys'|get_lang }}
  43. </div>
  44. {% endfor %}