-
Notifications
You must be signed in to change notification settings - Fork 0
/
ViewPost.html
282 lines (251 loc) · 9.68 KB
/
ViewPost.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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>IRF - View Post</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="css/mdb.min.css" rel="stylesheet">
<!-- Your custom styles (optional) -->
<link href="css/style.css" rel="stylesheet">
<script src="WebClientpullingfromDB/viewPosts.js"></script>
<link rel="stylesheet" href="vendor/dataTables/css/jquery.dataTables.min.css">
</head>
<body id="content-page">
<!-- Navbar -->
<nav class="navbar fixed-top navbar-expand-lg navbar-dark scrolling-navbar">
<div class="container">
<!-- Brand -->
<a class="navbar-brand" href="index.html">
<strong>Food Rescue</strong>
</a>
<!-- Collapse -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Links -->
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left -->
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="index.html">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="TheMarket.html">The Market</a>
</li>
<li class="nav-item" id="myposts-menu">
<a class="nav-link" href="MyPosts.html">My Posts</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Contact.html">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="AboutUs.html">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Help.html">Help</a>
</li>
</ul>
<!-- Right -->
<ul class="navbar-nav nav-flex-icons">
<li class="nav-item">
<a href="https://github.com/mdbootstrap/bootstrap-material-design" class="nav-link border border-light rounded"
target="_blank">
Logout
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Navbar -->
<!--Main layout-->
<main>
<div class="container">
<!-- Page Header-->
<div class="row">
<div class="col-lg-6 padding-bottom">
<div class="col-lg-12 no-gutter">
<div class="card">
<div class="card-header d-flex align-items-center">
<h4 id="postTitle">Title</h4>
</div>
<div class="card-body">
<p></p>
<form class="form-horizontal">
<div class="form-group row">
<label class="col-sm-3">Amount</label>
<div class="col-sm-9"><b>
<label id="amount">1</label> lbs</b>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3">Readiness</label>
<div class="col-sm-9"><b>
<label id="readiness"></label></b>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3">Eligibility</label>
<div class="col-sm-9"><b>
<label id="eligibility"></label></b>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3">Description</label>
<div class="col-sm-9"><b>
<label id="description"></label></b>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3">Pickup Window</label>
<div class="col-sm-9"><b>
<label id="pickupWindow"></label></b>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3">Pickup Address</label>
<div class="col-sm-9"><b>
<label id="pickupAddress"></label></b>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3">Creation Date</label>
<div class="col-sm-9"><b>
<label id="creationDate"></label></b>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3">Status</label>
<div class="col-sm-9"><b>
<label id="status"></label></b>
</div>
</div>
<div class="form-group row">
<div class="col-sm-12 text-center">
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#contactDonorModal">
Contact Poster
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<br/>
<div class="col-lg-12 no-gutter">
<div class="card">
<div class="card-header d-flex align-items-center">
<h4>Photo</h4>
</div>
<div class="card-body" id="postPhoto">
<img src="UserUploads/Donations/carrots.jpg" />
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card">
<div class="card-header d-flex align-items-center">
<h4>Location</h4>
</div>
<div class="card-body" id="map" style="height:500px;">
</div>
</div>
</div>
</div>
</div>
</main>
<!--Main layout-->
<!--Footer-->
<footer class="page-footer text-center font-small mt-4 wow fadeIn">
<!--Copyright-->
<div class="footer-copyright py-3">
© 2018 Copyright:
<a href="https://mdbootstrap.com/bootstrap-tutorial/" target="_blank"> MDBootstrap.com </a>
</div>
<!--/.Copyright-->
</footer>
<div class="modal fade" id="contactDonorModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Contact Donor</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<label class="col-sm-3">Subject</label>
<div class="col-sm-12">
<input id="subject" type="text" class="form-control form-control-warning">
</div>
<label class="col-sm-3">Message</label>
<div class="col-sm-12">
<textarea id="contact-message" class="form-control form-control-warning" rows="4"></textarea>
</div>
<br/>
<div class="alert alert-success" role="alert" id="contact-success-message">
Message sent!
</div>
<div class="alert alert-danger" role="alert" id="contact-error-message">
Send failed!
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn" data-dismiss="modal">Close</button>
<button type="button" id="send-message" class="btn btn-primary">Send</button>
</div>
</div>
</div>
</div>
<!--/.Footer-->
<!-- SCRIPTS -->
<script async defer src="WebClientpullingfromDB/google.js">
</script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDuUJl43vI8auaFBkq5WDQC5rF-FV71hK4&callback=initMap">
</script>
<script defer>
//yea boi last minute code.
var str = '';
var str = String(window.location);
str = str.split('id=');
console.log(str[1]);
populateSpecificID(str[1]);
</script>
<!-- JQuery -->
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="js/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="js/mdb.min.js"></script>
<!-- Initializations -->
<script type="text/javascript">
// Animations initialization
new WOW().init();
</script>
<script src="vendor/dataTables/js/jquery.dataTables.min.js"></script>
<!-- Main File-->
<script src="js/Post.js"></script>
<script src="js/User.js"></script>
<script type="text/JavaScript">
$(document).ready( function () {
var id = getUrlParameter("id");
ViewPost(id);
LoadUser();
$("#contact-success-message").hide();
$("#contact-error-message").hide();
} );
</script>
</body>
</html>