add: single_use products
This commit is contained in:
parent
7fbc732290
commit
e5e6d5cddb
12 changed files with 149 additions and 7 deletions
|
@ -28,12 +28,19 @@
|
|||
(icon (text "badge-cent"))
|
||||
(text "{{ product.price }}"))
|
||||
(text "{% if user.id != product.owner -%}")
|
||||
(text "{% if not already_purchased -%}")
|
||||
(button
|
||||
("onclick" "purchase()")
|
||||
("disabled" "{{ product.stock == 0 }}")
|
||||
(icon (text "piggy-bank"))
|
||||
(str (text "economy:action.buy")))
|
||||
(text "{% else %}")
|
||||
(span
|
||||
("class" "green flex items_center gap_2")
|
||||
(icon (text "circle-check"))
|
||||
(str (text "economy:label.already_purchased")))
|
||||
(text "{%- endif %}")
|
||||
(text "{% else %}")
|
||||
(a
|
||||
("class" "button")
|
||||
("href" "/product/{{ product.id }}/edit")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue