20 lines
360 B
Elixir
20 lines
360 B
Elixir
defmodule FrenzyWeb.GroupView do
|
|
use FrenzyWeb, :view
|
|
|
|
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
|
|
end
|