move coming soon service to the end

This commit is contained in:
Tobias Brunner 2025-03-03 11:27:31 +01:00
parent 8c7501d1af
commit 42050d069b
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -149,7 +149,7 @@
{% for service in services %} {% for service in services %}
<div class="col-12 col-md-6 col-lg-4 mb-30"> <div class="col-12 col-md-6 col-lg-4 mb-30">
<div class="card {% if service.is_featured %}card-featured{% endif %} h-100 d-flex flex-column"> <div class="card {% if service.is_featured %}card-featured{% endif %} h-100 d-flex flex-column">
{% if service.logo or service.is_featured %} {% if service.logo or service.is_featured or service.is_coming_soon %}
<div class="d-flex justify-content-between"> <div class="d-flex justify-content-between">
{% if service.logo %} {% if service.logo %}
<div class="card__image flex-shrink-0"> <div class="card__image flex-shrink-0">
@ -171,7 +171,7 @@
{% endif %} {% endif %}
<div class="card__content d-flex flex-column flex-grow-1"> <div class="card__content d-flex flex-column flex-grow-1">
<div class="card__header"> <div class="card__header">
<h3 class="card__title"><a href="{{ service.get_absolute_url }}" class="text-decoration-none">{{ service.name }}</a></h3> <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>
<p class="card__subtitle"> <p class="card__subtitle">
{% for category in service.categories.all %} {% for category in service.categories.all %}
<span>{{ category.full_path }}</span> <span>{{ category.full_path }}</span>

View file

@ -11,7 +11,7 @@ from hub.services.models import (
def service_list(request): def service_list(request):
services = ( services = (
Service.objects.all() Service.objects.all()
.order_by("-is_featured", "name") .order_by("-is_featured", "is_coming_soon", "name")
.prefetch_related( .prefetch_related(
"categories", "categories",
"offerings", "offerings",