Permalink
Browse files

added message modal to the offers

  • Loading branch information...
1 parent 3d5ade7 commit ddf725f326a37ce3240bfcb6255f5b6a63dd7114 @georges-gouriten committed Dec 11, 2011
@@ -30,6 +30,7 @@ def create
def show
@offer = Offer.find(params[:id])
+ @bid = Bid.new
end
private
@@ -0,0 +1,19 @@
+<% if user_signed_in? %>
+ <%= form_for @bid do |o| %>
+ <%= o.hidden_field :user_id, :value => current_user.id %>
+ <!-- Stuff here is ordered by order of importance. Title and Photo most important ;-) -->
+ <div class="modal-body">
+
+ <div class="field clearfix">
+ <%= o.label :message %>
+ <div class="input">
+ <%= o.text_field :message, :class => 'span5' %>
+ </div>
+
+ <% end %>
+<% else %>
+ <div class="modal-sign-in">
+ <p>First, you must sign in:</p>
+ <%= link_to "Sign in", signin_url, :class => 'sign-in-button' %>
+ </div>
+<% end %>
@@ -15,6 +15,13 @@
<a class="num-bids" href=""><span>number of Bids: </span>7</a>
- <a class="bid-button" href="">Bid!</a>
-
+ <a class="bid-button" href="">
+ <%= link_to 'Bid', "#new_bid_form", :class =>'bid-button','data-controls-modal' => 'new_bid_form', 'data-backdrop' => 'static'%>
+</div>
+<div id="new_bid_form" class="fade modal">
+ <div class="modal-header">
+ <a href="#" class="close">×</a>
+ <h3>Message?</h3>
+ </div>
+ <%= render :partial => "bid_modal_form" %>
</div>

0 comments on commit ddf725f

Please sign in to comment.