clean big tables forms
This commit is contained in:
parent
4344b7d537
commit
c11c3f84ed
12 changed files with 67 additions and 55 deletions
|
@ -539,11 +539,7 @@ class OrderArticleForm(forms.Form):
|
||||||
self.category = kwargs['initial']['category']
|
self.category = kwargs['initial']['category']
|
||||||
self.category_name = kwargs['initial']['category__name']
|
self.category_name = kwargs['initial']['category__name']
|
||||||
self.box_capacity = kwargs['initial']['box_capacity']
|
self.box_capacity = kwargs['initial']['box_capacity']
|
||||||
self.v_s1 = kwargs['initial']['v_s1']
|
self.v_all = kwargs['initial']['v_all']
|
||||||
self.v_s2 = kwargs['initial']['v_s2']
|
|
||||||
self.v_s3 = kwargs['initial']['v_s3']
|
|
||||||
self.v_s4 = kwargs['initial']['v_s4']
|
|
||||||
self.v_s5 = kwargs['initial']['v_s5']
|
|
||||||
self.v_moy = kwargs['initial']['v_moy']
|
self.v_moy = kwargs['initial']['v_moy']
|
||||||
self.v_et = kwargs['initial']['v_et']
|
self.v_et = kwargs['initial']['v_et']
|
||||||
self.v_prev = kwargs['initial']['v_prev']
|
self.v_prev = kwargs['initial']['v_prev']
|
||||||
|
|
|
@ -33,10 +33,8 @@ textarea {
|
||||||
.table {
|
.table {
|
||||||
margin-bottom:0;
|
margin-bottom:0;
|
||||||
border-bottom:1px solid #ddd;
|
border-bottom:1px solid #ddd;
|
||||||
}
|
|
||||||
|
|
||||||
.table {
|
|
||||||
width:100%;
|
width:100%;
|
||||||
|
background-color: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table td {
|
.table td {
|
||||||
|
@ -70,6 +68,11 @@ textarea {
|
||||||
padding:8px 30px;
|
padding:8px 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-responsive {
|
||||||
|
border: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
transition: background-color, color;
|
transition: background-color, color;
|
||||||
transition-duration: 0.15s;
|
transition-duration: 0.15s;
|
||||||
|
|
|
@ -51,6 +51,15 @@
|
||||||
box-shadow: inset 0 5px 5px -5px #000;
|
box-shadow: inset 0 5px 5px -5px #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.navbar-nav > li:hover > a,
|
||||||
|
.navbar-nav > li > a:focus,
|
||||||
|
.nav .open > a:hover,
|
||||||
|
.nav .open > a:focus {
|
||||||
|
box-shadow: inset 0 5px 5px -5px #000, inset 0 -5px 5px -5px #000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.navbar-nav .dropdown .dropdown-menu {
|
.navbar-nav .dropdown .dropdown-menu {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
|
@ -11,10 +11,9 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include 'kfet/base_messages.html' %}
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
||||||
|
{% include 'kfet/base_messages.html' %}
|
||||||
<div class="content-center content-form">
|
<div class="content-center content-form">
|
||||||
<form action="" method="post" class="account_create">
|
<form action="" method="post" class="account_create">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -12,10 +12,9 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "kfet/base_messages.html" %}
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
||||||
|
{% include "kfet/base_messages.html" %}
|
||||||
<div class="content-center content-form">
|
<div class="content-center content-form">
|
||||||
<form action="" method="post" class="form-horizontal">
|
<form action="" method="post" class="form-horizontal">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -22,10 +22,9 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include "kfet/base_messages.html" %}
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
||||||
|
{% include "kfet/base_messages.html" %}
|
||||||
<div class="content-center content-form">
|
<div class="content-center content-form">
|
||||||
<form action="" method="post" class="form-horizontal">
|
<form action="" method="post" class="form-horizontal">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{% include "kfet/base_messages.html" %}
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
||||||
|
{% include "kfet/base_messages.html" %}
|
||||||
<div class="content-center content-form">
|
<div class="content-center content-form">
|
||||||
<form action="" method="post" class="form-horizontal">
|
<form action="" method="post" class="form-horizontal">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li>
|
<li class="hidden-xs">
|
||||||
<a href="{% url 'kfet.home' %}">
|
<a href="{% url 'kfet.home' %}">
|
||||||
<span class="glyphicon glyphicon-home"></span>
|
<span class="glyphicon glyphicon-home"></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include 'kfet/base_messages.html' %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
<div class="col-sm-12 col-md-10 col-md-offset-1 nopadding">
|
||||||
|
{% include 'kfet/base_messages.html' %}
|
||||||
<div class="content-center">
|
<div class="content-center">
|
||||||
<div class="content-right-block">
|
<div class="content-right-block">
|
||||||
<h2>Carte</h2>
|
<h2>Carte</h2>
|
||||||
|
|
|
@ -12,11 +12,12 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include 'kfet/base_messages.html' %}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-8 col-md-offset-2 nopadding">
|
<div class="col-sm-12 col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2 nopadding">
|
||||||
|
{% include 'kfet/base_messages.html' %}
|
||||||
<div class="content-center">
|
<div class="content-center">
|
||||||
<form id='inventoryform' action="" method="post">
|
<form id='inventoryform' action="" method="post">
|
||||||
|
<div class="table-responsive">
|
||||||
<table class="table table-condensed text-center">
|
<table class="table table-condensed text-center">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -76,6 +77,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
{{ formset.management_form }}
|
{{ formset.management_form }}
|
||||||
{% if not perms.kfet.add_inventory %}
|
{% if not perms.kfet.add_inventory %}
|
||||||
<div class='auth-form form-horizontal'>
|
<div class='auth-form form-horizontal'>
|
||||||
|
|
|
@ -6,28 +6,31 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="content-center">
|
<div class="row">
|
||||||
<div>
|
<div class="col-sm-12 col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2 nopadding">
|
||||||
|
{% include "kfet/base_messages.html" %}
|
||||||
|
<div class="content-center">
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table class="table text-center">
|
<div class="table-responsive">
|
||||||
|
<table class="table table-condensed text-center">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td rowspan="2">Article</td>
|
<td rowspan="2">Article</td>
|
||||||
<td colspan="5">Ventes
|
<td colspan="5">Ventes
|
||||||
<span class='glyphicon glyphicon-question-sign' title="Ventes des 5 dernières semaines" data-placement="bottom"></span>
|
<span class='glyphicon glyphicon-question-sign' title="Ventes des 5 dernières semaines" data-placement="bottom"></span>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2">V. moy.
|
<td rowspan="2">V. moy.<br>
|
||||||
<span class='glyphicon glyphicon-question-sign' title="Moyenne des ventes" data-placement="bottom"></span>
|
<span class='glyphicon glyphicon-question-sign' title="Moyenne des ventes" data-placement="bottom"></span>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2">E.T.
|
<td rowspan="2">E.T.<br>
|
||||||
<span class='glyphicon glyphicon-question-sign' title="Écart-type des ventes" data-placement="bottom"></span>
|
<span class='glyphicon glyphicon-question-sign' title="Écart-type des ventes" data-placement="bottom"></span>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2">Prév.
|
<td rowspan="2">Prév.<br>
|
||||||
<span class='glyphicon glyphicon-question-sign' title="Prévision de ventes" data-placement="bottom"></span>
|
<span class='glyphicon glyphicon-question-sign' title="Prévision de ventes" data-placement="bottom"></span>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2">Stock</td>
|
<td rowspan="2">Stock</td>
|
||||||
<td rowspan="2">Rec.
|
<td rowspan="2">Rec.<br>
|
||||||
<span class='glyphicon glyphicon-question-sign' title="Quantité conseillée" data-placement="bottom"></span>
|
<span class='glyphicon glyphicon-question-sign' title="Quantité conseillée" data-placement="bottom"></span>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="2">Commande</td>
|
<td rowspan="2">Commande</td>
|
||||||
|
@ -51,21 +54,20 @@
|
||||||
<tr>
|
<tr>
|
||||||
{{ form.article }}
|
{{ form.article }}
|
||||||
<td>{{ form.name }}</td>
|
<td>{{ form.name }}</td>
|
||||||
<td>{{ form.v_s1 }}</td>
|
{% for v_chunk in form.v_all %}
|
||||||
<td>{{ form.v_s2 }}</td>
|
<td>{{ v_chunk }}</td>
|
||||||
<td>{{ form.v_s3 }}</td>
|
{% endfor %}
|
||||||
<td>{{ form.v_s4 }}</td>
|
|
||||||
<td>{{ form.v_s5 }}</td>
|
|
||||||
<td>{{ form.v_moy }}</td>
|
<td>{{ form.v_moy }}</td>
|
||||||
<td>{{ form.v_et }}</td>
|
<td>{{ form.v_et }}</td>
|
||||||
<td>{{ form.v_prev }}</td>
|
<td>{{ form.v_prev }}</td>
|
||||||
<td>{{ form.stock }}</td>
|
<td>{{ form.stock }}</td>
|
||||||
<td>{{ form.c_rec }}</td>
|
<td>{{ form.c_rec }}</td>
|
||||||
<td>{{ form.quantity_ordered | add_class:"form-control" }}</td>
|
<td class="nopadding">{{ form.quantity_ordered | add_class:"form-control" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
{{ formset.management_form }}
|
{{ formset.management_form }}
|
||||||
{% if not perms.kfet.add_inventory %}
|
{% if not perms.kfet.add_inventory %}
|
||||||
<div class='auth-form form-horizontal'>
|
<div class='auth-form form-horizontal'>
|
||||||
|
@ -75,6 +77,7 @@
|
||||||
<input type="submit" value="Enregistrer" class="btn btn-primary btn-lg btn-block">
|
<input type="submit" value="Enregistrer" class="btn btn-primary btn-lg btn-block">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
{% extends 'kfet/base.html' %}
|
{% extends 'kfet/base.html' %}
|
||||||
{% load widget_tweaks %}
|
{% load widget_tweaks %}
|
||||||
|
|
||||||
{% block title %}{% endblock %}
|
{% block title %}Nouvel inventaire{% endblock %}
|
||||||
{% block content-header-title %}{% endblock %}
|
{% block content-header-title %}Création d'inventaire depuis une commande{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include 'kfet/base_messages.html' %}
|
<div class="row">
|
||||||
|
<div class="col-sm-12 col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2 nopadding">
|
||||||
<div class="content-center">
|
{% include "kfet/base_messages.html" %}
|
||||||
<div>
|
<div class="content-center">
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table class='table text-center'>
|
<div class="table-responsive">
|
||||||
|
<table class='table table-condensed text-center'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:25%">Article</td>
|
<td style="width:25%">Article</td>
|
||||||
|
@ -25,23 +26,24 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for form in formset %}
|
{% for form in formset %}
|
||||||
{% ifchanged form.category %}
|
{% ifchanged form.category %}
|
||||||
<tr class='section'>
|
<tr class='section'>
|
||||||
<td>{{ form.category_name }}</td>
|
<td>{{ form.category_name }}</td>
|
||||||
<td colspan="5"></td>
|
<td colspan="5"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endifchanged %}
|
{% endifchanged %}
|
||||||
<tr>
|
<tr>
|
||||||
{{ form.article }}
|
<td>{{ form.name }}</td>
|
||||||
<td>{{ form.name }}</td>
|
<td class="nopadding">{{ form.price_HT | add_class:"form-control" }}</td>
|
||||||
<td>{{ form.price_HT | add_class:"form-control" }}</td>
|
<td class="nopadding">{{ form.TVA | add_class:"form-control" }}</td>
|
||||||
<td>{{ form.TVA | add_class:"form-control" }}</td>
|
<td class="nopadding">{{ form.rights | add_class:"form-control" }}</td>
|
||||||
<td>{{ form.rights | add_class:"form-control" }}</td>
|
<td>{{ form.quantity_ordered }}</td>
|
||||||
<td>{{ form.quantity_ordered }}</td>
|
<td class="nopadding">{{ form.quantity_received | add_class:"form-control" }}</td>
|
||||||
<td>{{ form.quantity_received | add_class:"form-control" }}</td>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
{{ formset.management_form }}
|
{{ formset.management_form }}
|
||||||
{% if not perms.kfet.add_inventory %}
|
{% if not perms.kfet.add_inventory %}
|
||||||
<div class='auth-form form-horizontal'>
|
<div class='auth-form form-horizontal'>
|
||||||
|
@ -51,6 +53,7 @@
|
||||||
<input type="submit" value="Enregistrer" class="btn btn-primary btn-lg btn-block">
|
<input type="submit" value="Enregistrer" class="btn btn-primary btn-lg btn-block">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue