Added media profile link to source view
This commit is contained in:
parent
e4300391b6
commit
435a25ad84
2 changed files with 11 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
defmodule PinchflatWeb.MediaSources.SourceController do
|
||||
use PinchflatWeb, :controller
|
||||
|
||||
alias Pinchflat.Repo
|
||||
alias Pinchflat.Profiles
|
||||
alias Pinchflat.MediaSource
|
||||
alias Pinchflat.MediaSource.Source
|
||||
|
|
@ -30,7 +31,10 @@ defmodule PinchflatWeb.MediaSources.SourceController do
|
|||
end
|
||||
|
||||
def show(conn, %{"id" => id}) do
|
||||
source = MediaSource.get_source!(id)
|
||||
source =
|
||||
id
|
||||
|> MediaSource.get_source!()
|
||||
|> Repo.preload(:media_profile)
|
||||
|
||||
render(conn, :show, source: source)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@
|
|||
</.header>
|
||||
|
||||
<.list>
|
||||
<:item title="media_profile">
|
||||
<.link href={~p"/media_profiles/#{@source.media_profile}"}>
|
||||
<%= @source.media_profile.name %>
|
||||
</.link>
|
||||
</:item>
|
||||
|
||||
<:item
|
||||
:for={attr <- ~w(collection_type collection_name collection_id original_url friendly_name)a}
|
||||
title={attr}
|
||||
|
|
|
|||
Loading…
Reference in a new issue