edit authors, delete users, UI changes
This commit is contained in:
parent
e36cc36947
commit
ccb6e23960
19 changed files with 190 additions and 75 deletions
|
@ -8,22 +8,40 @@
|
|||
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'rails-ujs' %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%= link_to 'Home', '/welcome', method: :get%>
|
||||
<%= link_to 'Books', '/books', method: :get%>
|
||||
<% flash.each do |type, notice| %>
|
||||
<div class='card-panel teal lighten-5'>
|
||||
<% if notice.is_a? String %>
|
||||
<%= notice %>
|
||||
<% else %>
|
||||
<% notice.each do |msg| %>
|
||||
<div><%= msg %></div>
|
||||
<% end %>
|
||||
<div class='container'>
|
||||
<div class='row'>
|
||||
<div class='col s1'>
|
||||
<%= link_to 'Home', '/welcome', method: :get%>
|
||||
</div>
|
||||
|
||||
<div class='col s1'>
|
||||
<%= link_to 'Books', '/books', method: :get%>
|
||||
</div>
|
||||
<% if current_user&.admin? %>
|
||||
<div class='col s1'>
|
||||
<%= link_to 'Authors', '/authors', method: :get%>
|
||||
</div>
|
||||
<div class='col s1'>
|
||||
<%= link_to 'Users', '/users', method: :get%>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% flash.each do |type, notice| %>
|
||||
<div class='card-panel teal lighten-5'>
|
||||
<% if notice.is_a? String %>
|
||||
<%= notice %>
|
||||
<% else %>
|
||||
<% notice.each do |msg| %>
|
||||
<div><%= msg %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue