Created
January 20, 2013 23:49
-
-
Save leofrozenyogurt/4582664 to your computer and use it in GitHub Desktop.
parsley
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Doudeal2</title> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= stylesheet_link_tag "bootstrap-responsive", :media => "all"%> | |
<script type="text/javascript" src="parsley.js"></script> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="language" content="english"> | |
<meta name="description" content="doUdeal is the easiest way to buy and sell anything on and around your college campus."> | |
<meta name="google-site-verification" content="B1Lpfvod0cAYic4VQKOm6_8lDfCuAeM9ZHVrjCEyfzM" /> | |
<meta name="keywords" content="college classifieds, college marketplace, textbooks, dorm furniture, college, buy, sell, university, campus, electronics, dorm stuff"> | |
<meta property="og:image" content="http://doudeal.com/images/doUdeal_logo_blue.png" /> | |
<!-- Le styles --> | |
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> | |
<!--[if lt IE 9]> | |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<!-- Le fav and touch icons --> | |
<link rel="shortcut icon" href="img/favicon.ico"> | |
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png"> | |
</head> | |
<body> | |
<div class="navbar navbar-fixed-top"> | |
<div class="navbar-inner"> | |
<div class="container"> | |
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</a> | |
<%=link_to (image_tag "doudeal_logo_blue2.png"), homes_path, :class=>"brand" %> | |
<div class="nav-collapse collapse"> | |
<ul class="nav"> | |
<% if current_page?("/homes")%> | |
<li><a href="#how_it_works">How it works</a></li> | |
<% else %> | |
<li><%=link_to "How It Works" , "/homes#how_it_works"%></li> | |
<%end%> | |
<li class="divider-vertical"></li> | |
<li><a href="#contact">Share & Earn</a></li> | |
<li class="divider-vertical"></li> | |
<li><button type="submit" class="btn btn-post open-post">Sell Your Stuff</button></li> | |
<li class="divider-vertical"></li> | |
<% if user_signed_in? %> | |
<li class="dropdown"> | |
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="margin-top:-3px"> | |
Hi, <%= current_user.username %>! | |
<div class="btn btn-mini btn-danger btn-notification"> | |
<%=current_user.count_msg%> | |
</div> | |
<!--11111111111111111111111111111111111111--> | |
<b class="caret"></b> | |
<% if current_user.image? %> | |
<%= image_tag current_user.image_url.to_s, :class=> "profile-thumbnail" %> | |
<%else%> | |
<img src="/assets/default_user_icon_nav.png" class="profile-thumbnail"> | |
<%end%> | |
</a> | |
<ul class="dropdown-menu"> | |
<li> | |
<%= link_to " Dashboard", dashboard_path, :class=>"icon-dashboard icon-small btn-notification"%> | |
</li> | |
<li> | |
<%= link_to " View Profile", current_user, :class=>"icon-user icon-small"%> | |
</li> | |
<li class="divider"></li> | |
<li> | |
<%= link_to " Log Out", destroy_user_session_path, :method => :delete, :class => 'icon-signout icon-small'%> | |
</li> | |
</ul> | |
</li> <!-- End of Signed in Dropdown --> | |
<% else %> | |
<li class="open-login"><a href="#">Log In</a></li> | |
<li class="divider-vertical"></li> | |
<li class="open-signup"><a href= "#">Sign Up </a></li> | |
<% end %> | |
</ul> <!-- end of nav --> | |
</div><!--/.nav-collapse --> | |
</div> | |
</div> | |
</div> | |
<!-- / ******************** NAVIGATION **************** --> | |
<% flash.each do |name, msg| %> | |
<%= content_tag :section, msg, :id => "flash_#{name}", :class => "flash alert alert-success alert-home" %> | |
<% end %> | |
<%= yield %> | |
<footer> | |
<div class="container" style="font-color:white !important"> | |
<div class="row footer-links"> | |
<div class="span3"> | |
<h3>Quick Links</h3> | |
<ul class="unstyled"> | |
<li><a href="/about">About Us</a></li> | |
<li><a href="/team">Our Team</a></li> | |
<li><a href="/blog">Our Blog</a></li> | |
<li><a href="/careers">Careers</a></li> | |
<li><a href="/partners">Partners</a></li> | |
</ul> | |
</div> | |
<div class="span3"> | |
<h3>Company</h3> | |
<ul class="unstyled"> | |
<li><a href="/privacy">Privacy Policy</a></li> | |
<li><a href="/tos">Terms of Use</a></li> | |
<li><a href="/contact">Contact Us</a></li> | |
</ul> | |
</div> | |
<div class="span3"> | |
<h3>We're Social</h3> | |
<ul class="unstyled"> | |
<li><a href="http://www.facebook.com/pages/DoUdeal/204141036295403" target="_blank">Facebook</a></li> | |
<li><a href="https://twitter.com/doudeal" target="_blank">Twitter</a></li> | |
<li><a href="http://www.linkedin.com/company/doudeal" target="_blank">Linked In</a></li> | |
</ul> | |
</div> | |
<div class="span3"> | |
<h3>Subscribe</h3> | |
<p>Subscribe to our newsletter and stay up to date with the latest news and deals!</p> | |
<div id="mc_embed_signup"> | |
<form action="http://doUdeal.us2.list-manage1.com/subscribe/post?u=2f8c1a8706a843608b9faa17b&id=1274c109bf" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate form-inline" target="_blank"> | |
<input type="email" value="" name="EMAIL" class="span3 email" id="mce-EMAIL" placeholder="your '.edu' email address" required> | |
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn btn-primary"> | |
</form> | |
</div> | |
</div> | |
</div> | |
<div id="copywrite"> | |
<div class="container"> | |
<div class="row"> | |
<div class="span12 footer-links"> | |
<p>© 2012 doUdeal Inc. <span id="totop" class="pull-right">Back to Top <i class="icon-arrow-up"></i></span></p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</footer> | |
<!-- ******************************* Signup JS Overlay HTML *************************** --> | |
<div class="modal hide" id="signupModal"> | |
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:multipart => true, :class => 'form-horizontal'}) do |f| %> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal">×</button> | |
<h2 style="text-align:center">Sign up, it's free to get started!</h2> | |
</div> | |
<div class="modal-body"> | |
<form class="form-horizontal"> | |
<fieldset> | |
<div class="control-group"> | |
<div class="controls-signup"> | |
<div><%= f.label :username, :class => 'control-label-signup'%><br /> | |
<%= f.text_field :username, :class => 'signup-input' %></div> | |
<span class="inline-error" id="error-name"></span> | |
<div><%= f.label :email, :class => 'control-label-signup' %><br /> | |
<%= f.email_field :email, :class => 'signup-input' %></div> | |
<span class="inline-error" id="error-email"></span> | |
<div><%= f.label :password, :class => 'control-label-signup' %><br /> | |
<%= f.password_field :password, :class => 'signup-input' %></div> | |
<span class="inline-error" id="error-password"></span> | |
<div><%= f.label :password_confirmation, :class => 'control-label-signup' %><br /> | |
<%= f.password_field :password_confirmation, :class => 'signup-input' %></div> | |
<span class="inline-error" id="error-password"></span> | |
<div><%= f.label :college, :class => 'control-label-signup' %><br /> | |
<%= f.text_field :college, :class => 'signup-input' %></div> | |
<div> | |
<%= f.label :image , :class => 'control-label-signup'%><br /> | |
<%= f.file_field :image, :class=> 'signup-input' %> | |
</div> | |
<div class="modal-footer"> | |
<p>Already a member?<a href="#" class="open-login" data-dismiss="modal"> Log In Now!</a></p> | |
<div><%= f.submit "Sign up", :class => 'btn btn-primary btn-large signup-btn' %></div> | |
<% end %> | |
</div> | |
<img id="signup-loader" style="margin-left:125px;display:none;" src="/images/ajax-loader.gif" alt="Please wait..." title="Please wait..." /> | |
</div> | |
</div> | |
</fieldset> | |
</form> | |
</div> <!-- end of modal-body --> | |
</div> <!-- End of Signup Modal --> | |
<!-- ******************************* Login JS Overlay HTML *************************** --> | |
<div class="modal hide" id="loginModal"> | |
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> | |
<div class="modal-header"> | |
<% flash.each do |name, msg| %> | |
<% if msg.is_a?(String) %> | |
<div class="alert alert-<%= name == :notice ? "success" : "error" %>"> | |
<a class="close" data-dismiss="alert">×</a> | |
<%= content_tag :div, msg, :id => "flash_#{name}" %> | |
</div> | |
<% end %> | |
<% end %> | |
<button type="button" class="close" data-dismiss="modal">×</button> | |
<h2 style="text-align:center">Login</h2> | |
</div> | |
<div class="modal-body"> | |
<div style="text-align:center"> | |
</div> | |
<p class="no-auto-post">We don't post anything without your permission!</p> | |
<hr> | |
<p class="or">... OR ...</p> | |
<br> | |
<form class="form-horizontal"> | |
<fieldset> | |
<div class="control-group"> | |
<div class="controls-signup"> | |
<div><%= f.label :email, :class => 'control-label-login span1' %> | |
<%= f.email_field :email, :class => 'login-input' %></div> | |
<br> | |
<br> | |
<div><%= f.label :password, :class => 'control-label-login span1' %> | |
<%= f.password_field :password, :class => 'login-input' %></div> | |
<br> | |
<br> | |
</div> | |
</div> | |
</fieldset> | |
<div class="modal-footer"> | |
<div class="loginfooterlinks"> | |
<%= link_to "Forgot your password?", new_password_path(resource_name) %> | <a href="#" class="open-signup needaccount" data-dismiss="modal">Need an Account?</a> | |
</div> | |
<% if devise_mapping.rememberable? -%> | |
<div class="span2" style="float:left"><%= f.check_box :remember_me %> <%= f.label :remember_me %></div> | |
<% end -%> | |
<div class="span2" style="float:right"><%= f.submit "Log in", :class => 'btn btn-primary btn-large' %></div> | |
<% end %> | |
</div> | |
</form> | |
</div> | |
</div> | |
<!-- ******************************* Post JS Overlay HTML *************************** --> | |
<div class="modal hide" id="postModal"> | |
<% if user_signed_in? %> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal">×</button> | |
<h2 style="text-align:center">Post your deal. It's Free!</h2> | |
</div> | |
<div class="modal-body"> | |
<div class="form-horizontal"> | |
<fieldset> | |
<div class="control-group"> | |
<% @deal=Deal.new %> | |
<%= form_for(@deal,:validate=>"parsley") do |f| %> | |
<% if @deal.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@deal.errors.count, "error") %> prohibited this deal from being saved:</h2> | |
<ul> | |
<% @deal.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<div class="controls controls-row"> | |
<label class="control-label text-error" for="input01">Post Title*</label> | |
<%= f.text_field :title, :class=>"span3" %> | |
<label class="control-label text-error" for="input01">Price*</label> | |
<%= f.text_field :price, :class=>"span1"%> | |
</div> | |
<div class="controls"> | |
<label class="control-label text-error" for="input01">Description*</label> | |
<%= f.text_area :description, :class=>"span4", :rows=>3%> | |
</div> | |
<%= f.collection_select :category, Deal::CATEGORIES, :to_s, :humanize, :class=>"span2" %> | |
<div class="controls controls-row"> | |
<label class="control-label" for="input01">Address</label> | |
<%= f.text_field :address, :class=>"span2"%> | |
<label for="input01" style="text-align:center">(Exact address will not be visible)</label> | |
</div> | |
<div class="controls"> | |
<label class="control-label" for="input01">City</label> | |
<%= f.text_field :city %> | |
</div> | |
<div class="controls controls-row"> | |
<label class="control-label" for="input01">State</label> | |
<%= f.text_field :state, :class=>"span2" %> | |
</div> | |
<div class="controls controls-row"> | |
<label class="control-label text-error" for="input01"><i class="icon-picture icon-small" style=""> Image 1*</i></label> | |
<%= f.file_field :dimg1 %> | |
<br> | |
<label class="control-label" for="input02"><i class="icon-picture icon-small" style=""> Image 2</i></label> | |
<%= f.file_field :dimg2 %> | |
</div> | |
</div> | |
</fieldset> | |
</div> | |
</div> <!-- end of modal body --> | |
<div class="modal-footer"> | |
<div class="span2"> | |
<p class="text-error"> | |
* Fields in red are required | |
</p> | |
</div> | |
<div class="span2" style="float:right"> | |
<%= f.submit "Post", :class => "btn btn-success btn-large signupoverlaybtn" %> | |
<a href="#" class="btn btn-danger btn-large" data-dismiss="modal">Cancel</a> | |
</div> | |
</div> <!-- end of modal footer --> | |
<% end %> | |
<!-- USER IS NOT SIGNED IN SO DISPLAY DISABLED INPUTS --> | |
<% else %> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal">×</button> | |
<h2 style="text-align:center">You have to log in to post a deal</h2> | |
</div> | |
<div class="modal-body"> | |
<div class="form-horizontal"> | |
<fieldset> | |
<div class="control-group"> | |
<% @deal=Deal.new %> | |
<%= form_for(@deal) do |f| %> | |
<div class="controls controls-row"> | |
<label class="control-label text-error" for="input01">Post Title*</label> | |
<input class="span3" type="text" placeholder="" disabled> | |
<label class="control-label text-error" for="input01">Price*</label> | |
<input class="span1" type="text" placeholder="" disabled> | |
</div> | |
<div class="controls"> | |
<label class="control-label text-error" for="input01">Description*</label> | |
<textarea class="span3" type="text" rows="3" disabled></textarea> | |
</div> | |
<%= f.collection_select :category, Deal::CATEGORIES, :to_s, :humanize, :class=>"span2 disabled" %> | |
<div class="controls controls-row"> | |
<label class="control-label" for="input01">Address</label> | |
<input class="span2" type="text" placeholder="" disabled> | |
<label for="input01" style="text-align:center">(Exact address will not be visible)</label> | |
</div> | |
<div class="controls"> | |
<label class="control-label" for="input01">City</label> | |
<input class="" type="text" placeholder="" disabled> | |
</div> | |
<div class="controls controls-row"> | |
<label class="control-label" for="input01">State</label> | |
<input class="span2" type="text" placeholder="" disabled> | |
</div> | |
<div class="controls controls-row"> | |
<label class="control-label text-error" for="input01"><i class="icon-picture icon-small" style=""> Image 1*</i></label> | |
<input type="file" placeholder="" disabled> | |
<br> | |
<label class="control-label" for="input02"><i class="icon-picture icon-small" style=""> Image 2</i></label> | |
<input type="file" placeholder="" disabled> | |
</div> | |
</div> | |
</fieldset> | |
</div> | |
</div> <!-- end of modal body --> | |
<div class="modal-footer"> | |
<div class="span5" style="text-align:center"> | |
<h4>You need to <a class="btn btn-success btn-large open-login" data-dismiss="modal">Log In</a> OR <a class="btn btn-primary btn-large open-signup" data-dismiss="modal">Sign Up</a> to continue</h4> | |
</div> | |
</div> <!-- end of modal footer --> | |
<%end%> | |
<%end%> | |
</div> | |
<!-- ******************************* postShare JS Overlay HTML *************************** --> | |
<div class="modal hide" id="postshareModal"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal">×</button> | |
<h2 style="text-align:center">Promote Your Deal!</h2> | |
</div> | |
<div class="modal-body"> | |
<form class="form-horizontal"> | |
<fieldset> | |
<div class="control-group"> | |
<div class="controls"> | |
<h4 class="promote-copy"> | |
Share with friends & increase your chances of making $$$! | |
</h4> | |
<img src="img/addthis.png" style="margin-left:auto; margin-right:auto;"> | |
</div> | |
</div> | |
</fieldset> | |
</form> | |
</div> | |
<div class="modal-footer"> | |
<a href="#" class="btn btn-large btn-primary btn-message">Share!</a> | |
<a href="#" class="btn btn-large" data-dismiss="modal">Cancel</a> | |
</div> | |
</div> | |
<script> | |
$(document).ready(function() { | |
$('#carousel').carousel({ | |
interval: 4000 | |
}); | |
$('#loginModal').modal({ | |
show: false | |
}); | |
$('#SignupModal').modal({ | |
show: false | |
}); | |
$('#postModal').modal({ | |
show: false | |
}); | |
$('#postshareModal').modal({ | |
show: false | |
}); | |
$('#messageModal').modal({ | |
show: false | |
}); | |
$('#permissionModal').modal({ | |
show: false | |
}); | |
}); | |
$('.open-signup').click(function() { | |
$('#signupModal').modal('show'); | |
}); | |
$('.open-signup').click(function() { | |
$('#signupModal').modal('show'); | |
}); | |
$('.open-post').click(function() { | |
$('#postModal').modal('show'); | |
}); | |
$('.open-postshare').click(function() { | |
$('#postshareModal').modal('show'); | |
}); | |
$('.open-message').click(function() { | |
$('#messageModal').modal('show'); | |
}); | |
$('.open-permission').click(function() { | |
$('#permissionModal').modal('show'); | |
}); | |
$(window).load(function() { | |
$("#totop").click(function () { | |
$("body, html").animate({ | |
scrollTop: 0 | |
}, 300); | |
return false; | |
}); | |
}); | |
$("#login-form").submit(function() { $("#login-loader").toggle();}); | |
$("#login-form").bind("ajax:error", function(data, status, xhr) { | |
$("#login-loader").toggle(); | |
$("#login-error").show(); | |
}).bind("ajax:success", function(data, status, xhr) { | |
window.location.href = "/homes"; | |
}); | |
$("#sign-up-form").submit(function() { | |
$("#signup-loader").toggle(); | |
$(".inline-error").toggle(); | |
}); | |
$("#sign-up-form").bind("ajax:error", function(data, status, xhr) { | |
$("#signup-loader").toggle(); | |
var data = JSON.parse(status.responseText); | |
jQuery.each(data, function(index, itemData) { | |
$("#error-"+index).html(index+" "+ itemData[0]); | |
$("#error-"+index).show(); | |
}); | |
//$("#login-error").show(); | |
}).bind("ajax:success", function(data, status, xhr) { | |
$('#signupModal').modal('hide'); | |
$('#signedUpModal').modal({show: true }); | |
_gaq.push(['_trackPageview', 'signedUpModal']); | |
}); | |
$('.open-signup').click(function() { | |
$('#signupModal').modal('show'); | |
_gaq.push(['_trackPageview', 'signupModal']); | |
}); | |
$('.open-login').click(function() { | |
$('#loginModal').modal('show'); | |
_gaq.push(['_trackPageview', 'loginModal']); | |
}); | |
$('.typeahead').typeahead(); | |
/* Puts cursor in buyers search field automatically. can't figure out the problem with the ID calls. | |
$(document).ready(function(){ | |
document.theFormID.theFieldID.focus(); | |
}); | |
*/ | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment