|
|
|
@ -35,7 +35,7 @@ defmodule DecentralisedBookIndexWeb.Components.MyComponents.SearchResources do
|
|
|
|
|
<div class="flex flex-col items-stretch justify-end flex-shrink-0 w-full space-y-2 md:w-auto md:flex-row md:space-y-0 md:items-center md:space-x-3">
|
|
|
|
|
<%= if can_add?(@current_user, @moderator_role) do %>
|
|
|
|
|
<.link patch={@resource_new_url}>
|
|
|
|
|
<button type="button" class="flex items-center justify-center px-4 py-2 text-sm font-medium text-black dark:text-white rounded-lg bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 focus:outline-none dark:focus:ring-primary-800">
|
|
|
|
|
<button type="button" class="grow w-full flex items-center justify-center px-4 py-2 text-sm font-medium text-black dark:text-white rounded-lg bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 dark:bg-primary-600 dark:hover:bg-primary-700 focus:outline-none dark:focus:ring-primary-800">
|
|
|
|
|
<svg class="h-3.5 w-3.5 mr-2" fill="currentColor" viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
|
|
|
<path clip-rule="evenodd" fill-rule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" />
|
|
|
|
|
</svg>
|
|
|
|
@ -44,8 +44,8 @@ defmodule DecentralisedBookIndexWeb.Components.MyComponents.SearchResources do
|
|
|
|
|
</.link>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="flex items-center w-full space-x-3 md:w-auto">
|
|
|
|
|
<form phx-change="change-sort">
|
|
|
|
|
<select name="sort_by" id="sort_by" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
|
|
|
|
<form phx-change="change-sort" class="w-full">
|
|
|
|
|
<select name="sort_by" id="sort_by" class="grow bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
|
|
|
|
<%= for {name, value} <- @select_options do %>
|
|
|
|
|
<%= if value == @selected_option do %>
|
|
|
|
|
<option value={value} selected>{name}</option>
|
|
|
|
|