mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
add banner archetype
This commit is contained in:
parent
4c237f5bf5
commit
3153a84da2
|
@ -9,22 +9,24 @@ class Archetype
|
||||||
end
|
end
|
||||||
|
|
||||||
def attributes
|
def attributes
|
||||||
{'id' => @id,
|
{
|
||||||
'options' => @options}
|
id: @id,
|
||||||
|
options: @options
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.default
|
def self.default
|
||||||
'regular'
|
'regular'
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.poll
|
|
||||||
'poll'
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.private_message
|
def self.private_message
|
||||||
'private_message'
|
'private_message'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.banner
|
||||||
|
'banner'
|
||||||
|
end
|
||||||
|
|
||||||
def self.list
|
def self.list
|
||||||
return [] unless @archetypes.present?
|
return [] unless @archetypes.present?
|
||||||
@archetypes.values
|
@archetypes.values
|
||||||
|
@ -35,9 +37,9 @@ class Archetype
|
||||||
@archetypes[name] = Archetype.new(name, options)
|
@archetypes[name] = Archetype.new(name, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# default archetypes
|
||||||
# By default we have a regular archetype and a private message
|
|
||||||
register 'regular'
|
register 'regular'
|
||||||
register 'private_message'
|
register 'private_message'
|
||||||
|
register 'banner'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user