Permalink
Browse files

last minute nonsense

  • Loading branch information...
1 parent fe3cbcb commit f382a41d78c40a889c7ab416ec58b711d4582f25 @kimballfrank kimballfrank committed Nov 3, 2012
View
@@ -36,6 +36,7 @@ app.configure('production', function(){
***********************************/
app.defineRoute('search', '/search');
app.defineRoute('payment', '/payment');
+app.defineRoute('thankyou', '/thankyou');
app.defineRoute('user', {
index: '/user/:username',
@@ -65,6 +66,7 @@ app.defineRoute('/blog/new', '/blog/new');
***********************************/
app.get('/', routes.index);
app.get('/payment', routes.payment);
+app.get('/thankyou', routes.thankyou);
// Users
app.get(app.lookupRoute('user.index'), routes.user_index);
app.get(app.lookupRoute('user.reservations'), routes.user_reservations);
@@ -102,7 +104,8 @@ app.post("/payment", function(req, res) {
var id = customer.id;
console.log('Success! Customer with Stripe ID ' + id + ' just signed up!');
// save this customer to your database here!
- res.send('ok');
+ res.redirect('/thankyou');
+ //res.send('');
}
});
});
@@ -2,8 +2,8 @@
Database Controller
*****************************/
-//var nano = require('nano')('https://ivowto.iriscouch.com:6984');
-var nano = require('nano')('http://localhost:5984');
+var nano = require('nano')('https://ivowto.iriscouch.com:6984');
+//var nano = require('nano')('http://localhost:5984');
var each = require('each');
/*** couchdb settings ***/
@@ -339,4 +339,10 @@ a:hover.day {
display: block;
background: #44A1E1;
color: #fff;
+}
+
+.logo-big {
+ background: #44A1E1 url('/img/logo-big.png') no-repeat center;
+ width: 500px;
+ height: 500px;
}
@@ -9,6 +9,10 @@ exports.payment = function(req, res) {
res.render('payment', { title: "payment" });
};
+exports.thankyou = function(req, res) {
+ res.render('thankyou', { title: "Thank You!" });
+};
+
// Get the search results page.
exports.search = function(req, res) {
couchdb.performSearch(req.query, function(users) {
@@ -128,4 +128,4 @@ div.page-contain.container
each review in user.reviews
span #{review.comment}
span #{review.rating}
- a.book-now.btn.btn-primary.btn-large(id="book-now-modal-#{index}", href="#", data-uname="#{user.username}", data-uid="#{user._id}") Book It!
+ a.book-now.btn.btn-primary.btn-large(id="book-now-modal-#{index}", href="/payments", data-uname="#{user.username}", data-uid="#{user._id}") Book It!
@@ -0,0 +1,32 @@
+block scripts
+ script(src='https://js.stripe.com/v1/')
+ script(src='http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js')
+ script(src='/scripts/payment.js')
+
+header.site-header
+ div.container
+ h1.kitchenly-branding.tk-mic-32-new-web.pull-left
+ a(href='/') kitchen.ly
+ div.pull-right
+ ul#user-nav.unstyled.nav.nav-pills
+ li.pull-left
+ a.sign-up-link(href='/') Sign Up
+ li.dropdown.pull-left
+ a.dropdown-toggle(href='#', data-toggle='dropdown') Login
+ .dropdown-menu(style='padding: 15px; margin-left: -203px; margin-top:-6px; padding-bottom: 0px;')
+ form(method='post', action='login', accept-charset='UTF-8')
+ input#username(style='margin-bottom: 15px;', type='text', placeholder='Username', name='username')
+ input#password(style='margin-bottom: 15px;', type='password', placeholder='Password', name='password')
+ input#remember-me(style='float: left; margin-right: 10px;', type='checkbox', name='remember-me', value='1')
+ label.string.optional(for='user_remember_me') Remember me
+ input#sign-in.btn.btn-primary.btn-block(type='submit', value='Sign In')
+
+div.page-contain.container
+ div.row
+ div.span6
+ h1 Thanks for using kitchen.ly!
+ h3.tk-pt-serif You're adventurous and awesome!
+ div.alert you will get an email conformation of you reservation
+
+ div.row
+ div.logo-big.span6

0 comments on commit f382a41

Please sign in to comment.