initial
This commit is contained in:
120
templates/dashboard/main/elements/client/clients.html
Normal file
120
templates/dashboard/main/elements/client/clients.html
Normal file
@@ -0,0 +1,120 @@
|
||||
{% extends 'dashboard/base.html' %}
|
||||
{% load static %}
|
||||
{% block title %}{{ title }} - {{ seo_settings.meta_title }}{% endblock title %}
|
||||
{% block content %}
|
||||
|
||||
<div class="page-body">
|
||||
<div class="container-fluid">
|
||||
<div class="page-title">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h3>Clients</h3>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'adminHome' %}">
|
||||
<svg class="stroke-icon">
|
||||
<use href="{% static 'admin/assets/svg/icon-sprite.svg' %}#stroke-home"></use>
|
||||
</svg></a></li>
|
||||
<li class="breadcrumb-item">Elements</li>
|
||||
<li class="breadcrumb-item active">Clients</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Container-fluid starts-->
|
||||
<div class="container-fluid">
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
|
||||
{{ message }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="col-md-12 project-list">
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-6 p-0 d-flex">
|
||||
<ul class="nav nav-tabs border-tab" id="top-tab" role="tablist">
|
||||
<li class="nav-item"><a class="nav-link active" id="top-home-tab" data-bs-toggle="tab" href="#top-home" role="tab" aria-controls="top-home" aria-selected="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-target"><circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle></svg>All Clients</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-6 p-0">
|
||||
<div class="form-group mb-0 me-0"></div><a class="btn btn-primary" href="{% url 'adminClientElementCreate' %}"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus-square"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>Create New Client</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- Zero Configuration Starts-->
|
||||
<div class="col-sm-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="display" id="basic-1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Image</th>
|
||||
<th>Name</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for client in clients %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
{% if client.image %}
|
||||
<td><img src="{{ client.image.url }}" style="width:50px; border-radius:5px;" alt="timg" srcset=""></td>
|
||||
{% else %}
|
||||
<td>No image</td>
|
||||
{% endif %}
|
||||
<td><a href="{% url 'adminClientElementEdit' client.id %}">{{ client.client_name }}</a></td>
|
||||
<td>
|
||||
<ul class="action">
|
||||
<li class="edit"> <a href="{% url 'adminClientElementEdit' client.id %}"><i class="icon-pencil-alt"></i></a></li>
|
||||
<li class="delete"><a href="#" data-slug="{{ client.id }}"><i class="icon-trash"></i></a></li>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
var deleteButtons = document.querySelectorAll('.icon-trash');
|
||||
|
||||
deleteButtons.forEach(function(button) {
|
||||
button.addEventListener('click', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var url = "{% url 'adminClientElementDelete' client.id %}";
|
||||
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You won't be able to revert this!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, delete it!'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = url;
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Zero Configuration Ends-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user