Style: Delete page preview
- Add bootstrap style to item preview on delete page
This commit is contained in:
parent
0a87bfd570
commit
eebf54d0a3
@ -5,38 +5,82 @@
|
|||||||
<title>Delete Item</title>
|
<title>Delete Item</title>
|
||||||
{% include 'favicon.html' %}
|
{% include 'favicon.html' %}
|
||||||
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
|
||||||
|
<link href="{{ url_for('static', filename='css/bootstrap-icons.min.css') }}" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
.delete-container {
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.preview-card {
|
||||||
|
background: white;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
||||||
|
}
|
||||||
|
.attribute-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
.attribute-item {
|
||||||
|
padding: 0.75rem;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.attribute-label {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #6c757d;
|
||||||
|
}
|
||||||
|
.sticky-actions {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
background: white;
|
||||||
|
padding: 1rem 0;
|
||||||
|
border-top: 1px solid #dee2e6;
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body align="center">
|
<body>
|
||||||
{% include 'header.html' %}
|
{% include 'header.html' %}
|
||||||
<main class="container mt-5 pt-3">
|
|
||||||
<h2>Are you sure you want to delete the item?</h2>
|
|
||||||
|
|
||||||
<!-- Confirmation form -->
|
<main class="container mt-5">
|
||||||
<form action='' method="post">
|
<div class="delete-container">
|
||||||
<br>
|
<h2 class="mb-4 text-center">Confirm Deletion</h2>
|
||||||
<input type="submit" value="Delete">
|
<p class="lead text-center text-danger mb-4">
|
||||||
<button type="button" onclick="window.location.href='/'">Cancel</button>
|
<i class="bi bi-exclamation-triangle-fill"></i> Are you sure you want to delete this item?
|
||||||
</form>
|
</p>
|
||||||
|
|
||||||
<!-- Display a preview of the item -->
|
<!-- Item Preview -->
|
||||||
<table border="1" align="center">
|
<div class="preview-card p-4 mb-4">
|
||||||
<thead>
|
<h3 class="h5 mb-3">Item Details</h3>
|
||||||
<tr>
|
<div class="attribute-grid">
|
||||||
<th>Attribute</th>
|
{% for attrib in item_attributes %}
|
||||||
<th>Value</th>
|
<div class="attribute-item">
|
||||||
</tr>
|
<div class="attribute-label">{{ attrib.display_name }}</div>
|
||||||
</thead>
|
<div class="attribute-value">{{ item[attrib.attrib_name] }}</div>
|
||||||
<tbody>
|
</div>
|
||||||
{% for attrib in item_attributes %}
|
{% endfor %}
|
||||||
<tr>
|
</div>
|
||||||
<td>{{ attrib.display_name }}</td>
|
</div>
|
||||||
<td>{{ item[attrib.attrib_name] }}</td>
|
|
||||||
</tr>
|
<!-- Sticky action buttons -->
|
||||||
{% endfor %}
|
<div class="sticky-actions">
|
||||||
</tbody>
|
<div class="d-flex justify-content-center gap-3">
|
||||||
</table>
|
<button type="button"
|
||||||
|
onclick="window.location.href='/'"
|
||||||
|
class="btn btn-outline-secondary px-4">
|
||||||
|
<i class="bi bi-x-lg me-1"></i>Cancel
|
||||||
|
</button>
|
||||||
|
<form action="" method="post" class="mb-0">
|
||||||
|
<button type="submit" class="btn btn-danger px-4">
|
||||||
|
<i class="bi bi-trash3 me-1"></i>Confirm Delete
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<!-- Bootstrap JS (for dropdowns) -->
|
|
||||||
|
<!-- Bootstrap JS -->
|
||||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue
Block a user