2019-03-21 19:21:56 -04:00
|
|
|
defmodule FrenzyWeb.GroupView do
|
|
|
|
use FrenzyWeb, :view
|
2021-09-15 10:38:46 -04:00
|
|
|
import Phoenix.Controller, only: [current_path: 1]
|
2021-08-28 11:58:22 -04:00
|
|
|
|
|
|
|
def title(:index, _) do
|
|
|
|
"Groups"
|
|
|
|
end
|
|
|
|
|
|
|
|
def title(:show, %{group: %Frenzy.Group{title: title}}) do
|
|
|
|
title
|
|
|
|
end
|
|
|
|
|
|
|
|
def title(:edit, %{group: %Frenzy.Group{title: title}}) do
|
|
|
|
"Edit #{title}"
|
|
|
|
end
|
|
|
|
|
|
|
|
def title(:read, %{group: %Frenzy.Group{title: title}}) do
|
|
|
|
"Read #{title}"
|
|
|
|
end
|
2019-03-21 19:21:56 -04:00
|
|
|
end
|