Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions lib/modules/publishing/web/editor.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,27 @@
<div class="card bg-base-100 shadow-xl border border-base-200">
<div class="card-body space-y-6">
<.form for={@form} id="publishing-meta" phx-change="update_meta" phx-submit="noop">
<%!-- Title field — full width above the editor columns --%>
<div class="mb-4">
<input
type="text"
name="title"
id="title-input"
value={@form["title"] || ""}
maxlength="500"
class={"input input-bordered w-full text-2xl font-semibold #{if @readonly? or @viewing_older_version, do: "input-disabled bg-base-200"}"}
placeholder={gettext("Post title")}
readonly={@readonly? or @viewing_older_version}
/>
<p class="text-xs text-base-content/60 mt-1">
<%= if @is_primary_language do %>
{gettext("Auto-populated from the first heading. Edit to override.")}
<% else %>
{gettext("Leave empty to use the primary language title.")}
<% end %>
</p>
</div>

<div class="flex flex-col lg:flex-row gap-6">
<div class="lg:w-80 space-y-4">
<div class="space-y-4">
Expand Down Expand Up @@ -950,27 +971,6 @@
</div>

<div class="flex-1 space-y-4">
<%!-- Title field --%>
<div>
<input
type="text"
name="title"
id="title-input"
value={@form["title"] || ""}
maxlength="500"
class={"input input-bordered w-full text-2xl font-semibold #{if @readonly? or @viewing_older_version, do: "input-disabled bg-base-200"}"}
placeholder={gettext("Post title")}
readonly={@readonly? or @viewing_older_version}
/>
<p class="text-xs text-base-content/60 mt-1">
<%= if @is_primary_language do %>
{gettext("Auto-populated from the first heading. Edit to override.")}
<% else %>
{gettext("Leave empty to use the primary language title.")}
<% end %>
</p>
</div>

<div class="flex flex-wrap items-center justify-between gap-3">
<h2 class="text-xl font-semibold text-base-content">{gettext("Content")}</h2>
<div class="flex items-center gap-1.5">
Expand Down
6 changes: 5 additions & 1 deletion lib/phoenix_kit_web/components/layout_wrapper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ defmodule PhoenixKitWeb.Components.LayoutWrapper do
if admin_page?(assigns) do
# Mark that admin chrome is being rendered by this (LiveView) call.
# The layout's call (from_layout=true) will detect this and short-circuit.
Process.put(:phoenix_kit_admin_chrome_rendered, true)
# Only set the flag for non-layout calls (core views that call app_layout directly).
# Plugin views never call app_layout, so the layout's own call should NOT set
# the flag — otherwise it persists in the process dictionary and causes the
# layout to incorrectly short-circuit on subsequent LiveView re-renders.
unless assigns[:from_layout], do: Process.put(:phoenix_kit_admin_chrome_rendered, true)
# Create new inner_block slot that wraps original content with admin navigation
original_inner_block = assigns[:inner_block]

Expand Down