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:
David Taylor 2018-05-18 09:09:21 +01:00 committed by Régis Hanol
parent b9dfb0ba10
commit c168639be2
3 changed files with 4 additions and 0 deletions

View File

@ -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"}}

View File

@ -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

View File

@ -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