Commit dd45b5ea authored by Clement Brizard's avatar Clement Brizard

Added dataTable

parent 1309e34d
......@@ -8,9 +8,7 @@ router.use('/syntheses', require('./synthese'));
// Home page
router.get('/', (req, res) => {
res.render('index', {
title: 'AgoraViz',
});
res.redirect('/debates');
});
// About page
......
$(document).ready(function () {
$('#debates').DataTable();
})
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" />
<% include ../../partials/head %>
<title><%= title %></title>
</head>
<body>
<h1>Débats en cours</h1>
<header>
<% include ../../partials/header %>
<h2>Débats en cours</h2>
</header>
<div class="container-fluid">
<br>
<div class="row">
<div class="col-md-12">
<table id="debates" class="table table-striped table-bordered">
<table id="debates" class="display" style="width:100%">
<thead>
<tr>
<th>Titre</th>
......@@ -44,15 +49,16 @@
</tr>
<% }); %>
</tbody>
</table>
</div>
</div>
</div>
<footer>
<% include ../../partials/footer %>
</footer>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/javascript/debates.js"></script>
</body>
</html>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment