WIP: Add to lot view search support and UI changes #62

Draft
rskthomas wants to merge 2 commits from rework/add_to_lots into main
Showing only changes of commit 43d9d11a64 - Show all commits

View file

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