mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Move two classes to namespace of model using them
They are the only two classes using the namespace called Wikis so far. We want to use this namespace for a module called `wikis` that will encapsulate integration with external wikis and the internal OpenProject wiki.
This commit is contained in:
@@ -161,7 +161,7 @@ class WikiPage < ApplicationRecord
|
||||
content_to = journals.find_by(version: version_to)
|
||||
content_from = journals.find_by(version: version_from)
|
||||
|
||||
content_to && content_from ? Wikis::Diff.new(content_to, content_from) : nil
|
||||
content_to && content_from ? WikiPage::Diff.new(content_to, content_from) : nil
|
||||
end
|
||||
|
||||
def version
|
||||
@@ -171,7 +171,7 @@ class WikiPage < ApplicationRecord
|
||||
def annotate(compare_version = nil)
|
||||
compare_version = compare_version ? compare_version.to_i : version
|
||||
c = journals.find_by(version: compare_version)
|
||||
c ? Wikis::Annotate.new(c) : nil
|
||||
c ? WikiPage::Annotate.new(c) : nil
|
||||
end
|
||||
|
||||
# Returns true if usr is allowed to edit the page, otherwise false
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
# See COPYRIGHT and LICENSE files for more details.
|
||||
#++
|
||||
|
||||
class Wikis::Annotate
|
||||
class WikiPage::Annotate
|
||||
attr_reader :lines, :content
|
||||
|
||||
def initialize(content)
|
||||
@@ -28,7 +28,7 @@
|
||||
# See COPYRIGHT and LICENSE files for more details.
|
||||
#++
|
||||
|
||||
class Wikis::Diff < Redmine::Helpers::Diff
|
||||
class WikiPage::Diff < Redmine::Helpers::Diff
|
||||
attr_reader :content_to, :content_from
|
||||
|
||||
def initialize(content_to, content_from)
|
||||
Reference in New Issue
Block a user