add page titles

This commit is contained in:
2025-05-20 13:12:50 +03:00
parent 8c7ef09567
commit 7cc16047cb
4 changed files with 31 additions and 1 deletions

View File

@ -31,6 +31,8 @@ app:get("topic_create", "/create", function(self)
return {status = 403}
end
self.page_title = "creating topic"
return {render = "topics.create"}
end)
@ -76,6 +78,8 @@ app:get("topic", "/:slug", function(self)
self.thread_create_error = ThreadCreateError.TOPIC_LOCKED
end
self.page_title = "all threads in " .. topic.name
return {render = "topics.topic"}
end)
@ -91,6 +95,9 @@ app:get("topic_edit", "/:slug/edit", function(self)
return {redirect_to = self:url_for("all_topics")}
end
self.topic = topic
self.page_title = "editing topic " .. topic.name
return {render = "topics.edit"}
end)