books edition by admin
This commit is contained in:
parent
5095f63fd7
commit
e36cc36947
10 changed files with 119 additions and 20 deletions
20
app/views/books/show.html.erb
Normal file
20
app/views/books/show.html.erb
Normal file
|
@ -0,0 +1,20 @@
|
|||
<div class='container'>
|
||||
<div class='row'>
|
||||
<div class='col s4'>
|
||||
Title: <%= link_to @book.title, @book %>
|
||||
</div>
|
||||
|
||||
<div class='col s4'>
|
||||
Price: <%= @book.price_with_currency %>
|
||||
</div>
|
||||
|
||||
<div class='col s4'>
|
||||
Authors: <%= @book.authors %>
|
||||
</div>
|
||||
</div>
|
||||
<% if current_user&.admin? %>
|
||||
<div class='row'>
|
||||
<%= link_to 'Edit', edit_book_path(@book), class: "btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue