Reogarnização dos arquivos estáticos
Arquivos Static agora estão organizados por app e espelham a estrutura dos arquivos Template. Alguns arquivos ainda não estão totalmente adaptados.
This commit is contained in:
1 parent
cf91224602
commit
287cb258a4
41 files changed
+359
-127
No files matched your search
File renamed without changes.
Whitespace-only changes.
@@ -0,0 +1,26 @@
|
||||
.open-rotations-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 30px;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
padding: 10px 5px;
|
||||
}
|
||||
|
||||
.active-rotation-card {
|
||||
min-width: 300px;
|
||||
box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.15);
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
background-color: #343a40;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@media (max-width: 760px){
|
||||
.open-rotations-container {
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
NOVO ANIMAL <br>
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
EDITAR ANIMAL <br>
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
NOVO LOTE <br>
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
EDITAR LOTE <br>
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'layouts/base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
|
||||
+3
-2
@@ -1,9 +1,10 @@
|
||||
{% extends 'base.html' %}
|
||||
{% extends 'layouts/base.html' %}
|
||||
{% load static %}
|
||||
{% load custom_tags %}
|
||||
|
||||
{% block extra_css %}
|
||||
<link rel="stylesheet" href="{% static 'layout/entity_list.css' %}">
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" href="{% static 'layouts/entity_list.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
New - Paddock
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
Edit - Paddock
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
New - Paddock Group
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
Delete - Paddock Group
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
File renamed without changes.
@@ -1,4 +1,4 @@
|
||||
{% extends 'base_modal.html' %}
|
||||
{% extends 'layouts/base_modal.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
@@ -7,5 +7,5 @@
|
||||
|
||||
{% block content %}
|
||||
New - Rotation
|
||||
{% include 'includes/_form.html' %}
|
||||
{% include 'components/form.html' %}
|
||||
{% endblock %}
|
||||
@@ -1,48 +0,0 @@
|
||||
{% extends 'entity_list.html' %}
|
||||
{% load custom_tags %}
|
||||
|
||||
{% block before_table %}
|
||||
<p>Movimentações em aberto</p>
|
||||
<div class="open-rotations-container" style="display: flex; flex-direction: row; gap: 30px;"> <!-- TIRAR O STYLE DAQUI DEPOIS -->
|
||||
{% if not open_rotations %}
|
||||
<p>Nenhuma movimentação em aberto</p>
|
||||
{% else %}
|
||||
|
||||
{% for obj in open_rotations %}
|
||||
{% include "_active_rotation_card.html" %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block table %}
|
||||
<table>
|
||||
<tr>
|
||||
{% for col in columns %}
|
||||
<th>{{ col.label }}</th>
|
||||
{% endfor %}
|
||||
<th>Excluir</th>
|
||||
</tr>
|
||||
|
||||
{% for obj in object_list %}
|
||||
<tr>
|
||||
{% for col in columns %}
|
||||
<td>
|
||||
{{ obj|get_attr:col.field }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Delete -->
|
||||
<td>
|
||||
<form method="POST" action="{% url delete_url obj.id %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn-icon-trash">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,89 @@
|
||||
{% extends 'layouts/entity_list.html' %}
|
||||
{% load custom_tags %}
|
||||
{% load static %}
|
||||
|
||||
{% block extra_css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" href="{% static 'rotation/css/rotation_list.css' %}">
|
||||
{% endblock extra_css %}
|
||||
|
||||
{% block before_table %}
|
||||
<p>Movimentações em aberto</p>
|
||||
<div class="open-rotations-container">
|
||||
{% if not open_rotations %}
|
||||
<p>Nenhuma movimentação em aberto</p>
|
||||
{% else %}
|
||||
|
||||
{% for obj in open_rotations %}
|
||||
<div class="active-rotation-card">
|
||||
<div class="identification">
|
||||
<p>{{ obj.batch.identifier }} em piquete {{ obj.paddock.paddock_number }}</p>
|
||||
</div>
|
||||
|
||||
<div class="duration">
|
||||
<p>Há {{ obj.duration_display_day }} dias, desde {{ obj.entry_date|date:"d/m/Y" }}</p>
|
||||
</div>
|
||||
|
||||
<div class="animals">
|
||||
<p>Animais: {{ obj.animal_count }}</p>
|
||||
</div>
|
||||
|
||||
<div class="livestock">
|
||||
<p>UGM: {{ obj.livestock_unit }}</p>
|
||||
</div>
|
||||
|
||||
<div class="details">
|
||||
<a href="{% url details_url %}">Ver mais</a>
|
||||
</div>
|
||||
</div>
|
||||
{% include "rotation/active_rotation_card.html" %}
|
||||
{% endfor %}
|
||||
{% for obj in open_rotations %}
|
||||
{% include "rotation/active_rotation_card.html" %}
|
||||
{% endfor %}
|
||||
{% for obj in open_rotations %}
|
||||
{% include "rotation/active_rotation_card.html" %}
|
||||
{% endfor %}
|
||||
{% for obj in open_rotations %}
|
||||
{% include "rotation/active_rotation_card.html" %}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block table %}
|
||||
<table>
|
||||
<tr>
|
||||
{% for col in columns %}
|
||||
<th>{{ col.label }}</th>
|
||||
{% endfor %}
|
||||
<th>Excluir</th>
|
||||
</tr>
|
||||
|
||||
{% for obj in object_list %}
|
||||
<tr>
|
||||
{% for col in columns %}
|
||||
<td>
|
||||
{{ obj|get_attr:col.field }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Delete -->
|
||||
<td>
|
||||
<form method="POST" action="{% url delete_url obj.id %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn-icon-trash">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static "rotation/js/rotation_list.js" %}"></script>
|
||||
{% endblock extra_js %}
|
||||
@@ -35,7 +35,7 @@ def animal_update(request, animal_id):
|
||||
def animal_delete(request, animal_id):
|
||||
if request.method == 'GET':
|
||||
context = services.get_animal_delete_context(request, animal_id)
|
||||
return render(request, 'confirmation_popup.html', context)
|
||||
return render(request, 'components/confirmation_popup.html', context)
|
||||
|
||||
if request.method == 'POST':
|
||||
services.delete_animal(request, animal_id)
|
||||
@@ -74,7 +74,7 @@ def batch_update(request, batch_id):
|
||||
def batch_delete(request, batch_id):
|
||||
if request.method == 'GET':
|
||||
context = services.get_batch_delete_context(request, batch_id)
|
||||
return render(request, 'confirmation_popup.html', context)
|
||||
return render(request, 'components/confirmation_popup.html', context)
|
||||
|
||||
if request.method == 'POST':
|
||||
services.delete_batch(request, batch_id)
|
||||
|
||||
@@ -37,7 +37,7 @@ def farm_update(request, farm_id):
|
||||
def farm_delete(request, farm_id):
|
||||
if request.method == 'GET':
|
||||
context = services.get_farm_delete_context(request, farm_id)
|
||||
return render(request, 'confirmation_popup.html', context)
|
||||
return render(request, 'components/confirmation_popup.html', context)
|
||||
|
||||
if request.method == 'POST':
|
||||
services.delete_farm(request, farm_id)
|
||||
@@ -74,7 +74,7 @@ def paddock_update(request, paddock_id):
|
||||
def paddock_delete(request, paddock_id):
|
||||
if request.method == 'GET':
|
||||
context = services.get_paddock_delete_context(request, paddock_id)
|
||||
return render(request, 'confirmation_popup.html', context)
|
||||
return render(request, 'components/confirmation_popup.html', context)
|
||||
|
||||
if request.method == 'POST':
|
||||
services.delete_paddock(request, paddock_id)
|
||||
@@ -115,7 +115,7 @@ def paddock_group_update(request, paddock_group_id):
|
||||
def paddock_group_delete(request, paddock_group_id):
|
||||
if request.method == 'GET':
|
||||
context = services.get_paddock_group_delete_context(request, paddock_group_id)
|
||||
return render(request, 'confirmation_popup.html', context)
|
||||
return render(request, 'components/confirmation_popup.html', context)
|
||||
|
||||
if request.method == 'POST':
|
||||
services.delete_paddock_group(request, paddock_group_id)
|
||||
|
||||
@@ -4,7 +4,7 @@ from entities.models.farm import Farm
|
||||
from django.shortcuts import redirect
|
||||
|
||||
class BaseListView(ListView):
|
||||
template_name = "entity_list.html"
|
||||
template_name = "layouts/entity_list.html"
|
||||
paginate_by = 10
|
||||
selected_farm = ""
|
||||
order_by = ["-id"]
|
||||
|
||||
@@ -13,12 +13,12 @@ def user_login(request):
|
||||
context = services.get_user_login_context(request)
|
||||
|
||||
if request.method == 'GET':
|
||||
return render(request, 'login.html', context)
|
||||
return render(request, 'pages/login.html', context)
|
||||
|
||||
if request.method == 'POST':
|
||||
if not services.user_login(request):
|
||||
context['fail_login'] = True
|
||||
return render(request, 'login.html', context)
|
||||
return render(request, 'pages/login.html', context)
|
||||
|
||||
return redirect('entities:user:farm_select')
|
||||
|
||||
@@ -36,7 +36,7 @@ def farm_select(request):
|
||||
if result.get('redirect'):
|
||||
return redirect(result['redirect'])
|
||||
|
||||
return render(request, 'farm_select.html', result['context'])
|
||||
return render(request, 'pages/farm_select.html', result['context'])
|
||||
|
||||
|
||||
def farm_set(request, farm_id=None):
|
||||
|
||||
Reference in new issue
Block a user