ajout Doc techniques dans dossier_view.pt et articles.pt
This commit is contained in:
166
mondumas/templates/parametres/article_edit.pt
Normal file
166
mondumas/templates/parametres/article_edit.pt
Normal file
@@ -0,0 +1,166 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
<form id="user_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="item"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div id="tarif" class="tab-pane fade in active">
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="REF">Référence</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="REF" name="REF" value="${item.REF}"
|
||||
placeholder="10 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La référence est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="10"
|
||||
data-fv-stringlength-message="10 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2">Famille</label>
|
||||
<div class="col-xs-6">
|
||||
<select class="form-control" id="FAM" name="FAM">
|
||||
<tal:block tal:repeat="famille familles">
|
||||
<option value="${famille}" tal:attributes="selected famille[0]==item.FAM and 'selected' or None">${famille}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBART">Libellé</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBART" name="LIBART" value="${item.LIBART}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le libellé est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL1">Libellé compl. 1</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL1" name="LIBCOMPL1" value="${item.LIBCOMPL1}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL2">Libellé compl. 2</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL2" name="LIBCOMPL2" value="${item.LIBCOMPL2}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL3">Libellé compl. 3</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL3" name="LIBCOMPL3" value="${item.LIBCOMPL3}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="LIBCOMPL4">Libellé compl. 4</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="LIBCOMPL4" name="LIBCOMPL4" value="${item.LIBCOMPL4}"
|
||||
placeholder="45 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="45"
|
||||
data-fv-stringlength-message="45 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Prix HT 1</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="PRIXHT1" name="PRIXHT1" value="${item.PRIXHT1}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Prix HT 2</label>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-euro"></i></span>
|
||||
<input class="form-control" type="text" id="PRIXHT2" name="PRIXHT2" value="${item.PRIXHT2}"
|
||||
data-fv-numeric="true"
|
||||
data-fv-numeric-message="Le montant est invalide" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ref_cli1">Réf. client 1</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="ref_cli1" name="ref_cli1" value="${item.ref_cli1}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="ref_cli2">Réf. client 2</label>
|
||||
<div class="col-xs-6">
|
||||
<input class="form-control" type="text" id="ref_cli2" name="ref_cli2" value="${item.ref_cli2}"
|
||||
placeholder="20 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="20"
|
||||
data-fv-stringlength-message="20 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static" tal:condition="item.REF != '0'">${item.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/articles">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||
tal:condition="item.REF != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#user_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
70
mondumas/templates/parametres/articles.pt
Normal file
70
mondumas/templates/parametres/articles.pt
Normal file
@@ -0,0 +1,70 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1">Famille : </label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="famille" name="famille" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item familles">
|
||||
<option value="${item}" tal:attributes="selected famille==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/article_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvel article</a>
|
||||
</p>
|
||||
|
||||
<table id="articles_list" class="table table-condensed table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Référence</th>
|
||||
<th>Libellé</th>
|
||||
<th>Libellé 2</th>
|
||||
<th class="text-right">Prix HT 1</th>
|
||||
<th class="text-right">Prix HT 2</th>
|
||||
<th>Réf. client 1</th>
|
||||
<th>Réf. client 2</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#articles_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
searching: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-right", "targets": [3,4] },
|
||||
{ targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/article_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div metal:fill-slot="content">logged_in
|
||||
|
||||
<div id="jquery" class="container-fluid">
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/users_list"><span class="glyphicon glyphicon-user logo-primary"></span></a>
|
||||
<a href="${request.application_url}/users"><span class="glyphicon glyphicon-user logo-primary"></span></a>
|
||||
<h4>UTILISATEURS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/rdf_causes_list"><span class="glyphicon glyphicon-tint logo-primary"></span></a>
|
||||
<a href="${request.application_url}/articles"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>ARTICLES</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/rdf_causes"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>RDF : CAUSES</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/text_list"><span class="glyphicon glyphicon-list-alt logo-primary"></span></a>
|
||||
<a href="${request.application_url}/text_list"><span class="glyphicon glyphicon-list logo-primary"></span></a>
|
||||
<h4>TEXTES EMAIL</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<a class="btn btn-default" href="${request.route_url('rdf_causes_list')">
|
||||
<a class="btn btn-default" href="${request.route_url('rdf_causes')">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Annuler</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle cause</a>
|
||||
</p>
|
||||
|
||||
<table id="rdf_causes_list" class="table table-striped table-bordered">
|
||||
<table id="rdf_causes" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD/MM/YYYY - HH:mm');
|
||||
$('#rdf_causes_list').DataTable({
|
||||
$('#rdf_causes').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 50,
|
||||
bLengthChange: false,
|
||||
@@ -92,7 +92,7 @@
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="/users_list"><span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a class="btn btn-default" href="/users"><span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-danger" type="submit" name="form.deleted"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau utilisateur</a>
|
||||
</p>
|
||||
|
||||
<table id="users_list_ua" class="table table-striped table-bordered">
|
||||
<table id="users_ua" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dern cnx</th>
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD/MM/YYYY - HH:mm');
|
||||
$('#users_list_ua').DataTable({
|
||||
$('#users_ua').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 50,
|
||||
bLengthChange: false,
|
||||
|
||||
Reference in New Issue
Block a user