now grid based
This commit is contained in:
parent
5bf873f282
commit
43d9d11a64
|
@ -18,6 +18,13 @@
|
|||
.lot-item.selected {
|
||||
background-color: #e2f0ff;
|
||||
}
|
||||
|
||||
.lot-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: 15px;
|
||||
padding: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
|
@ -40,23 +47,25 @@
|
|||
</div>
|
||||
<div id="collapse{{ forloop.counter }}" class="collapse">
|
||||
<div class="card-body">
|
||||
{% for lot in lots %}
|
||||
<div class="form-check lot-item" data-name="{{ lot.name }}" data-code="{{ lot.code }}">
|
||||
<input class="form-check-input mt-2" type="checkbox" name="lots" value="{{ lot.id }}" id="lot{{ lot.id }}">
|
||||
<label class="form-check-label w-100" for="lot{{ lot.id }}">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="ps-2">
|
||||
<strong>{{ lot.name }}</strong>
|
||||
<div class="text-muted small">{{ lot.description }}</div>
|
||||
<div class="lot-grid">
|
||||
{% for lot in lots %}
|
||||
<div class="form-check lot-item ms-2" data-name="{{ lot.name }}" data-code="{{ lot.code }}">
|
||||
<input class="form-check-input mt-2" type="checkbox" name="lots" value="{{ lot.id }}" id="lot{{ lot.id }}">
|
||||
<label class="form-check-label w-100" for="lot{{ lot.id }}">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="ps-2">
|
||||
<strong>{{ lot.name }}</strong>
|
||||
<div class="text-muted small">{{ lot.description }}</div>
|
||||
</div>
|
||||
<div class="text-end text-muted small">
|
||||
<div><i class="bi bi-calendar"></i> {{ lot.created|date:"M d, Y" }}</div>
|
||||
<div><i class="bi bi-person"></i> {{ lot.user.username|default:"N/A" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end text-muted small">
|
||||
<div><i class="bi bi-calendar"></i> {{ lot.created|date:"M d, Y" }}</div>
|
||||
<div><i class="bi bi-person"></i> {{ lot.user.username|default:"N/A" }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue