60 lines
2.7 KiB
HTML
60 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Edit Book Metadata</title>
|
|
<link rel="stylesheet" href="style.css"> </head>
|
|
<body>
|
|
<h1>Edit Book Metadata</h1>
|
|
|
|
<button id="add-new-book-button" style="margin-bottom: 10px;">Add New Book</button>
|
|
<div id="book-list-container">
|
|
<!-- Books will be listed here by JavaScript -->
|
|
</div>
|
|
|
|
<!-- Modal for editing metadata -->
|
|
<div id="edit-modal" class="modal" style="display:none;">
|
|
<div class="modal-content">
|
|
<span class="close-button">×</span>
|
|
<h2>Edit Metadata for <span id="modal-book-title"></span></h2>
|
|
<input type="hidden" id="modal-book-id">
|
|
|
|
<div>
|
|
<label for="modal-search-query">Search Google Books:</label>
|
|
<input type="text" id="modal-search-query">
|
|
<button id="modal-search-button">Search</button>
|
|
</div>
|
|
|
|
<div id="modal-search-results">
|
|
<!-- Google Books API search results will appear here -->
|
|
</div>
|
|
|
|
<hr>
|
|
<h3>Selected Book Details (Editable)</h3>
|
|
<div><label>Title: <input type="text" id="modal-edit-title"></label></div>
|
|
<div><label>Authors: <input type="text" id="modal-edit-authors"></label></div>
|
|
<div><label>Published Date: <input type="text" id="modal-edit-publishedDate"></label></div>
|
|
<div><label>ISBN: <input type="text" id="modal-edit-isbn"></label></div>
|
|
<div><label>Description: <textarea id="modal-edit-description"></textarea></label></div>
|
|
<div><label>Pages: <input type="number" id="modal-edit-pages"></label></div>
|
|
<div><label>Publishers: <input type="text" id="modal-edit-publishers"></label></div>
|
|
<div><label>Subjects: <input type="text" id="modal-edit-subjects"></label></div>
|
|
<div>
|
|
<label for="modal-edit-location">Location:</label>
|
|
<select id="modal-edit-location" name="location_id">
|
|
<option value="">-- No Location --</option>
|
|
<!-- Location options will be populated by JavaScript -->
|
|
</select>
|
|
</div>
|
|
<div><label>Cover (Small): <input type="text" id="modal-edit-cover-small"></label></div>
|
|
<div><label>Cover (Medium): <input type="text" id="modal-edit-cover-medium"></label></div>
|
|
|
|
<button id="modal-save-button">Save Changes</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="edit_books.js"></script>
|
|
</body>
|
|
</html>
|