Permalink
Browse files

- added feedback of item bid on

  • Loading branch information...
1 parent 0442cc4 commit 46bd831ccec39f1f3710416e34eec5701758645d @alexhocksween alexhocksween committed Feb 5, 2012
@@ -80,8 +80,9 @@ body{
margin: 10px -20px; /* negative indent the amount of the padding to maintain the grid system */
.square-thumb{ width: 200px; height: 200px;}
+
} // .content
-
+
#refine-search{
padding: 1em;
background: #fafafa;
@@ -339,8 +340,56 @@ body{
}
}
+
+
} // .content
+ .offer_detail {
+ clear: left;
+ background: $green;
+
+ .title {
+ background: white;
+ padding: 10px;
+ text-transform: capitalize;
+ font-size: 200%;
+ margin: 5px;
+ }
+
+ table.items {
+ padding: 5px;
+ border-right: 15px solid $green;
+ }
+
+ tr.header_row{
+ font-weight: bold;
+ color: $black;
+ }
+
+ tr.item {
+ color: $grey;
+ }
+
+ tr:hover.item {
+ color: $green;
+ }
+
+ td.usernames {
+ background: $green;
+ border-left: 0px;
+ color: $black;
+ font-size: 150%;
+ text-align: center;
+ }
+
+ td {
+ background: white;
+ border: 0px;
+ border-left: 15px solid $green;
+ }
+
+
+ }
} // #wrapper
}
@@ -421,4 +470,4 @@ footer {
background: transparent image_url('fb-connect.png') no-repeat 0 0;
@include hide_text;
-} // .sign-in-button
+} // .sign-in-button
View
@@ -1,3 +1,4 @@
class Bid < ActiveRecord::Base
validates_uniqueness_of :user_id, :scope => :offer_id
+ belongs_to :user
end
@@ -0,0 +1,27 @@
+<div class="offer_detail">
+ <span class="title">
+ Dashboard
+ </span>
+
+ <table class="items">
+ <tr class="header_row">
+ <td class="usernames" width=20%"></td>
+ <td width=40%">comment</td>
+ <td width=15%">posted on</td>
+ <td width=15%">distance</td>
+ <td width=10%">select</td>
+ </tr>
+ <% @offer.bids.each do |bid| %>
+ <tr class="item">
+ <td class="usernames"><%= bid.user.name %></td>
+ <td><%= bid.message %></td>
+ <td><%= bid.created_at %></td>
+ <td>distance</td>
+ <td>select</td>
+ </tr>
+ <% end %>
+
+ </table>
+ <br><br>
+
+</div>
@@ -13,15 +13,27 @@
<span class="date"><%= @offer.updated_at.strftime("%d %B %Y") %></span>
</div>
- <a class="num-bids" href=""><span>number of Bids: </span>7</a>
+ <a class="num-bids" href=""><span>number of Bids: </span><%= @offer.bids.count %></a>
+ <% if (@offer.user != current_user) %>
+ <%= link_to 'Bid', "#new_bid_form", :class =>'bid-button','data-controls-modal' => 'new_bid_form', 'data-backdrop' => 'static'%>
+ <% else %>
+ <%# do we want to write anything for the user if this is their item? %>
+ <% end %>
+</div>
+
+ <% if (@offer.user == current_user) %>
+ <%= render "offer_details" %>
+ <% end %>
+
+
+
+
- <%= 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>
+</div>
Oops, something went wrong.

0 comments on commit 46bd831

Please sign in to comment.