diff --git a/lib/wiki_web/controllers/page_controller.ex b/lib/wiki_web/controllers/page_controller.ex index 262e2ea..09659f6 100644 --- a/lib/wiki_web/controllers/page_controller.ex +++ b/lib/wiki_web/controllers/page_controller.ex @@ -62,7 +62,7 @@ defmodule WikiWeb.PageController do def new(conn, params) do changeset = Content.change_page(%Page{}, params, encrypt: false) - render(conn, "new.html", changeset: changeset) + render(conn, "new.html", changeset: changeset, page_title: "New Page") end def create(conn, %{"page" => page_params} = params) do @@ -98,13 +98,13 @@ defmodule WikiWeb.PageController do def show(conn, _params) do page = Repo.preload(conn.assigns.page, [:uploads, :pages_linked_from]) - render(conn, "show.html", page: page) + render(conn, "show.html", page: page, page_title: page.title) end def edit(conn, _params) do page = conn.assigns.page |> Repo.preload(:uploads) changeset = Content.change_page(page) - render(conn, "edit.html", page: page, changeset: changeset) + render(conn, "edit.html", page: page, changeset: changeset, page_title: "Edit #{page.title}") end def update(conn, %{"page" => page_params}) do diff --git a/lib/wiki_web/templates/layout/app.html.eex b/lib/wiki_web/templates/layout/app.html.eex index b0d5f6e..0043046 100644 --- a/lib/wiki_web/templates/layout/app.html.eex +++ b/lib/wiki_web/templates/layout/app.html.eex @@ -4,7 +4,7 @@ -