Skip to content
Snippets Groups Projects
Commit 9d9f1a56 authored by ryujungsik's avatar ryujungsik
Browse files

Upload New File

parent a65a2bd1
Branches
No related tags found
No related merge requests found
{% extends "index.html" %}
{% block content %}
<div class="container">
<h2>내 대여</h2>
<table data-toggle="table">
<thead>
<tr>
<th>주문번호</th>
<th>주문자 ID</th>
<th>대여상태</th>
<th>대여일</th>
<th>영화 번호</th>
</tr>
</thead>
<tbody>
{% for order in orders %}
<tr>
<td>{{order[0]}}</td>
<td>{{order[1]}}</td>
{% if order[2] == 1 %}
<td><button onclick="returnMovie(this)">반납하기</button></td>
{% else %}
<td>반납 완료</td>
{% endif %}
<td>{{order[3]}}</td>
<td>{{order[4]}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<script>
function returnMovie(e){
console.log(e.parentNode.parentNode.lastChild.innerText);
const movieID = e.parentNode.parentNode.lastChild.innerText;
window.location.href = "/returnMovie?movieID="+movieID;
}
</script>
{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment