initial upload
This commit is contained in:
73
aem_gestion/templates/parametres/activites.pt
Normal file
73
aem_gestion/templates/parametres/activites.pt
Normal file
@@ -0,0 +1,73 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<style>
|
||||
.redClass{
|
||||
background-color : #E6E6E6;
|
||||
color : #9C9C9C !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<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}/activite_edit/0" class="btn btn-success" role="button" tal:condition="code == 9">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau </a>
|
||||
</p>
|
||||
|
||||
<table id="activites_lists" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Catégorie</th>
|
||||
<th>Code</th>
|
||||
<th>Nom</th>
|
||||
<th>Sté</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#activites_lists').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 10,
|
||||
bLengthChange: false,
|
||||
order: [[ 0, 'desc' ]],
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
createdRow: function( row, data, dataIndex){
|
||||
if( dataIndex === 4 ){
|
||||
$(row).addClass('hidden');
|
||||
}
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
targets: 2,
|
||||
render: function (data, type, full, meta) {
|
||||
return '<a href="/activite_edit/' + full[1] + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
{
|
||||
targets: 0,
|
||||
render: function (data, type, full, meta) {
|
||||
if(type === "sort"){
|
||||
return full[4]
|
||||
}
|
||||
return data;
|
||||
},
|
||||
}
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user