issued_all.tpl 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. <div class='col-md-12 text-center'>
  42. <h5><b> {{ 'ShareWithYourFriends' | get_lang }} </b></h5>
  43. <a href="http://www.facebook.com/sharer.php?u={{ _p.web }}badge/{{ badge.issue_info.id }}" target="_new">
  44. <em class='fa fa-facebook-square fa-3x text-info' aria-hidden='true'></em>
  45. </a>
  46. <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">
  47. <em class='fa fa-twitter-square fa-3x text-light' aria-hidden='true'></em>
  48. </a>
  49. </div>
  50. {% endif %}
  51. </div>
  52. <div class="col-md-7">
  53. <h3>{{ 'RecipientDetails'|get_lang }}</h3>
  54. <p class="lead">{{ badge.issue_info.user_complete_name }}</p>
  55. <h4>{{ 'SkillAcquiredAt'|get_lang }}</h4>
  56. <ul class="fa-ul">
  57. <li>
  58. {% if badge.issue_info.source_name %}
  59. <em class="fa-li fa fa-clock-o fa-fw"></em> {{ 'TimeXThroughCourseY'|get_lang|format(badge.issue_info.datetime, badge.issue_info.source_name) }}
  60. {% else %}
  61. <em class="fa-li fa fa-clock-o fa-fw"></em> {{ badge.issue_info.datetime }}
  62. {% endif %}
  63. {% if badge.issue_info.argumentation %}
  64. {% if badge.issue_info.argumentation %}
  65. <b><p style="font-style: italic;">{{ 'UserXIndicated'|get_lang|format(badge.issue_info.argumentation_author_name) }} </p></b>
  66. {% endif %}
  67. <p>{{ badge.issue_info.argumentation }}</p>
  68. {% endif %}
  69. </li>
  70. </ul>
  71. <h4>{{ 'AcquiredLevel'|get_lang }}</h4>
  72. <ul class="fa-ul">
  73. <li>
  74. <em class="fa-li fa fa-check-circle-o fa-fw"></em> {{ badge.issue_info.acquired_level }}
  75. </li>
  76. </ul>
  77. {% if badge.allow_comment %}
  78. <hr>
  79. <div class="panel panel-info">
  80. <div class="panel-heading">
  81. <em class="fa fa-check-circle-o fa-fw" aria-hidden="true"></em> {{ 'ChangeAcquiredLevel'|get_lang }}
  82. </div>
  83. <div class="panel-body">
  84. {{ badge.acquired_level_form }}
  85. </div>
  86. </div>
  87. <hr>
  88. <div class="panel panel-info">
  89. <div class="panel-heading">
  90. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em> {{ 'XComments'|get_lang|format(badge.issue_info.comments|length) }}
  91. /
  92. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em> {{ 'AverageRatingX'|get_lang|format(badge.issue_info.feedback_average) }}
  93. </div>
  94. <div class="panel-body">
  95. {{ badge.comment_form }}
  96. <hr>
  97. {% for comment in badge.issue_info.comments %}
  98. <article class="media">
  99. <div class="media-body">
  100. <h4 class="media-heading">{{ comment.giver_complete_name }}</h4>
  101. <p><small>{{ comment.datetime }}</small></p>
  102. <p>{{ comment.text }}</p>
  103. </div>
  104. <div class="media-right text-right">
  105. <div style="width: 80px;">
  106. {% if comment.value %}
  107. <em class="fa fa-certificate fa-fw" aria-label="{{ 'AverageRating' }}"></em>
  108. <span class="sr-only">{{ 'AverageRating' }}</span> {{ comment.value }}
  109. {% endif %}
  110. </div>
  111. </div>
  112. </article>
  113. {% else %}
  114. <p>{{ 'WithoutComment'|get_lang }}</p>
  115. {% endfor %}
  116. </div>
  117. </div>
  118. {% else %}
  119. <hr>
  120. <p class="lead">
  121. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em> {{ 'XComments'|get_lang|format(badge.issue_info.comments|length) }}
  122. /
  123. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em> {{ 'AverageRatingX'|get_lang|format(badge.issue_info.feedback_average) }}
  124. </p>
  125. {% endif %}
  126. </div>
  127. </div>
  128. {% if badge.allow_download_export %}
  129. <script>
  130. $(document).on('ready', function () {
  131. $('#badge-export-button-{{ badge.issue_info.id }}').on('click', function (e) {
  132. e.preventDefault();
  133. OpenBadges.issue({{ badge.issue_info.badge_assertion|json_encode() }});
  134. });
  135. });
  136. </script>
  137. {% endif %}
  138. <br />
  139. <br />
  140. {% endfor %}