frenzy/lib/frenzy_web/views/pipeline_view.ex

20 lines
334 B
Elixir

defmodule FrenzyWeb.PipelineView do
use FrenzyWeb, :view
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
end