Skip to content

Commit

Permalink
Updated with Bootstrap Panels
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil Gehani committed Nov 5, 2013
1 parent 982e205 commit 373dd4c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions app/views/pins/_pin.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div class="box panel panel-default">
<%= link_to (image_tag pin.image(:medium)), pin %>
<%= link_to image_tag(pin.image.url(:medium)), pin %>
<div class="panel-body">
<%= pin.description %>
<%= pin.user.name if pin.user %>
<%= link_to 'Show', pin_path(pin) %>

<strong><%= pin.user.name if pin.user %></strong>
<% if current_user == pin.user %>
<div class="actions">
<%= link_to 'Edit', edit_pin_path(pin) %>
<%= link_to 'Destroy', pin, method: :delete, data: { confirm: 'Are you sure?' } %>
</div>
<% end %>
</div>
</div>
Expand Down
26 changes: 13 additions & 13 deletions app/views/pins/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<%= link_to 'Back', pins_path %>
<div class="row">
<div class="span6 offset3">
<div class="well">
<%= image_tag @pin.image.url(:medium) %>
<p>
<%= @pin.description %>
</p>
<p>
<%= @pin.user.name %>
</p>
<% if current_user == @pin.user %>
<%= link_to 'Edit', edit_pin_path(@pin) %> |
<% end %>
<%= link_to 'Back', pins_path %>
<div class="col-md-offset-2 col-md-8">
<div class="panel panel-default">
<div class="panel-heading center">
<%= image_tag @pin.image.url(:medium) %>
</div>
<div class="panel-body">
<p><%= @pin.description %></p>
<p><strong><%= @pin.user.name if @pin.user %></strong></p>
<% if current_user == @pin.user %>
<%= link_to 'Edit', edit_pin_path(@pin) %> |
<% end %>
</div>
</div>
</div>
</div>

0 comments on commit 373dd4c

Please sign in to comment.