From 17213887a1161aca09217a5ab61db8a0077b8368 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 10 Jan 2018 13:14:16 -0500 Subject: [PATCH] FIX: Allow plugins to override admin component templates --- .../javascripts/admin/templates/modal/admin-suspend-user.hbs | 2 +- app/assets/javascripts/discourse-common/resolver.js.es6 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs b/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs index 4c0af11512e..097c7cb0b47 100644 --- a/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs +++ b/app/assets/javascripts/admin/templates/modal/admin-suspend-user.hbs @@ -11,7 +11,7 @@ input=suspendUntil}} - {{suspension-details reason=reason message=message}} + {{suspension-details reason=reason message=message tagName=''}} {{else}}
diff --git a/app/assets/javascripts/discourse-common/resolver.js.es6 b/app/assets/javascripts/discourse-common/resolver.js.es6 index 4c2dec2f0bf..569fb3a0a24 100644 --- a/app/assets/javascripts/discourse-common/resolver.js.es6 +++ b/app/assets/javascripts/discourse-common/resolver.js.es6 @@ -195,7 +195,8 @@ export function buildResolver(baseName) { findAdminTemplate(parsedName) { var decamelized = parsedName.fullNameWithoutType.decamelize(); if (decamelized.indexOf('components') === 0) { - const compTemplate = Ember.TEMPLATES['admin/templates/' + decamelized]; + let comPath = `admin/templates/${decamelized}`; + const compTemplate = Ember.TEMPLATES[`javascripts/${comPath}`] || Ember.TEMPLATES[comPath]; if (compTemplate) { return compTemplate; } }