refactor all the things
This commit is contained in:
parent
8ed39690f1
commit
bb5cb708bd
36 changed files with 1563 additions and 931 deletions
|
@ -72,18 +72,23 @@
|
|||
{% endif %}
|
||||
<div>
|
||||
<h5 class="card-title mb-0">{{ service.name }}</h5>
|
||||
<div class="d-flex align-items-center mt-2">
|
||||
{% if service.cloud_provider.logo %}
|
||||
<a href="{% url 'services:provider_detail' service.cloud_provider.slug %}">
|
||||
<img src="{{ service.cloud_provider.logo.url }}" alt="{{ service.cloud_provider.name }} logo"
|
||||
class="me-2" style="max-height: 25px; max-width: 200px; object-fit: contain;">
|
||||
</a>
|
||||
{% else %}
|
||||
<h6 class="card-subtitle text-muted mb-0">
|
||||
<a href="{% url 'services:provider_detail' service.cloud_provider.pk %}"
|
||||
class="text-decoration-none text-muted">{{ service.cloud_provider.name }}</a>
|
||||
</h6>
|
||||
{% endif %}
|
||||
<div class="mt-2">
|
||||
{% for offering in service.offerings.all %}
|
||||
<div class="d-inline-block me-2">
|
||||
{% if offering.cloud_provider.logo %}
|
||||
<a href="{% url 'services:provider_detail' offering.cloud_provider.slug %}" title="{{ offering.cloud_provider.name }}">
|
||||
<img src="{{ offering.cloud_provider.logo.url }}"
|
||||
alt="{{ offering.cloud_provider.name }}"
|
||||
style="max-height: 25px; max-width: 50px; object-fit: contain;">
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'services:provider_detail' offering.cloud_provider.slug %}"
|
||||
class="badge bg-secondary text-decoration-none">
|
||||
{{ offering.cloud_provider.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -94,8 +99,25 @@
|
|||
</div>
|
||||
<p class="card-text">{{ service.description|safe|truncatewords:30 }}</p>
|
||||
|
||||
<a href="{{ service.get_absolute_url }}" class="btn btn-primary">View Details</a>
|
||||
<a href="{% url 'services:create_lead' service.slug %}" class="btn btn-success">Show Interest</a>
|
||||
<div class="mt-3">
|
||||
<a href="{{ service.get_absolute_url }}" class="btn btn-primary">View Details</a>
|
||||
{% 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
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{% for offering in service.offerings.all %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{% url 'services:create_lead' service.slug %}?offering={{ offering.id }}">
|
||||
via {{ offering.cloud_provider.name }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -109,4 +131,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue