issued_all.tpl 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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-responsive 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 not 'hide_social_media_links'|api_get_configuration_value %}
  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(badge.issue_info.skill_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. <h5>{{ 'RecipientDetails'|get_lang }}</h5>
  56. <p class="lead">{{ badge.issue_info.user_complete_name }}</p>
  57. <h4 class="bage-username">{{ 'SkillAcquiredAt'|get_lang }}</h4>
  58. <ul class="fa-ul">
  59. <li class="badge-item">
  60. {% if badge.issue_info.source_name %}
  61. <em class="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 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. <br>
  68. <p>{{ 'UserXIndicated'|get_lang|format(badge.issue_info.argumentation_author_name) }} </p>
  69. {% endif %}
  70. <p class="msg">{{ badge.issue_info.argumentation }}</p>
  71. {% endif %}
  72. </li>
  73. </ul>
  74. {% if show_level %}
  75. <h4>{{ 'AcquiredLevel'|get_lang }}</h4>
  76. <ul class="fa-ul">
  77. <li>
  78. <em class="fa-li fa fa-check-circle-o fa-fw"></em> {{ badge.issue_info.acquired_level }}
  79. </li>
  80. </ul>
  81. {% endif %}
  82. {% if badge.allow_comment %}
  83. <hr>
  84. <div class="panel panel-info">
  85. <div class="panel-heading">
  86. <em class="fa fa-check-circle-o fa-fw" aria-hidden="true"></em> {{ 'ChangeAcquiredLevel'|get_lang }}
  87. </div>
  88. <div class="panel-body">
  89. {{ badge.acquired_level_form }}
  90. </div>
  91. </div>
  92. <hr>
  93. <div class="panel panel-info">
  94. <div class="panel-heading">
  95. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em> {{ 'XComments'|get_lang|format(badge.issue_info.comments|length) }}
  96. /
  97. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em> {{ 'AverageRatingX'|get_lang|format(badge.issue_info.feedback_average) }}
  98. </div>
  99. <div class="panel-body">
  100. {{ badge.comment_form }}
  101. <hr>
  102. {% for comment in badge.issue_info.comments %}
  103. <article class="media">
  104. <div class="media-body">
  105. <h4 class="media-heading">{{ comment.giver_complete_name }}</h4>
  106. <p><small>{{ comment.datetime }}</small></p>
  107. <p>{{ comment.text }}</p>
  108. </div>
  109. <div class="media-right text-right">
  110. <div style="width: 80px;">
  111. {% if comment.value %}
  112. <em class="fa fa-certificate fa-fw" aria-label="{{ 'AverageRating' }}"></em>
  113. <span class="sr-only">{{ 'AverageRating' }}</span> {{ comment.value }}
  114. {% endif %}
  115. </div>
  116. </div>
  117. </article>
  118. {% else %}
  119. <p>{{ 'WithoutComment'|get_lang }}</p>
  120. {% endfor %}
  121. </div>
  122. </div>
  123. {% else %}
  124. <hr>
  125. <p class="lead">
  126. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em> {{ 'XComments'|get_lang|format(badge.issue_info.comments|length) }}
  127. /
  128. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em> {{ 'AverageRatingX'|get_lang|format(badge.issue_info.feedback_average) }}
  129. </p>
  130. {% endif %}
  131. </div>
  132. </div>
  133. {% if badge.allow_download_export %}
  134. <script>
  135. $(document).on('ready', function () {
  136. $('#badge-export-button-{{ badge.issue_info.id }}').on('click', function (e) {
  137. e.preventDefault();
  138. OpenBadges.issue({{ badge.issue_info.badge_assertion|json_encode() }});
  139. });
  140. });
  141. </script>
  142. {% endif %}
  143. <br />
  144. <br />
  145. {% endfor %}