oswilno/crates/server/assets/templates/marketplace/index.html

89 lines
3.4 KiB
HTML
Raw Normal View History

2022-07-15 16:00:00 +02:00
{% extends "../base.html" %}
{% block content %}
2022-07-29 19:29:15 +02:00
<marketplace-offers {{h.account_id_tag(account)}}>
2022-07-22 21:32:33 +02:00
<h2 style="text-align: center">Rzeczy wystawione na sprzedaż</h2>
2022-07-19 22:05:54 +02:00
2022-07-25 11:39:18 +02:00
{% for offer in my_offers %}
<user-edit-offer
2022-07-29 16:08:59 +02:00
slot="offer"
2022-07-25 11:39:18 +02:00
state="{{offer.state.as_str()}}"
offer-id="{{offer.id}}"
description="{{offer.description}}"
picture-url="{{offer.picture_url}}"
{% match offer.price_range %}
{% when PriceRange::Free %}
price-range-min="0"
price-range-max="0"
{% when PriceRange::Fixed with { value } %}
price-range-min="{{value}}"
price-range-max="0"
{% when PriceRange::Range with { min, max } %}
price-range-min="{{min}}"
price-range-max="{{max}}"
{% endmatch %}
>
2022-08-05 14:25:50 +02:00
<a href="/marketplace/{{offer.id}}">
<marketplace-offer
offer-id="{{offer.id}}"
description="{{offer.description}}"
picture-url="{{offer.picture_url}}"
{% match offer.price_range %}
{% when PriceRange::Free %}
price-range-min="0"
price-range-max="0"
{% when PriceRange::Fixed with { value } %}
price-range-min="{{value}}"
price-range-max="0"
{% when PriceRange::Range with { min, max } %}
price-range-min="{{min}}"
price-range-max="{{max}}"
{% endmatch %}
>
<contact-info-list slot="contacts">
{% for contact in offer.contacts %}
<contact-info
mode="icon"
contact-id="{{contact.id}}"
type="{{contact.contact_type}}"
content="{{h.render_contact(contact.contact_type.as_str(), contact.content.as_str())}}"
></contact-info>
{% endfor %}
</contact-info-list>
</marketplace-offer>
</a>
</user-edit-offer>
{% endfor %}
{% for offer in offers %}
<a href="/marketplace/{{offer.id}}" slot="offer">
2022-07-25 11:39:18 +02:00
<marketplace-offer
2022-08-05 14:25:50 +02:00
2022-07-25 11:39:18 +02:00
offer-id="{{offer.id}}"
description="{{offer.description}}"
picture-url="{{offer.picture_url}}"
{% match offer.price_range %}
{% when PriceRange::Free %}
2022-08-05 14:25:50 +02:00
price-range="free"
2022-07-25 11:39:18 +02:00
{% when PriceRange::Fixed with { value } %}
2022-08-05 14:25:50 +02:00
price-range="{{value}}"
2022-07-25 11:39:18 +02:00
{% when PriceRange::Range with { min, max } %}
price-range-min="{{min}}"
price-range-max="{{max}}"
{% endmatch %}
>
<contact-info-list slot="contacts">
{% for contact in offer.contacts %}
<contact-info
mode="icon"
contact-id="{{contact.id}}"
2022-07-29 19:17:01 +02:00
type="{{contact.contact_type}}"
2022-07-25 11:39:18 +02:00
content="{{h.render_contact(contact.contact_type.as_str(), contact.content.as_str())}}"
></contact-info>
{% endfor %}
</contact-info-list>
</marketplace-offer>
2022-08-05 14:25:50 +02:00
</a>
2022-07-18 16:23:07 +02:00
{% endfor %}
</marketplace-offers>
2022-07-15 16:00:00 +02:00
{% endblock %}