app/presenters: remove unused forum_post/note/post_version presenters.
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
class ForumTopicPresenter < Presenter
|
||||
attr_reader :forum_topic, :forum_posts
|
||||
|
||||
def initialize(forum_topic, forum_posts)
|
||||
@forum_posts = forum_posts
|
||||
@forum_topic = forum_topic
|
||||
end
|
||||
end
|
||||
@@ -1,9 +0,0 @@
|
||||
class NotePresenter
|
||||
def initialize(note)
|
||||
@note = note
|
||||
end
|
||||
|
||||
def formatted_body
|
||||
note.body.gsub(/<tn>(.+?)<\/tn>/m, '<br><p class="tn">\1</p>').gsub(/\n/, '<br>')
|
||||
end
|
||||
end
|
||||
@@ -1,20 +0,0 @@
|
||||
class PostVersionPresenter < Presenter
|
||||
attr_reader :post_version
|
||||
|
||||
def initialize(post_version)
|
||||
@post_version = post_version
|
||||
end
|
||||
|
||||
def changes
|
||||
html = []
|
||||
html << post_version.tag_array
|
||||
html << "<ins>source:#{h(post_version.source)}</ins>" if post_version.source
|
||||
html << "<ins>rating:#{h(post_version.rating)}</ins>" if post_version.rating
|
||||
html << "<ins>parent:#{post_version.parent_id}</ins>" if post_version.parent_id
|
||||
html.join(" ").html_safe
|
||||
end
|
||||
|
||||
def updater_name
|
||||
User.id_to_name(post_version.updater_id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user