diff options
| author | mo <mokha@cisco.com> | 2017-09-02 14:13:59 -0600 |
|---|---|---|
| committer | mo <mokha@cisco.com> | 2017-09-02 14:13:59 -0600 |
| commit | 6624eb8e32cff309191f4695bb7928a1dd2c15f4 (patch) | |
| tree | 8e146a275c885e3823a852232fe6385aec8c624d /app | |
| parent | 5637c4fb5eefd5618be67588d3ebdd34e8a33682 (diff) | |
render all photos in grid.
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/cakes/_show.html.erb | 12 | ||||
| -rw-r--r-- | app/views/cakes/show.html.erb | 12 |
2 files changed, 7 insertions, 17 deletions
diff --git a/app/views/cakes/_show.html.erb b/app/views/cakes/_show.html.erb index de94b706..a88d6714 100644 --- a/app/views/cakes/_show.html.erb +++ b/app/views/cakes/_show.html.erb @@ -1,10 +1,5 @@ <div class="row"> <div class="col"> - <img class="rounded img-fluid mx-auto d-block" src="<%= @primary_image.url_for(:large) %>" alt="<%= @creation.name %>" /> - </div> -</div> -<div class="row"> - <div class="col"> <h1><%= link_to @creation.name, cake_path(@creation) %></h1> <p>By <%= link_to @creation.user.name, profile_path(@creation.user) %></p> <% if user_signed_in? && current_user != @creation.user %> @@ -30,3 +25,10 @@ <p><%= render_markdown(@creation.story).html_safe -%></p> </div> </div> +<div class="card-columns"> + <% @creation.photos.each do |photo| %> + <div class="card"> + <%= image_tag photo.url_for(:thumb), class: "card-img-top" %> + </div> + <% end %> +</div> diff --git a/app/views/cakes/show.html.erb b/app/views/cakes/show.html.erb index b561f5d5..9ffeb94d 100644 --- a/app/views/cakes/show.html.erb +++ b/app/views/cakes/show.html.erb @@ -6,16 +6,4 @@ <%= render partial: 'show' %> </div> -<% if @creation.photos_count > 1 %> - <div class="card-columns"> - <% @creation.photos.each do |photo| %> - <div class="card"> - <%= link_to cake_path(@creation, photo_id: photo.id), remote: true do %> - <%= image_tag photo.url_for(:thumb), class: "card-img-top" %> - <% end %> - </div> - <% end %> - </div> -<% end %> - <%# render partial: "shared/disqus", locals: { id: "c-#{@creation.id}" } %> |
