Add toggling stuff
This commit is contained in:
@@ -5,7 +5,21 @@
|
||||
JS.push("toggle_view_state")
|
||||
|> JS.dispatch("toggle_view_state", detail: %{"grid" => !@grid})
|
||||
}>
|
||||
Toggle List/Grid
|
||||
<%= if @grid do %>
|
||||
List View
|
||||
<% else %>
|
||||
Grid View
|
||||
<% end %>
|
||||
</.button>
|
||||
</:actions>
|
||||
<:actions :if={!@current_user}>
|
||||
<.button phx-click={JS.push("toggle_hidden_items")}>
|
||||
<%= if @hidden do %>
|
||||
Hide
|
||||
<% else %>
|
||||
Show
|
||||
<% end %>
|
||||
Received
|
||||
</.button>
|
||||
</:actions>
|
||||
</.header>
|
||||
|
||||
Reference in New Issue
Block a user