forked from haris989/Python-Flask-Blog
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathdashboard.html
More file actions
74 lines (57 loc) · 1.83 KB
/
dashboard.html
File metadata and controls
74 lines (57 loc) · 1.83 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
{% extends "layout.html" %}
{% block body %}
<!-- Page Header -->
<header class="masthead" style="background-image: url('{{ url_for('static', filename='img/home-bg.jpg') }}')">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="site-heading">
<h1>Admin Panel</h1>
<span class="subheading">Manage your posts and change them from here.</span>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<h1>Basic Actions</h1>
<a href="/edit/0"> <button class="btn btn-primary"> Add a new post</button></a>
<a href="/logout"> <button class="btn btn-primary"> Logout</button></a>
<hr>
<h1>Upload A File</h1>
<form action="/uploader" method="post" enctype="multipart/form-data">
<input type="file" name="file1">
<button type="submit" class="btn btn-primary">Submit</button>
</form>
<hr>
<h1>Edit Posts</h1>
<table class="table">
<thead>
<tr>
<th>Sno</th>
<th>Title</th>
<th>Date</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
{% for post in posts %}
<tr>
<td>{{post.sno}}</td>
<td>{{post.title}}</td>
<td>{{post.date}}</td>
<td><a href="/edit/{{post.sno}}"><button class="btn btn-primary" >Edit</button></a></td>
<td><a href="/delete/{{post.sno}}"><button class="btn btn-primary">Delete</button></a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}