fix visibility issues with multiple users
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| <div class="mx-auto flex flex-col justify-center items-start space-y-4 max-w-3xl"> | ||||
| <div class="flex flex-col justify-center items-start mx-auto space-y-4 max-w-3xl"> | ||||
|   <h1 class="text-xl"> | ||||
|     <%= gettext("contexts") %> | ||||
|   </h1> | ||||
| @@ -9,7 +9,7 @@ | ||||
|     as={:search} | ||||
|     phx-change="search" | ||||
|     phx-submit="search" | ||||
|     class="self-stretch flex flex-col items-stretch" | ||||
|     class="flex flex-col items-stretch self-stretch" | ||||
|   > | ||||
|     <%= text_input(f, :search_term, | ||||
|       class: "input input-primary", | ||||
| @@ -33,14 +33,14 @@ | ||||
|     > | ||||
|       <:actions :let={context}> | ||||
|         <.link | ||||
|           :if={Contexts.owner?(context, @current_user)} | ||||
|           :if={@current_user} | ||||
|           patch={~p"/contexts/#{context}/edit"} | ||||
|           aria-label={dgettext("actions", "edit %{context_slug}", context_slug: context.slug)} | ||||
|         > | ||||
|           <%= dgettext("actions", "edit") %> | ||||
|         </.link> | ||||
|         <.link | ||||
|           :if={Contexts.owner_or_admin?(context, @current_user)} | ||||
|           :if={@current_user} | ||||
|           href="#" | ||||
|           phx-click="delete" | ||||
|           phx-value-id={context.id} | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| <div class="mx-auto flex flex-col justify-center items-stretch space-y-4 max-w-3xl"> | ||||
| <div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-3xl"> | ||||
|   <h1 class="text-xl"> | ||||
|     <%= @context.slug %> | ||||
|   </h1> | ||||
| @@ -15,16 +15,12 @@ | ||||
|     <%= gettext("Visibility: %{visibility}", visibility: @context.visibility) %> | ||||
|   </p> | ||||
|  | ||||
|   <div class="self-end flex space-x-4"> | ||||
|     <.link | ||||
|       :if={Contexts.owner?(@context, @current_user)} | ||||
|       class="btn btn-primary" | ||||
|       patch={~p"/context/#{@context}/edit"} | ||||
|     > | ||||
|   <div class="flex self-end space-x-4"> | ||||
|     <.link :if={@current_user} class="btn btn-primary" patch={~p"/context/#{@context}/edit"}> | ||||
|       <%= dgettext("actions", "edit") %> | ||||
|     </.link> | ||||
|     <button | ||||
|       :if={Contexts.owner_or_admin?(@context, @current_user)} | ||||
|       :if={@current_user} | ||||
|       type="button" | ||||
|       class="btn btn-primary" | ||||
|       phx-click="delete" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user