fix: member template
This commit is contained in:
parent
3ba2416855
commit
e7d2a62b4a
@ -9,27 +9,30 @@
|
||||
</title>
|
||||
|
||||
<%- include('partials/links.ejs') %>
|
||||
<style>
|
||||
#box-register-form {
|
||||
<style>
|
||||
#box-register-form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: max(30vw, 60ch);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#box-register-form select, #box-register-form input {
|
||||
padding: .5rem 1rem;
|
||||
}
|
||||
|
||||
|
||||
i { color: var(--bg); }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function removeBox(id) {
|
||||
fetch(window.location.origin + '/boxes/' + id + '/' + <%= member.id_member%>, { method: 'DELETE' }).then(r => window.location.reload());
|
||||
}
|
||||
</script>
|
||||
|
||||
#box-register-form select,
|
||||
#box-register-form input {
|
||||
padding: .5rem 1rem;
|
||||
}
|
||||
|
||||
|
||||
i {
|
||||
color: var(--bg);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function removeBox(id) {
|
||||
fetch(window.location.origin + '/boxes/' + id + '/' + <%= member.id_member %>, {method: 'DELETE'}).then(r => window.location.reload());
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -58,7 +61,9 @@
|
||||
<select name="id_box" id="id_box">
|
||||
|
||||
<% allboxes.forEach(function(box) { %>
|
||||
<option value="<%=box.id%>"><%=box.id%></option>
|
||||
<option value="<%=box.id%>">
|
||||
<%=box.id%>
|
||||
</option>
|
||||
<% }); %>
|
||||
</select>
|
||||
|
||||
@ -168,19 +173,26 @@
|
||||
<td>
|
||||
<%=model.name%>
|
||||
</td>
|
||||
<td><a href="/membres/byid/<%=model.creator%>"><i class="fa-solid fa-user"></i>
|
||||
<%=model.creator%>
|
||||
<% if (model.creator===undefined) {%>
|
||||
|
||||
<td></td>
|
||||
<% } else {%>
|
||||
<td><a href="/membres/byid/<%=model.creator.id_member%>"><i class="fa-solid fa-user"></i>
|
||||
<%=model.creator.name%>
|
||||
</a></td>
|
||||
<% } %>
|
||||
<td><a href="/models/byname/<%=model.name%>"><i class="fa-solid fa-eye"></i></a></td>
|
||||
</tr>
|
||||
|
||||
<% }); %>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
</main>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user