mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 10:52:45 +08:00
Add plugin outlet in admin theme list (#5837)
This will be used by discourse-theme-creator to add avatars next to each theme.
This commit is contained in:
parent
b9dfb0ba10
commit
c168639be2
|
@ -5,6 +5,7 @@
|
|||
{{#each sortedThemes as |theme|}}
|
||||
<li>
|
||||
{{#link-to 'adminCustomizeThemes.show' theme replace=true}}
|
||||
{{plugin-outlet name="admin-customize-themes-list-item" connectorTagName='span' args=(hash theme=theme)}}
|
||||
{{theme.name}}
|
||||
{{#if theme.user_selectable}}
|
||||
{{d-icon "user"}}
|
||||
|
|
|
@ -8,6 +8,7 @@ class Theme < ActiveRecord::Base
|
|||
|
||||
@cache = DistributedCache.new('theme')
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :color_scheme
|
||||
has_many :theme_fields, dependent: :destroy
|
||||
has_many :theme_settings, dependent: :destroy
|
||||
|
|
|
@ -58,6 +58,8 @@ end
|
|||
class ThemeSerializer < ChildThemeSerializer
|
||||
attributes :color_scheme, :color_scheme_id, :user_selectable, :remote_theme_id, :settings
|
||||
|
||||
has_one :user, serializer: UserNameSerializer, embed: :object
|
||||
|
||||
has_many :theme_fields, serializer: ThemeFieldSerializer, embed: :objects
|
||||
has_many :child_themes, serializer: ChildThemeSerializer, embed: :objects
|
||||
has_one :remote_theme, serializer: RemoteThemeSerializer, embed: :objects
|
||||
|
|
Loading…
Reference in New Issue
Block a user