issued.html.twig 6.8 KB

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