diff --git a/main.go b/main.go index d1597e1..8df516c 100644 --- a/main.go +++ b/main.go @@ -68,6 +68,35 @@ function disp(rendus) { document.getElementById("head").appendChild(col); }); } + +function disp_std(rendus, login) { + Object.keys(rendus).map(function(label) { + var work = rendus[label]; + + var row = document.createElement("tr"); + + var col = document.createElement("th"); + col.innerHTML = label; + row.appendChild(col); + + if (work) { + var col = document.createElement("td"); + col.className = "success"; + col.innerHTML = work["date"] + "
" + work["hash"]; + row.appendChild(col); + } else { + var col = document.createElement("td"); + col.className = "danger"; + col.innerHTML = ""; + row.appendChild(col); + } + + document.getElementById("students").appendChild(row); +}); + var col = document.createElement("th"); + col.innerHTML = login; + document.getElementById("head").appendChild(col); +} @@ -80,13 +109,23 @@ function disp(rendus) {