mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 08:44:48 +08:00
FIX: Allow plugins to override admin component templates
This commit is contained in:
@ -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; }
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user