issued_all.html.twig 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. {% for badge in user_badges %}
  2. <div class="row issued">
  3. <div class="col-md-5">
  4. <div class="thumbnail">
  5. <figure class="text-center">
  6. <img class="img-fluid center-block" src="{{ badge.issue_info.skill_badge_image }}" alt="{{ badge.issue_info.skill_name }}">
  7. <figcaption>
  8. <p class="lead">{{ badge.issue_info.skill_name }}</p>
  9. {% if badge.issue_info.skill_short_code %}
  10. <p>{{ badge.issue_info.skill_short_code }}</p>
  11. {% endif %}
  12. </figcaption>
  13. </figure>
  14. <div class="caption">
  15. {% if badge.issue_info.skill_description %}
  16. <p>{{ badge.issue_info.skill_description }}</p>
  17. {% endif %}
  18. {% if badge.issue_info.skill_criteria %}
  19. <h3>{{ 'CriteriaToEarnTheBadge'|get_lang }}</h3>
  20. <p>{{ badge.issue_info.skill_criteria }}</p>
  21. {% endif %}
  22. </div>
  23. </div>
  24. {% if badge.allow_download_export %}
  25. {% if badge.badge_error %}
  26. <hr>
  27. <div class="alert alert-danger"> {{ 'BakedBadgeProblem'|get_lang }}</div>
  28. {% else %}
  29. <p class="text-center">
  30. <a href="{{ badge.personal_badge }}" class="btn btn-primary" target="_new" download="badge">
  31. <em class="fa fa-download fa-fw"></em> {{ 'DownloadBadge'|get_lang }}
  32. </a>
  33. </p>
  34. {% endif %}
  35. <hr>
  36. <p class="text-center">
  37. <a href="#" class="btn btn-success" id="badge-export-button-{{ badge.issue_info.id }}">
  38. <em class="fa fa-external-link-square fa-fw"></em> {{ 'ExportBadge'|get_lang }}
  39. </a>
  40. </p>
  41. {% if "display.hide_social_media_links" | api_get_setting == 'false' %}
  42. <div class='col-md-12 text-center'>
  43. <h5><b> {{ 'ShareWithYourFriends' | get_lang }} </b></h5>
  44. <a href="http://www.facebook.com/sharer.php?u={{ _p.web }}badge/{{ badge.issue_info.id }}" target="_new">
  45. <em class='fa fa-facebook-square fa-3x text-info' aria-hidden='true'></em>
  46. </a>
  47. <a href="https://twitter.com/home?status={{ 'IHaveObtainedSkillXOnY' | get_lang |format(skill_info.name, _s.site_name)}} - {{ _p.web }}badge/{{ badge.issue_info.id }}" target="_new">
  48. <em class='fa fa-twitter-square fa-3x text-light' aria-hidden='true'></em>
  49. </a>
  50. </div>
  51. {% endif %}
  52. {% endif %}
  53. </div>
  54. <div class="col-md-7">
  55. <h3>{{ 'RecipientDetails'|get_lang }}</h3>
  56. <p class="lead">{{ badge.issue_info.user_complete_name }}</p>
  57. <h4>{{ 'SkillAcquiredAt'|get_lang }}</h4>
  58. <ul class="fa-ul">
  59. <li>
  60. {% if badge.issue_info.source_name %}
  61. <em class="fa-li fa fa-clock-o fa-fw"></em> {{ 'TimeXThroughCourseY'|get_lang|format(badge.issue_info.datetime, badge.issue_info.source_name) }}
  62. {% else %}
  63. <em class="fa-li fa fa-clock-o fa-fw"></em> {{ badge.issue_info.datetime }}
  64. {% endif %}
  65. {% if badge.issue_info.argumentation %}
  66. {% if badge.issue_info.argumentation %}
  67. <b><p style="font-style: italic;">{{ 'UserXIndicated'|get_lang|format(badge.issue_info.argumentation_author_name) }} </p></b>
  68. {% endif %}
  69. <p>{{ badge.issue_info.argumentation }}</p>
  70. {% endif %}
  71. </li>
  72. </ul>
  73. {% if show_level %}
  74. <h4>{{ 'AcquiredLevel'|get_lang }}</h4>
  75. <ul class="fa-ul">
  76. <li>
  77. <em class="fa-li fa fa-check-circle-o fa-fw"></em> {{ badge.issue_info.acquired_level }}
  78. </li>
  79. </ul>
  80. {% endif %}
  81. {% if badge.allow_comment %}
  82. <hr>
  83. <div class="panel panel-info">
  84. <div class="panel-heading">
  85. <em class="fa fa-check-circle-o fa-fw" aria-hidden="true"></em> {{ 'ChangeAcquiredLevel'|get_lang }}
  86. </div>
  87. <div class="panel-body">
  88. {{ badge.acquired_level_form }}
  89. </div>
  90. </div>
  91. <hr>
  92. <div class="panel panel-info">
  93. <div class="panel-heading">
  94. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em> {{ 'XComments'|get_lang|format(badge.issue_info.comments|length) }}
  95. /
  96. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em> {{ 'AverageRatingX'|get_lang|format(badge.issue_info.feedback_average) }}
  97. </div>
  98. <div class="panel-body">
  99. {{ badge.comment_form }}
  100. <hr>
  101. {% for comment in badge.issue_info.comments %}
  102. <article class="media">
  103. <div class="media-body">
  104. <h4 class="media-heading">{{ comment.giver_complete_name }}</h4>
  105. <p><small>{{ comment.datetime }}</small></p>
  106. <p>{{ comment.text }}</p>
  107. </div>
  108. <div class="media-right text-right">
  109. <div style="width: 80px;">
  110. {% if comment.value %}
  111. <em class="fa fa-certificate fa-fw" aria-label="{{ 'AverageRating' }}"></em>
  112. <span class="sr-only">{{ 'AverageRating' }}</span> {{ comment.value }}
  113. {% endif %}
  114. </div>
  115. </div>
  116. </article>
  117. {% else %}
  118. <p>{{ 'WithoutComment'|get_lang }}</p>
  119. {% endfor %}
  120. </div>
  121. </div>
  122. {% else %}
  123. <hr>
  124. <p class="lead">
  125. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em> {{ 'XComments'|get_lang|format(badge.issue_info.comments|length) }}
  126. /
  127. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em> {{ 'AverageRatingX'|get_lang|format(badge.issue_info.feedback_average) }}
  128. </p>
  129. {% endif %}
  130. </div>
  131. </div>
  132. {% if badge.allow_download_export %}
  133. <script>
  134. $(function () {
  135. $('#badge-export-button-{{ badge.issue_info.id }}').on('click', function (e) {
  136. e.preventDefault();
  137. OpenBadges.issue({{ badge.issue_info.badge_assertion|json_encode() }});
  138. });
  139. });
  140. </script>
  141. {% endif %}
  142. <br />
  143. <br />
  144. {% endfor %}