-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibrary_db.html
More file actions
129 lines (116 loc) · 5.3 KB
/
library_db.html
File metadata and controls
129 lines (116 loc) · 5.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Library DB</title>
<link rel="stylesheet" href="{{ url_for('static', filename='library_db.css') }}">
</head>
<body>
<div class="search-form">
<div class="heading"><h2>Library Book Search</h2></div>
<form method="POST">
<div class="search_columns">
<div class="search-row">
<div><label for="title-search">Title</label></div>
<div><input type="text" name="title-search" id="title-search" value="Any"></div>
<div class="search-radio"><input type="radio"name="title-search-type" id="" value="full" checked>Full Title</div>
<div class="search-radio"><input type="radio"name="title-search-type" id="" value="partial">Partial Title</div>
</div>
<div class="search-row">
<div><label for="author-search">Author</label></div>
<div><input type="text" name="author-search" id="author-search" value="Any"></div>
<div class="search-radio"><input type="radio"name="author-search-type" id="" value="full" checked>Full Author</div>
<div class="search-radio"><input type="radio"name="author-search-type" id="" value="partial">Partial Author</div>
</div>
</div>
<div class="genre">
<p>Genre:</p>
<div class="genre-columns">
<div class="genre-row">
<div><input type="checkbox" name="genre-selection" value="Arts And Crafts">Arts And Crafts</div>
<div><input type="checkbox" name="genre-selection" value="Biology">Biology</div>
<div><input type="checkbox" name="genre-selection" value="Computer Security">Computer Security</div>
<div><input type="checkbox" name="genre-selection" value="Computers">Computers</div>
</div>
<div class="genre-row">
<div><input type="checkbox" name="genre-selection" value="Cooking">Cooking</div>
<div><input type="checkbox" name="genre-selection" value="Ethical Hacking">Ethical Hacking</div>
<div><input type="checkbox" name="genre-selection" value="Fantasy">Fantasy</div>
<div><input type="checkbox" name="genre-selection" value="Fiction">Fiction</div>
</div>
<div class="genre-row">
<div><input type="checkbox" name="genre-selection" value="Gardening">Gardening</div>
<div><input type="checkbox" name="genre-selection" value="History">History</div>
<div><input type="checkbox" name="genre-selection" value="Horror">Horror</div>
<div><input type="checkbox" name="genre-selection" value="Mystery">Mystery</div>
</div>
<div class="genre-row">
<div><input type="checkbox" name="genre-selection" value="Romance">Romance</div>
<div><input type="checkbox" name="genre-selection" value="Science">Science</div>
<div><input type="checkbox" name="genre-selection" value="Science Fiction">Science Fiction</div>
<div><input type="checkbox" name="genre-selection" value="Self Help">Self Help</div>
</div>
</div>
</div>
<div class="publication">
<p>Year Published:</p>
Min: <input type="text" name="min-publication" id="min-publication" value="0">
Max: <input type="text" name="max-publication" id="max-publication" value="3000">
</div>
<div class="pages">
<p>Pages:</p>
Min: <input type="text" name="min-pages" id="min-pages" value="0">
Max: <input type="text" name="max-pages" id="max-pages" value="9999">
</div>
<div class="sort-by">
<p>Sort By</p>
<input type="radio" name="sort-by-column" id="" value="Book_ID" checked>Book_ID
<input type="radio" name="sort-by-column" id="" value="Title">Title
<input type="radio" name="sort-by-column" id="" value="Author">Author
<input type="radio" name="sort-by-column" id="" value="Genre">Genre
<input type="radio" name="sort-by-column" id="" value="Year_Published">Year Published
<input type="radio" name="sort-by-column" id="" value="Pages">Pages
</div>
<div class="sort-by-type">
<input type="radio" name="sort-by-type" id="" value="ASC" checked>Ascending
<input type="radio" name="sort-by-type" id="" value="DESC">Descending
</div>
<div class="output-columns">
<p>Output Columns:</p>
<input type="checkbox" name="output-columns" id="" value="Book_ID" checked>Book_ID
<input type="checkbox" name="output-columns" id="" value="Title" checked>Title
<input type="checkbox" name="output-columns" id="" value="Author" checked>Author
<input type="checkbox" name="output-columns" id="" value="Genre" checked>Genre
<input type="checkbox" name="output-columns" id="" value="Year_Published" checked>Year Published
<input type="checkbox" name="output-columns" id="" value="Pages" checked>Pages
</div>
<div class="submit-button">
<button type="submit">search</button>
</div>
</form>
</div>
<div class="output-table">
{% if table_data %}
<table>
<thead>
<tr>
{% for header_cell in table_data[0] %}
<th>{{ header_cell }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in table_data[1:] %} {# Start from the second item for data rows #}
<tr>
{% for cell in row %}
<td>{{ cell }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
</body>
</html>