link to offering when filter for cloud provider
This commit is contained in:
parent
ac19c4cd25
commit
38ab1f3b2a
1 changed files with 24 additions and 4 deletions
|
@ -155,9 +155,19 @@
|
|||
<div class="d-flex justify-content-between">
|
||||
{% if service.logo %}
|
||||
<div class="card__image flex-shrink-0">
|
||||
<a href="{{ service.get_absolute_url }}">
|
||||
<img src="{{ service.logo.url }}" alt="{{ service.name }} logo" class="img-fluid">
|
||||
</a>
|
||||
{% if request.GET.cloud_provider %}
|
||||
{% for offering in service.offerings.all %}
|
||||
{% if offering.cloud_provider.id|stringformat:'i' == request.GET.cloud_provider %}
|
||||
<a href="{% url 'services:offering_detail' offering.cloud_provider.slug service.slug %}">
|
||||
<img src="{{ service.logo.url }}" alt="{{ service.name }} logo" class="img-fluid">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<a href="{{ service.get_absolute_url }}">
|
||||
<img src="{{ service.logo.url }}" alt="{{ service.name }} logo" class="img-fluid">
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if service.is_featured %}
|
||||
|
@ -173,7 +183,17 @@
|
|||
{% endif %}
|
||||
<div class="card__content d-flex flex-column flex-grow-1">
|
||||
<div class="card__header">
|
||||
<h3 class="card__title"><a href="{{ service.get_absolute_url }}" class="text-decoration-none {% if service.is_coming_soon %}text-black-50{% endif %}">{{ service.name }}</a></h3>
|
||||
<h3 class="card__title">
|
||||
{% if request.GET.cloud_provider %}
|
||||
{% for offering in service.offerings.all %}
|
||||
{% if offering.cloud_provider.id|stringformat:'i' == request.GET.cloud_provider %}
|
||||
<a href="{% url 'services:offering_detail' offering.cloud_provider.slug service.slug %}" class="text-decoration-none {% if service.is_coming_soon %}text-black-50{% endif %}">{{ service.name }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<a href="{{ service.get_absolute_url }}" class="text-decoration-none {% if service.is_coming_soon %}text-black-50{% endif %}">{{ service.name }}</a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<p class="card__subtitle">
|
||||
{% for category in service.categories.all %}
|
||||
<span>{{ category.full_path }}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue