mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
Merge pull request #180 from philomena-dev/mod-note-display
Make mod notes show the tag name instead of the requesting user
This commit is contained in:
commit
c401695513
2 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ defmodule Philomena.Polymorphic do
|
|||
"Comment" => [:user, image: [tags: :aliases]],
|
||||
"Commission" => [:user],
|
||||
"Conversation" => [:from, :to],
|
||||
"DnpEntry" => [:requesting_user],
|
||||
"DnpEntry" => [:requesting_user, :tag],
|
||||
"Gallery" => [:creator],
|
||||
"Image" => [:user, tags: :aliases],
|
||||
"Post" => [:user, topic: :forum],
|
||||
|
|
|
@ -5,8 +5,8 @@ defmodule PhilomenaWeb.Admin.ModNoteView do
|
|||
alias Philomena.Reports.Report
|
||||
alias Philomena.DnpEntries.DnpEntry
|
||||
|
||||
def link_to_noted_thing(conn, %DnpEntry{requesting_user: user} = dnp_entry),
|
||||
do: link("#{user.name}'s DNP entry", to: Routes.dnp_entry_path(conn, :show, dnp_entry))
|
||||
def link_to_noted_thing(conn, %DnpEntry{tag: tag} = dnp_entry),
|
||||
do: link("DNP entry for #{tag.name}", to: Routes.dnp_entry_path(conn, :show, dnp_entry))
|
||||
|
||||
def link_to_noted_thing(conn, %Report{user: nil} = report),
|
||||
do: link("Report #{report.id}", to: Routes.admin_report_path(conn, :show, report))
|
||||
|
|
Loading…
Reference in a new issue