add routes to non liveview topbar
This commit is contained in:
		| @@ -9,6 +9,38 @@ | ||||
|     <ul class="flex flex-col sm:flex-row flex-wrap justify-center items-center | ||||
|       space-x-4 text-lg text-white text-ellipsis"> | ||||
|       <%= if assigns |> Map.has_key?(:current_user) && @current_user do %> | ||||
|         <li> | ||||
|           <%= link(gettext("Tags"), | ||||
|             class: "hover:underline", | ||||
|             to: Routes.tag_index_path(CanneryWeb.Endpoint, :index) | ||||
|           ) %> | ||||
|         </li> | ||||
|         <li> | ||||
|           <%= link(gettext("Containers"), | ||||
|             class: "hover:underline", | ||||
|             to: Routes.container_index_path(CanneryWeb.Endpoint, :index) | ||||
|           ) %> | ||||
|         </li> | ||||
|         <li> | ||||
|           <%= link(gettext("Ammo"), | ||||
|             class: "hover:underline", | ||||
|             to: Routes.ammo_type_index_path(CanneryWeb.Endpoint, :index) | ||||
|           ) %> | ||||
|         </li> | ||||
|         <li> | ||||
|           <%= link(gettext("Manage"), | ||||
|             class: "hover:underline", | ||||
|             to: Routes.ammo_group_index_path(CanneryWeb.Endpoint, :index) | ||||
|           ) %> | ||||
|         </li> | ||||
|         <%= if @current_user.role == :admin do %> | ||||
|           <li> | ||||
|             <%= link(gettext("Invites"), | ||||
|               class: "hover:underline", | ||||
|               to: Routes.invite_index_path(CanneryWeb.Endpoint, :index) | ||||
|             ) %> | ||||
|           </li> | ||||
|         <% end %> | ||||
|         <li> | ||||
|           <%= link(@current_user.email, | ||||
|             class: "hover:underline", | ||||
| @@ -22,6 +54,13 @@ | ||||
|             <i class="fas fa-sign-out-alt"></i> | ||||
|           <% end %> | ||||
|         </li> | ||||
|         <%= if @current_user.role == :admin and function_exported?(Routes, :live_dashboard_path, 2) do %> | ||||
|           <li> | ||||
|             <%= link to: Routes.live_dashboard_path(CanneryWeb.Endpoint, :home) do %> | ||||
|               <i class="fas fa-tachometer-alt"></i> | ||||
|             <% end %> | ||||
|           </li> | ||||
|         <% end %> | ||||
|       <% else %> | ||||
|         <%= if Accounts.allow_registration?() do %> | ||||
|           <li> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user