frenzy/lib/frenzy_web/views/pipeline_view.ex

20 lines
334 B
Elixir
Raw Normal View History

2019-07-20 23:08:56 +00:00
defmodule FrenzyWeb.PipelineView do
use FrenzyWeb, :view
2021-08-28 15:58:22 +00:00
def title(:index, _) do
"Pipelines"
end
def title(:new, _) do
"Add Pipeline"
end
def title(:show, %{pipeline: %Frenzy.Pipeline{name: name}}) do
name
end
def title(:edit, %{pipeline: %Frenzy.Pipeline{name: name}}) do
"Edit #{name}"
end
2019-07-20 23:08:56 +00:00
end