issued.tpl 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <div class="row issued">
  2. <div class="col-md-5">
  3. <div class="thumbnail">
  4. <figure class="text-center">
  5. <img class="img-responsive 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. <h3>{{ 'CriteriaToEarnTheBadge'|get_lang }}</h3>
  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> {{ 'TimeXThroughCourseY'|get_lang|format(issue_info.datetime, issue_info.source_name) }}
  59. {% else %}
  60. <em class="fa-li fa fa-clock-o fa-fw"></em> {{ issue_info.datetime }}
  61. {% endif %}
  62. {% if issue_info.argumentation %}
  63. {% if issue_info.argumentation %}
  64. <b><p style="font-style: italic;">{{ 'UserXIndicated'|get_lang|format(issue_info.argumentation_author_name) }} </p></b>
  65. {% endif %}
  66. <p>{{ issue_info.argumentation }}</p>
  67. {% endif %}
  68. </li>
  69. </ul>
  70. <h4>{{ 'AcquiredLevel'|get_lang }}</h4>
  71. <ul class="fa-ul">
  72. <li>
  73. <em class="fa-li fa fa-check-circle-o fa-fw"></em> {{ issue_info.acquired_level }}
  74. </li>
  75. </ul>
  76. {% if allow_comment %}
  77. <hr>
  78. <div class="panel panel-info">
  79. <div class="panel-heading">
  80. <em class="fa fa-check-circle-o fa-fw" aria-hidden="true"></em> {{ 'ChangeAcquiredLevel'|get_lang }}
  81. </div>
  82. <div class="panel-body">
  83. {{ acquired_level_form }}
  84. </div>
  85. </div>
  86. <hr>
  87. <div class="panel panel-info">
  88. <div class="panel-heading">
  89. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em> {{ 'XComments'|get_lang|format(issue_info.comments|length) }}
  90. /
  91. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em> {{ 'AverageRatingX'|get_lang|format(issue_info.feedback_average) }}
  92. </div>
  93. <div class="panel-body">
  94. {{ comment_form }}
  95. <hr>
  96. {% for comment in issue_info.comments %}
  97. <article class="media">
  98. <div class="media-body">
  99. <h4 class="media-heading">{{ comment.giver_complete_name }}</h4>
  100. <p><small>{{ comment.datetime }}</small></p>
  101. <p>{{ comment.text }}</p>
  102. </div>
  103. <div class="media-right text-right">
  104. <div style="width: 80px;">
  105. {% if comment.value %}
  106. <em class="fa fa-certificate fa-fw" aria-label="{{ 'AverageRating' }}"></em>
  107. <span class="sr-only">{{ 'AverageRating' }}</span> {{ comment.value }}
  108. {% endif %}
  109. </div>
  110. </div>
  111. </article>
  112. {% else %}
  113. <p>{{ 'WithoutComment'|get_lang }}</p>
  114. {% endfor %}
  115. </div>
  116. </div>
  117. {% else %}
  118. <hr>
  119. <p class="lead">
  120. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em> {{ 'XComments'|get_lang|format(issue_info.comments|length) }}
  121. /
  122. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em> {{ 'AverageRatingX'|get_lang|format(issue_info.feedback_average) }}
  123. </p>
  124. {% endif %}
  125. </div>
  126. </div>
  127. {% if allow_download_export %}
  128. <script>
  129. $(document).on('ready', function () {
  130. $('#badge-export-button').on('click', function (e) {
  131. e.preventDefault();
  132. OpenBadges.issue({{ issue_info.badge_assertion|json_encode() }});
  133. });
  134. });
  135. </script>
  136. {% endif %}