added tarifs_import with xlrd
This commit is contained in:
72
mondumas/templates/parametres/tarifs.pt
Normal file
72
mondumas/templates/parametres/tarifs.pt
Normal file
@@ -0,0 +1,72 @@
|
||||
<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 tarif</a>
|
||||
<a href="${request.application_url}/tarifs_import" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-import"></span> Import tarifs</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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user