introduce service offering status
This commit is contained in:
parent
a4850683c9
commit
5eb40ffc4f
6 changed files with 65 additions and 6 deletions
|
@ -107,15 +107,16 @@
|
|||
<div class="mt-auto d-flex gap-2">
|
||||
<a href="{{ offering.get_absolute_url }}" class="btn btn-primary">View Details</a>
|
||||
{% if offering.plans.exists %}
|
||||
{% if offering.status == 'available' %}
|
||||
{% if offering.plans.count == 1 %}
|
||||
{% with plan=offering.plans.first %}
|
||||
<a href="{% url 'services:create_lead' offering.service.slug %}?offering={{ offering.id }}&plan={{ plan.id }}"
|
||||
class="btn btn-success">Show Interest</a>
|
||||
class="btn btn-success">Order</a>
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-success dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
||||
Show Interest
|
||||
Order
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for plan in offering.plans.all %}
|
||||
|
@ -130,10 +131,25 @@
|
|||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% elif offering.status == 'planned' %}
|
||||
<a href="{% url 'services:create_lead' offering.service.slug %}?offering={{ offering.id }}"
|
||||
class="btn btn-success">Show Interest</a>
|
||||
{% else %}
|
||||
<a href="{% url 'services:create_lead' offering.service.slug %}?offering={{ offering.id }}"
|
||||
class="btn btn-success">Request Information</a>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if offering.status == 'available' %}
|
||||
<a href="{% url 'services:create_lead' offering.service.slug %}?offering={{ offering.id }}"
|
||||
class="btn btn-success">Order</a>
|
||||
{% elif offering.status == 'planned' %}
|
||||
<a href="{% url 'services:create_lead' offering.service.slug %}?offering={{ offering.id }}"
|
||||
class="btn btn-success">Show Interest</a>
|
||||
{% else %}
|
||||
<a href="{% url 'services:create_lead' offering.service.slug %}?offering={{ offering.id }}"
|
||||
class="btn btn-success">Request Information</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -83,7 +83,15 @@
|
|||
{% endif %}
|
||||
|
||||
<a href="{% url 'services:create_lead' service.slug %}?offering={{ offering.id }}"
|
||||
class="btn btn-success">Show Interest</a>
|
||||
class="btn btn-success">
|
||||
{% if offering.status == 'available' %}
|
||||
Order
|
||||
{% elif offering.status == 'planned' %}
|
||||
Show Interest
|
||||
{% else %}
|
||||
Request Information
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
{% if service.offerings.exists %}
|
||||
<div class="dropdown d-inline-block">
|
||||
<button class="btn btn-success dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
||||
Show Interest
|
||||
Order
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for offering in service.offerings.all %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue