|
25 | 25 | </div>
|
26 | 26 |
|
27 | 27 | {% if badge.allow_download_export %}
|
28 |
| - <div class="mt-4 flex flex-wrap justify-center space-x-4 space-y-4"> |
| 28 | + <div class="mt-4 max-w-xl mx-auto grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4"> |
29 | 29 | <div class="text-center">
|
30 |
| - <a href="{{ badge.personal_badge }}" class="btn btn--primary"> |
| 30 | + <a |
| 31 | + href="{{ badge.personal_badge }}" |
| 32 | + class="btn btn--primary w-full inline-block" |
| 33 | + > |
31 | 34 | <em class="fa fa-download fa-fw"></em> {{ 'Download badges'|trans }}
|
32 | 35 | </a>
|
33 | 36 | </div>
|
34 | 37 | <div class="text-center">
|
35 |
| - <a href="#" class="btn btn--success" id="badge-export-button-{{ badge.issue_info.id }}"> |
| 38 | + <a |
| 39 | + href="#" |
| 40 | + class="btn btn--success w-full inline-block" |
| 41 | + id="badge-export-button-{{ badge.issue_info.id }}" |
| 42 | + > |
36 | 43 | <em class="fa fa-external-link-square fa-fw"></em> {{ 'Export badge'|trans }}
|
37 | 44 | </a>
|
38 | 45 | </div>
|
|
128 | 135 | </div>
|
129 | 136 | {% elseif badge.issue_info.comments|length > 0 %}
|
130 | 137 | <hr class="my-4" />
|
131 |
| - <p class="text-lg font-semibold flex justify-between"> |
132 |
| - <span> |
133 |
| - <em class="fa fa-comment-o fa-fw"></em> |
134 |
| - {{ '%s comments'|trans|format(badge.issue_info.comments|length) }} |
135 |
| - </span> |
136 |
| - <span> |
137 |
| - <em class="fa fa-thumbs-o-up fa-fw"></em> |
138 |
| - {{ 'Average rating %s'|trans|format(badge.issue_info.feedback_average) }} |
139 |
| - </span> |
140 |
| - </p> |
| 138 | + <p class="text-lg font-semibold flex flex-col sm:flex-row sm:justify-between gap-2"> |
| 139 | + <span> |
| 140 | + <em class="fa fa-comment-o fa-fw"></em> |
| 141 | + {{ '%s comments'|trans|format(badge.issue_info.comments|length) }} |
| 142 | + </span> |
| 143 | + <span> |
| 144 | + <em class="fa fa-thumbs-o-up fa-fw"></em> |
| 145 | + {{ 'Average rating %s'|trans|format(badge.issue_info.feedback_average) }} |
| 146 | + </span> |
| 147 | + </p> |
| 148 | + <div class="mt-3 space-y-3"> |
| 149 | + {% for comment in badge.issue_info.comments %} |
| 150 | + <article class="flex items-start justify-between gap-4 border rounded p-3"> |
| 151 | + <div class="min-w-0"> |
| 152 | + <h4 class="font-bold truncate"> |
| 153 | + {{ comment.giver_complete_name ?? comment.giver_name ?? '—' }} |
| 154 | + </h4> |
| 155 | + <p class="text-sm text-gray-600">{{ comment.datetime }}</p> |
| 156 | + {% if comment.text %} |
| 157 | + <p class="mt-2 whitespace-pre-line">{{ comment.text }}</p> |
| 158 | + {% endif %} |
| 159 | + </div> |
| 160 | + <div class="flex items-center justify-end shrink-0"> |
| 161 | + {% if comment.value %} |
| 162 | + <span class="inline-flex items-center gap-1 text-sm font-semibold"> |
| 163 | + <em class="fa fa-certificate fa-fw"></em> {{ comment.value }} |
| 164 | + </span> |
| 165 | + {% endif %} |
| 166 | + </div> |
| 167 | + </article> |
| 168 | + {% endfor %} |
| 169 | + </div> |
141 | 170 | {% endif %}
|
142 | 171 | </div>
|
143 | 172 | </div>
|
|
0 commit comments