Skip to content
Snippets Groups Projects
Commit 1c3ae994 authored by Butler, Alexis (UG - Computer Science)'s avatar Butler, Alexis (UG - Computer Science)
Browse files

Dressed Up product focus page

parent 9cf0ce1b
Branches socialtest
No related tags found
No related merge requests found
<!--Display a specific product th reviews and allow for a review to be left --> <!--Display a specific product th reviews and allow for a review to be left -->
<section class="prdouctFocus"> <section class="prdouctFocus">
<h2><%= link_to @product.section.name, @product.section %> - <%= @product.name %></h2>
<article class="productDetails"> <article class="productDetails">
<%=image_tag @product.image.main.url %><br> <div class="row row-no-gutters">
<h3><%= @product.name %></h3><br> <div class="col-sm-5 col-lg-4">
<h4><%=t('.desc_title') %></h4> <br><p><%= @product.description %></p><br> <%=image_tag @product.image.main.url %>
<h4><%=t('.stock_title') %></h4> <h3><%= @product.stockCount %></h3><br> </div>
<h4><%=t('.price_title') %></h4> <h3><%= humanized_money_with_symbol @product.price %></h3><br> <div class="col-lg-8 col-sm-9 col-xs-8">
<h3><%=t('.reviews_title') %></h3><br> <dl class="dl-horizontal">
<%if curr_user %> <dt>Product Name:</dt>
<%= form_for(Review.new, url: product_reviews_url(@product,@review)) do |f|%> <dd><%= @product.name %></dd>
<%= f.select :rating, <dt><%=t('.desc_title') %></dt>
options_for_select([[t('.lvl5'),5], <dd><%= @product.description %></dd>
[t('.lvl4'), 4], <dt><%=t('.stock_title') %></dt>
[t('.lvl3'), 3], <dd><%= @product.stockCount %></dd>
[t('.lvl2'), 2], <dt><%=t('.price_title') %></dt>
[t('.lvl1'), 1], <dd><%= humanized_money_with_symbol @product.price %></dd>
[t('.lvl0'),0] </dl>
])%><br> </div>
<%= f.text_area :content%><br> <div class="col-lg-8 col-sm-9 col-xs-8">
<%= f.submit t('.sub_button') %> <h3><%=t('.reviews_title') %></h3><br>
<%if curr_user %>
<%= form_for(Review.new, url: product_reviews_url(@product,@review)) do |f|%>
<%= f.select :rating,
options_for_select([[t('.lvl5'),5],
[t('.lvl4'), 4],
[t('.lvl3'), 3],
[t('.lvl2'), 2],
[t('.lvl1'), 1],
[t('.lvl0'),0]
])%><br>
<%= f.text_area :content%><br>
<%= f.submit t('.sub_button') %>
<%end %>
<%end %> <%end %>
<%end %> <% @product.reviews.each do |i| %>
<% @product.reviews.each do |i| %> <strong><%= i.rating%> / 5</strong> - <%=i.content %> <br>
<strong><%= i.rating%> / 5</strong> - <%=i.content %> <br> <% if i.user == curr_user %>
<% if i.user == curr_user %> <%= link_to t('.remove_button'), product_review_path(@product, i), :method => :delete%>
<%= link_to t('.remove_button'), product_review_path(@product, i), :method => :delete%> <%end %>
<%end %> <hr>
<hr> <% end %>
<% end %> </div>
<br> </div>
</article> </article>
</section> </section>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment