issued.tpl 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. <h4>{{ 'CriteriaToEarnTheBadge'|get_lang }}</h4>
  19. <p>{{ issue_info.skill_criteria }}</p>
  20. {% endif %}
  21. </div>
  22. </div>
  23. </div>
  24. <div class="col-md-7">
  25. <p class="lead" style="color: #162A83;">{{ issue_info.user_complete_name }}</p>
  26. <ul class="fa-ul">
  27. <li><p style="color: #162A83;"><em class="fa-li fa fa-clock-o fa-fw"></em>{{ 'SkillAcquiredAt'|get_lang }} {{ issue_info.datetime }}</p>
  28. {% if issue_info.argumentation %}
  29. <p style="color: #162A83;">
  30. {{ 'UserXIndicated'|get_lang|format(issue_info.argumentation_author_name) }}
  31. </p>
  32. <ul><p style="font-style: italic; color: #162A83;">{{ issue_info.argumentation }}</p></ul>
  33. {% endif %}
  34. </li>
  35. </ul>
  36. {% if show_level %}
  37. <h4>{{ 'AcquiredLevel'|get_lang }}</h4>
  38. <ul class="fa-ul">
  39. <li>
  40. <em class="fa-li fa fa-check-circle-o fa-fw"></em> {{ issue_info.acquired_level }}
  41. </li>
  42. </ul>
  43. {% endif %}
  44. {% if allow_comment %}
  45. {% if show_level %}
  46. <hr>
  47. <div class="panel panel-info">
  48. <div class="panel-heading">
  49. <em class="fa fa-check-circle-o fa-fw" aria-hidden="true"></em>
  50. {{ 'ChangeAcquiredLevel'|get_lang }}
  51. </div>
  52. <div class="panel-body">
  53. {{ acquired_level_form }}
  54. </div>
  55. </div>
  56. {% endif %}
  57. <hr>
  58. <div class="panel panel-info">
  59. <div class="panel-heading">
  60. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em>
  61. {{ 'XComments'|get_lang|format(issue_info.comments|length) }}
  62. /
  63. <em class="fa fa-thumbs-o-up fa-fw" aria-hidden="true"></em>
  64. {{ 'AverageRatingX'|get_lang|format(issue_info.feedback_average) }}
  65. </div>
  66. <div class="panel-body">
  67. {{ comment_form }}
  68. {% if issue_info.comments %}
  69. <hr>
  70. {% for comment in issue_info.comments %}
  71. <article class="media">
  72. <div class="media-body">
  73. <h4 class="media-heading">{{ comment.giver_complete_name }}</h4>
  74. <p><small>{{ comment.datetime }}</small></p>
  75. <p>{{ comment.text }}</p>
  76. </div>
  77. <div class="media-right text-right">
  78. <div style="width: 80px;">
  79. {% if comment.value %}
  80. <em class="fa fa-certificate fa-fw" aria-label="{{ 'AverageRating' }}"></em>
  81. <span class="sr-only">{{ 'AverageRating' }}</span> {{ comment.value }}
  82. {% endif %}
  83. </div>
  84. </div>
  85. </article>
  86. {% endfor %}
  87. {% endif %}
  88. </div>
  89. </div>
  90. {% else %}
  91. <p style="color: #162A83;">
  92. <em class="fa fa-comment-o fa-fw" aria-hidden="true"></em>
  93. {{ 'XComments'|get_lang|format(issue_info.comments|length) }}
  94. <ul class="fa-ul">
  95. {% if issue_info.comments %}
  96. {% for comment in issue_info.comments %}
  97. <li><ul>
  98. <article class="media">
  99. <div class="media-body">
  100. <p style="font-style: italic; color: #162A83;">{{ comment.text }}</p>
  101. </div>
  102. </article>
  103. </ul></li>
  104. {% endfor %}
  105. {% endif %}
  106. </ul>
  107. </p>
  108. {% endif %}
  109. </div>
  110. </div>
  111. {% if allow_download_export %}
  112. <script>
  113. $(document).on('ready', function () {
  114. $('#badge-export-button').on('click', function (e) {
  115. e.preventDefault();
  116. OpenBadges.issue({{ issue_info.badge_assertion|json_encode() }});
  117. });
  118. });
  119. </script>
  120. {% endif %}