service categories
This commit is contained in:
parent
79a8c6f280
commit
17b6c4c9ee
6 changed files with 154 additions and 5 deletions
|
@ -3,6 +3,12 @@
|
|||
{% block content %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Categories</h5>
|
||||
{% for category in service.categories.all %}
|
||||
<div class="mb-1">
|
||||
<span class="badge bg-secondary">{{ category.full_path }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="d-flex align-items-start mb-4">
|
||||
{% if service.logo %}
|
||||
<img src="{{ service.logo.url }}" alt="{{ service.name }} logo" class="me-4" style="max-height: 100px; max-width: 200px; object-fit: contain;">
|
||||
|
|
|
@ -12,6 +12,23 @@
|
|||
<input type="text" class="form-control" id="search" name="search" value="{{ request.GET.search }}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="category" class="form-label">Category</label>
|
||||
<select class="form-select" id="category" name="category">
|
||||
<option value="">All Categories</option>
|
||||
{% for category in categories %}
|
||||
<option value="{{ category.id }}" {% if request.GET.category == category.id|stringformat:'i' %}selected{% endif %}>
|
||||
{{ category.name }}
|
||||
</option>
|
||||
{% for subcategory in category.children.all %}
|
||||
<option value="{{ subcategory.id }}" {% if request.GET.category == subcategory.id|stringformat:'i' %}selected{% endif %}>
|
||||
{{ subcategory.name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="cloud_provider" class="form-label">Cloud Provider</label>
|
||||
<select class="form-select" id="cloud_provider" name="cloud_provider">
|
||||
|
@ -76,6 +93,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<p class="card-text">{{ service.description|truncatewords:30 }}</p>
|
||||
<div class="mb-2">
|
||||
{% for category in service.categories.all %}
|
||||
<span class="badge bg-secondary me-1">{{ category.full_path }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p class="card-text">
|
||||
<small class="text-muted">
|
||||
Service Level: {{ service.service_level.name }}<br>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue