This repository has been archived by the owner on Apr 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuser.html
80 lines (63 loc) · 1.84 KB
/
user.html
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
{% autoescape true %}
<html>
<head>
<link rel="stylesheet" type="text/css" href="stylesheets/styles.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,800&subset=latin,greek' rel='stylesheet' type='text/css'>
</head>
<body>
{% include 'header.html' %}
<h1>My Late Plates</h1>
<h3>
Google Account: {{member.user.nickname()}}
<form id="logout-form" action={{logout_url}}>
<input type='submit' value='Logout'>
</form>
</h3>
<form action='/member' method="post">
<h2>Name</h2>
<input type="text" name="name" value="{{member.name}}" />
<input type="submit" value="Change" />
</form>
<div class="hr"></div>
<div id="oneoff_listing">
<h2>My Requests</h2>
<table>
{% for oneoff in oneoff_listing %}
<tr>
<form action="/request" method="POST">
<td>{{oneoff.meal}}</td>
<td>{{oneoff.date.strftime('%A %m/%d') }}</td>
<td>
<input type="submit" value="Delete" />
</td>
<input type="hidden" name="action" value="delete" />
<input type="hidden" name="plate_id" value={{oneoff.key.id()}} />
</form>
</tr>
{% endfor %}
</table>
</div>
<div class="hr"></div>
<div id="new_request">
<form action="/request" method="post">
<h2>Request a plate</h2>
<select name="date">
{% for day in available_oneoff_days %}
<option value="{{day.strftime('%m/%d/%Y')}}">{{day.strftime('%A %m/%d')}}</option>
{% endfor %}
</select>
</br>
{% for meal in meals %}
<input type="radio" name="meal" value="{{meal}}">{{meal}}</input>
<br/>
{% endfor %}
</br>
<input type="submit" value="Request" />
<input hidden=true name="type" value="oneoff" />
<input type="hidden" name="action" value="create" />
</form>
</div>
{% include 'footer.html' %}
</body>
</html>
{% endautoescape %}