refonte de folder.pt et docs_search.pt

This commit is contained in:
2021-09-13 15:04:39 +02:00
parent 24a23c5f94
commit dd8cdb7564
5 changed files with 277 additions and 193 deletions

View File

@@ -6,18 +6,44 @@
<a href="${request.application_url}/doc_edit/${topic}/0" tal:condition="not layout.isAnonymous()">[&nbsp;Créer&nbsp;]</a>
</p>
<div class="row">
<table class="table">
<tr tal:repeat="ligne docs">
<td><a href="/doc_view/${ligne.doc_id}"><b>${ligne.intitule}</b></a></td>
<td>${ligne.tag1}</td>
<td>${ligne.cree_le.strftime("%d-%m-%Y")}</td>
</tr>
<table id="folder_list" class="table">
<thead>
<tr>
<th>Titre</th>
<th>Tags</th>
<th>Date</th>
<th></th>
</tr>
</thead>
</table>
</div>
<br />
<br />
</div>
<script type="text/javascript">
var dataSet = ${dt_data};
$(document).ready(function() {
$.fn.dataTable.moment('DD/MM/YYYY - HH:mm');
$('#folder_list').DataTable({
data: dataSet,
pageLength: 50,
bLengthChange: false,
language: {
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
},
columnDefs: [
{ "targets": 0,
"render": function (data, type, row, meta) {
// ajouter un link vers le formulaire
return '<a href="/doc_view/' + row[3] + '">' + data + '</a>';
},
},
]
});
});
</script>
</div> <!-- content -->
</div>