Allowing people to view/edit
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<div class="col-sm-2">
|
||||
<div class="thumbnail">
|
||||
<% if resource.user %>
|
||||
<span class="ownership">Owned by:<br/><%= resource.user.name %></span>
|
||||
<% end %>
|
||||
<% if resource.disposed_at %>
|
||||
<span class="disposed">Disposed:<br/><%= resource.disposed_at.to_date %></span>
|
||||
<% end %>
|
||||
<%= link_to(resource) do %>
|
||||
<% if resource.user %>
|
||||
<span class="ownership">Owned by:<br/><%= resource.user.name %></span>
|
||||
<% end %>
|
||||
<% if resource.disposed_at %>
|
||||
<span class="disposed">Disposed:<br/><%= resource.disposed_at.to_date %></span>
|
||||
<% end %>
|
||||
<%= image_tag(resource.picture.url(:thumb)) if resource.picture? %>
|
||||
<h4><%=h resource.name %></h4>
|
||||
<% end %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<h2><%=h @resource.name %>
|
||||
<%= link_to 'Back', resources_path, class: "btn btn-default" %>
|
||||
<%= link_to 'Edit', edit_resource_path(@resource), class: "btn btn-primary" %>
|
||||
<%= link_to 'Edit', edit_resource_path(@resource), class: "btn btn-primary" if can? :edit, @resource %>
|
||||
</h2>
|
||||
<% if @resource.user || @resource.owner %>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user