Skip to content

Commit f0acb93

Browse files
committed
Improve add to collection design on package page
Fixes #654
1 parent ae301cb commit f0acb93

2 files changed

Lines changed: 310 additions & 256 deletions

File tree

app/templates/macros/reviews.html

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@
187187

188188

189189
{% macro render_review_preview(package, current_user) -%}
190-
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
191190
<div class="card mt-0 mb-4 ">
192191
<div class="card-header">
193192
{{ _("Review") }}
@@ -197,7 +196,6 @@
197196
<p>
198197
{{ package.type.do_you_recommend }}
199198
</p>
200-
201199
<div class="btn-toolbar" role="toolbar">
202200
<div class="btn-group me-2">
203201
<button class="btn btn-primary" name="rating" value="5">
@@ -227,3 +225,23 @@
227225
</form>
228226
</div>
229227
{% endmacro %}
228+
229+
{% macro render_review_buttons(package, current_user) -%}
230+
<form method="post" action="{{ package.get_url('packages.review') }}">
231+
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
232+
<div class="btn-group">
233+
<button class="btn btn-primary" name="rating" value="5">
234+
<i class="fas fa-thumbs-up me-1"></i>
235+
{{ _("Yes") }}
236+
</button>
237+
<button class="btn btn-primary" name="rating" value="3">
238+
<i class="fas fa-minus me-1"></i>
239+
{{ _("Neutral") }}
240+
</button>
241+
<button class="btn btn-primary" name="rating" value="1">
242+
<i class="fas fa-thumbs-down me-1"></i>
243+
{{ _("No") }}
244+
</button>
245+
</div>
246+
</form>
247+
{% endmacro %}

0 commit comments

Comments
 (0)