- add edit button
This commit is contained in:
@@ -93,8 +93,9 @@
|
||||
<div style="width: 300px;">
|
||||
<img src="<%= it.cover %>" alt="Cover image" style="width: 100%;"></img><br>
|
||||
<center><%= it.titleByAPI %><br><i><%= it.id %></i><br>
|
||||
<b>Art: </b> <%= it.type %></center>
|
||||
</div>
|
||||
<b>Type: </b> <%= it.type %></center>
|
||||
</div><br>
|
||||
<button onclick="handleEdit()" id="editBtn"><i class="fas fa-pen"></i> Edit</button>
|
||||
<button onclick="handelDelete()" id="delBtn"><i class="fas fa-trash"></i> Delete</button>
|
||||
<button onclick="window.location.href = '/'"><i class="fas fa-home"></i> Back to home</button>
|
||||
</div>
|
||||
@@ -111,6 +112,11 @@
|
||||
document.getElementById("overlay2").style.display = "none";
|
||||
}
|
||||
|
||||
function handleEdit(){
|
||||
console.log("Editing movie")
|
||||
window.location.href = '/editDetails?id=<%= it.id %>';
|
||||
}
|
||||
|
||||
function sureDelete(){
|
||||
console.log("Deleting movie")
|
||||
url = "/delete?id=<%= it.internalID %>";
|
||||
|
||||
Reference in New Issue
Block a user