beta v.1.1
This commit is contained in:
12
Templates/components/_footer.html
Normal file
12
Templates/components/_footer.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<footer class="footer mt-auto py-3 text-center bg-body-tertiary">
|
||||
<div class="container">
|
||||
<a class="navbar-brand --bs-success-text-emphasis" href="{% url 'Home' %}"> © Weverton </a>
|
||||
</div>
|
||||
</footer>
|
||||
<style>
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
34
Templates/components/_header.html
Normal file
34
Templates/components/_header.html
Normal file
@@ -0,0 +1,34 @@
|
||||
{% load tz %}
|
||||
</nav>
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<i class="bi bi-balloon-heart"></i>
|
||||
<div class="container-fluid">
|
||||
{% if not user.is_authenticated %}
|
||||
<a class="navbar-brand --bs-success-text-emphasis" href="{% url 'Home' %}"> Wevertom </a>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a class="navbar-brand --bs-success-text-emphasis" href="{% url 'Dashboard' %}"> Weverton </a>
|
||||
{% endif %}
|
||||
<ul class="nav justify-content-center">
|
||||
<li class="navbar-brand --bs-success-text-emphasis">
|
||||
Hoje dia {% now "d" %} de {% now "F" %} de {% now "Y" %} ({% now "d/m/Y" %})
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav justify-content-end">
|
||||
{% if not user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-primary" aria-current="page" href="{% url 'login' %}">Login</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<li class="navbar-brand --bs-success-text-emphasis">
|
||||
Ola, {{ user.username.capitalize }}
|
||||
</li>
|
||||
<form action="{% url 'logout' %}" method="post" id="logout-form" class="">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-danger" aria-current="true"> Logout </button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
17
Templates/components/_msg.html
Normal file
17
Templates/components/_msg.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert {% if 'success' in message.tags %}alert-primary{% elif 'error' in message.tags %}alert-danger{% endif %} message" role="alert">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
// Espera 5 segundos e depois remove as mensagens
|
||||
setTimeout(function() {
|
||||
const messages = document.querySelectorAll('.message');
|
||||
messages.forEach(function(message) {
|
||||
message.style.display = 'none';
|
||||
});
|
||||
}, 9000);
|
||||
</script>
|
||||
49
Templates/components/_pagination.html
Normal file
49
Templates/components/_pagination.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{% if page_obj.has_other_pages %}
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center">
|
||||
{% if page_obj.has_previous %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page=1">
|
||||
Primeira
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ page_obj.previous_page_number }}">
|
||||
Anterior
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for page_number in page_obj.paginator.page_range %}
|
||||
{% if page_number <= page_obj.number|add:3 and page_number >= page_obj.number|add:-3 %}
|
||||
{% if page_obj.number == page_number %}
|
||||
<li class="page-item active">
|
||||
<a class="page-link" href="?page={{ page_number }}">
|
||||
{{ page_number }}
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ page_number }}">
|
||||
{{ page_number }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ page_obj.next_page_number }}">
|
||||
Próxima
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ page_obj.paginator.num_pages }}">
|
||||
Última
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
10
Templates/components/_sidebar.html
Normal file
10
Templates/components/_sidebar.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{% if user.is_authenticated %}
|
||||
<div class="" >
|
||||
<div class="list-group" >
|
||||
<a class="list-group-item list-group-item-action list-group-item-primary"
|
||||
aria-current="true" href="{% url 'Home' %}"> Home </a>
|
||||
<a class="list-group-item list-group-item-action list-group-item-primary"
|
||||
aria-current="true" href="{% url 'Dashboard' %}"> Dashboard </a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
29
Templates/components/_sidebar_admin.html
Normal file
29
Templates/components/_sidebar_admin.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% if user.is_authenticated %}
|
||||
{% if user.is_superuser %}
|
||||
<div class="" >
|
||||
<div class="list-group" >
|
||||
{% if user.is_superuser %}
|
||||
<a class="list-group-item list-group-item-action list-group-item-primary" aria-current="true"
|
||||
href="{% url 'DashboardAdmin' %}"> Dashboard Admin </a> {% endif %}
|
||||
{% if user.is_superuser %}
|
||||
<a class="list-group-item list-group-item-action list-group-item-danger" aria-current="true"
|
||||
href="{% url 'DashboardTest' %}"> Dashboard Test </a>{% endif %}
|
||||
|
||||
{% if perms.Base.view_bankaccount %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'BankAccountsListView' %}" > Banks </a> {% endif %}
|
||||
{% if perms.Movement.view_paymentmethod %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'PaymentMethodListView' %}" > Metodos de Pag. </a>{% endif %}
|
||||
{% if perms.Base.view_product %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'ProductListListView' %}" > Lista de Produtos </a> {% endif %}
|
||||
{% if perms.Base.view_professional %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'ProfessionalListView' %}" > Professional </a> {% endif %}
|
||||
{% if perms.Calendar.view_time %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'TimeListView' %}" > Horarios </a> {% endif %}
|
||||
{% if perms.Base.view_service %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'ServiceListListView' %}" > Lista de Service </a> {% endif %}
|
||||
{% if perms.Movement.view_expensemovementt %}
|
||||
<a class="list-group-item list-group-item-action" href="{% url 'AccountListListView' %}" > Lista de Despesa </a> {% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user