-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.html
299 lines (289 loc) · 14.9 KB
/
dashboard.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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<!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>evntbindr. | The world's party planner</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.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">
<link href="css/style.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<link rel='stylesheet' type='text/css' href='http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css' />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<style rel="stylesheet">
/* TEMPLATE STYLES */
.avatar {
border-radius: 50%;
width: 120px;
height: auto;
margin: -65px auto 0;
border: 5px solid #fff;
background: #FFF;
}
.avatar img {
width: 100%;
}
.file_input_div {
margin: auto;
width: 250px;
height: 40px;
}
/* .file_input {
float: left;
}*/
/* #file_input_text_div {
width: 50%;
margin-top: -8px;
margin-left: 5px;
}*/
.none {
display: none;
}
</style>
</head>
<body>
<!--Navigation & Intro-->
<header>
<!--Navbar-->
<nav class="navbar navbar-toggleable-md navbar-dark ">
<div class="container">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNav1" aria-controls="navbarNav1" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="index.html">
<strong>evntbindr.</strong>
</a>
<ul class="nav navbar-nav ml-auto nav-flex-icons">
<li class="nav-item log_in">
<a class="nav-link" href="#!" id="login_with_google">log in <i class="fa fa-google"></i></a>
</li>
<li class="nav-item dropdown btn-group">
<a id="user_name" class="nav-link dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">user</a>
<div class="dropdown-menu dropdown" aria-labelledby="dropdownMenu1">
<a class="dropdown-item"><i class="fa fa-dashboard" aria-hidden="true"></i> Dashboard</a>
<a class="dropdown-item" id="logout" href="index.html"><i class="fa fa-sign-out" aria-hidden="true"></i> Log Out</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
<!--/.Navbar-->
</header>
<!--/Navigation & Intro-->
<!--Main layout-->
<div class="container">
<div class="divider-new">
<h2 class="h2-responsive wow fadeIn" data-wow-delay="0.2s"><i class="fa fa-dashboard" aria-hidden="true"></i> Dashboard</h2>
</div>
<div class="row" style="margin-bottom: 10px;">
<!--Sidebar-->
<div class="col-lg-3 col-md-3 wow fadeIn" data-wow-delay="0.2s">
<div class="widget-wrapper wow fadeIn" data-wow-delay="0.4s">
<div class="card">
<div class="avatar">
<img id="user_img" src="http://via.placeholder.com/64x64" class="img-fluid rounded-circle z-depth-1">
</div>
<div class="container">
<h4><span id="dash_name">Full Name</span></h4>
<p class="title"><span id="user_email">e-mail id</span>
<br><span id="user_phone">phone number</span></p>
<div style="margin: 24px 0;">
</div>
</div>
<div class="list-group">
<a href="#" class="list-group-item active">Dashboard</a>
<a class="list-group-item">
<p>Messages <span class="badge grey">Coming Soon</span></p>
</a>
</div>
</div>
</div>
<br>
<div class="card z-index-2">
<div class="container papaya" style="padding:15px;text-align: center;">
<h4><span id="user_views">xxxxxx</span></h4>
<p class="title" style="color: #ffffff;"><strong>people are interested in your venue this week</strong></p>
</div>
</div>
</div>
<!--/.Sidebar-->
<div class="col-md-9">
<h5>YOUR VENUES</h5>
<div class="row" id="venues">
</div>
<!--Registration Form and FAB-->
<a class="btn btn-large btn-primary z-depth-2" style="height: 70px; width:70px;border-radius: 60%; position: fixed; bottom: 15px; right: 15px;" onclick="show('reg_form')"><i class="fa fa-plus fa-lg flex-center"></i></a>
<!--Form_Card-->
<form id="add_venue">
<div class="card z-depth-2" style="position: fixed; z-index: 1000; top: 30px; display: none; overflow-y: scroll; height: 90vh; width: 50vw;" id="reg_form">
<div class="card-block">
<h4 class="card-title flex-center">Register your venue</h4>
<hr>
<a href="" style="position: absolute; top: 10px; right: 10px;" onclick="hide('reg_form')"><i class="fa fa-close aqua-i"></i></a>
<!--Body-->
<div class="md-form">
<i class="fa fa-building prefix aqua-i"></i>
<input type="text" id="name" class="form-control" placeholder="Name of the Venue" style="color:black;">
</div>
<div class="md-form">
<i class="fa fa-info prefix"></i>
<input type="text" id="description" class="form-control" placeholder="Description" style="color:black;">
</div>
<div class="md-form">
<i class="fa fa-map-marker prefix"></i>
<input type="text" id="location" class="form-control" placeholder="Location" style="color:black;">
</div>
<div class="md-form">
<i class="fa fa-home prefix"></i>
<input type="text" id="venue_type" class="form-control" placeholder="Type (e.g banquet hall/restaurants etc)" style="color:black;">
</div>
<div class="md-form">
<i class="fa fa-sun-o prefix"></i>
<input type="text" id="setting" class="form-control" placeholder="Indoor/Outdoor" style="color:black;">
</div>
<div class="md-form">
<i class="fa fa-group prefix"></i>
<input type="text" id="capacity" class="form-control" placeholder="Capacity" style="color:black;">
</div>
<div class="md-form">
<i class="fa fa-inr prefix"></i>
<input type="text" id="price" class="form-control" placeholder="Price" style="color:black;">
</div>
<div class="md-form">
<i class="fa fa-wifi prefix"></i>
<input type="text" id="amenities" class="form-control" placeholder="Amenities" style="color:black;">
</div>
<div class="md-form">
<i class="fa fa-warning prefix"></i>
<input type="text" id="rules" class="form-control" placeholder="Rules (if any)" style="color:black;">
</div>
<div class="row">
<div class="col-md-5">
<div class="md-form file_input">
<label class="image_input_button mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored">
<a class="btn btn-primary"> Upload an Image</a>
<input id="mediaCapture" class="none" type="file" />
</label>
</div>
</div>
<div class="col-md-7">
<div id="file_input_text_div" class="mdl-textfield mdl-js-textfield textfield-demo">
<input class="file_input_text mdl-textfield__input" type="text" disabled readonly id="file_input_text" />
<label class="mdl-textfield__label" for="file_input_text"></label>
</div>
</div>
</div>
<p>
<div class="text-center">
<button class="btn btn-deep-purple" id="submit" type="button" onclick="venue_function()"> Submit </button>
</div>
</div>
</div>
</form>
<!--/.Panel-->
</div>
</div>
</div>
<!--/.Main layout-->
</main>
<!--Footer-->
<footer class="page-footer center-on-small-only nopadding">
<!--Footer Links-->
<div class="container-fluid">
<div class="row">
<!--First column-->
<div class="col-lg-3 offset-lg-1 hidden-lg-down">
<h5 class="title">About evntbindr.</h5>
<p>EVNTBINDR is an online platform meant to make event planning easy. </p>
</div>
<!--/.First column-->
<hr class="hidden-md-up">
<!--Second column-->
<div class="col-lg-6 col-md-9">
<h5 class="title">CONNECT WITH US</h5>
<ul>
<li><a href="https://www.facebook.com/evntbindr/"><i class="fa fa-facebook" aria-hidden="true"></i> Facebook </li> </a>
<li><a href="https://www.instagram.com/evntbindr/"><i class="fa fa-instagram" aria-hidden="true"></i> Instagram </li></a>
</div>
</div>
</div>
<!--/.Footer Links-->
<!--Copyright-->
<div class="footer-copyright">
<div class="container-fluid">
© 2017 Copyright: <a href="http://www.github.com/sathp/evntbindr_fleming"> evntbindr.</a> Developed with <span class="glyphicon glyphicon-heart">love</span> by <a href="http://www.ahamlearning.com">Team Fleming at Techpreneurship Bootcamp, Aham Learning Hub</a>.
</div>
</div>
<!--/.Copyright-->
</footer>
<!--/.Footer-->
<!-- SCRIPTS -->
<!-- JQuery -->
<script type="text/javascript" src="js/jquery-2.2.3.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="js/tether.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>
<script>
new WOW().init();
</script>
<script src="hide_show.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.1.3/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyAnTgoI54Z-LiR94TUDmu3ejDyrP0M_u-k",
authDomain: "evntbindr-a5d5e.firebaseapp.com",
databaseURL: "https://evntbindr-a5d5e.firebaseio.com",
projectId: "evntbindr-a5d5e",
storageBucket: "evntbindr-a5d5e.appspot.com",
messagingSenderId: "111766807795"
};
firebase.initializeApp(config);
</script>
<script src="authentication.js"></script>
<script src="venue.js"></script>
<script type="text/javascript">
function uploadImage(key) {
var file = $("#mediaCapture").prop("files")[0];
var fileRef = firebase.storage().ref(key+"."+file.name.split('.').pop());
return fileRef.put(file).then(function(snapshot) {
return snapshot.downloadURL;
});
}
function displayVenues(data) {
console.log("displayVenues",data.val().imageURL);
$("#venues").append('<div class="col-lg-6">' +
'<div class="card">' +
'<div class="hm-white-slight">' +
'<img src="' + data.val().imageURL +'"" class="img-fluid" alt="">' +
'</div>' +
'<div class="card-block">' +
'<h4 class="card-title"><span id="venue_name">' + data.val().name +'</span></h4><a href="product.html" class="btn btn-primary"><i class="fa fa-pencil left"></i> EDIT</a>' +
'</div>' +
'</div>' +
'</div>')
}
</script>
<script src="upload_line.js"></script>
<script type="text/javascript">
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
firebase.database().ref('venues').orderByChild("uid").equalTo(firebase.auth().currentUser.uid).on('child_added', function(data) {
displayVenues(data);
// console.log(data.val());
});
}
});
</script>
</body>
</html>