Guest User

Untitled

a guest
Feb 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. <div class="gift_obj">
  2. <div class="gift_lc"><img class="gift_picture" src="images/no_pic_gift.gif" /><br /><a href=""><img src="images/reserve_btn.gif" /></a></div>
  3. <div class="gift_info">
  4. <p><%= link_to "#{wanted_gift.name}", wanted_gift.link.url ,{:class => "gift_name" }%><span class="gift_price"><%= wanted_gift.unit.symbol %><%= number_with_precision(wanted_gift.price,2) %></span></p>
  5. <p><% wanted_gift.tags.each do |tag| %><%= link_to tag.name.upcase, {:action=>'tags', :id=>tag.name} ,{:class => "tag" } %> <% end %></p>
  6. <p><%= wanted_gift.description %></p>
  7. <% @similar_wanted_gifts = wanted_gift.other_similar_wanted_gifts %>
  8. <% @similar_received_gifts = wanted_gift.other_similar_received_gifts %>
  9. <% unless @similar_wanted_gifts.size == 0 %>
  10. <p><span class="green_0<%= (@max_people.to_f * @similar_wanted_gifts.size**(0.25)).ceil %>" href=""><%= link_to "#{@similar_wanted_gifts.size} other " + (@similar_wanted_gifts.size == 1 ? "person" : "people"), {:action => 'other_people_who_want',:id=>secret_id(wanted_gift.id)},{:class => "green" } %></span> <%= (@similar_wanted_gifts.size == 1 ? "wants" : "want") %> this...</p>
  11. <% end %>
  12. <% unless @similar_received_gifts.size == 0 %>
  13. <p><span class="green_0<%= (@max_people.to_f * @similar_received_gifts.size**(0.25)).ceil %>" href=""><%= link_to "#{@similar_wanted_gifts.size} other " + (@similar_wanted_gifts.size == 1 ? "person" : "people"), {:action => 'other_people_who_want',:id=>secret_id(wanted_gift.id)},{:class => "green" } %></span><%= (@similar_received_gifts.size == 1 ? "has" : "have") %> this... </p>
  14. <% end %>
  15. <p><%= link_to "Other places to buy this", {:action=>'other_places',:id=>secret_id(wanted_gift.id)} ,{:class => "cart" } %></p>
  16. <% unless @viewing_contact.wants_gift?(wanted_gift) or @viewing_contact.has_gift?(wanted_gift) %>
  17. <p><%= link_to 'I want this, add it to my list', {:action=>'duplicate', :id=>secret_id(wanted_gift.id)} ,{:class => "want" } %> / <%= link_to 'I have this', {:action=>'duplicate', :id=>secret_id(wanted_gift.id), :have => 'true'} ,{:class => "want" } %></p>
  18. <% end %>
  19. </div>
  20. </div>
Add Comment
Please, Sign In to add comment