FIX: Allow plugins to override admin component templates
This commit is contained in:
parent
01726e68ab
commit
17213887a1
|
@ -11,7 +11,7 @@
|
||||||
input=suspendUntil}}
|
input=suspendUntil}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{{suspension-details reason=reason message=message}}
|
{{suspension-details reason=reason message=message tagName=''}}
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class='cant-suspend'>
|
<div class='cant-suspend'>
|
||||||
|
|
|
@ -195,7 +195,8 @@ export function buildResolver(baseName) {
|
||||||
findAdminTemplate(parsedName) {
|
findAdminTemplate(parsedName) {
|
||||||
var decamelized = parsedName.fullNameWithoutType.decamelize();
|
var decamelized = parsedName.fullNameWithoutType.decamelize();
|
||||||
if (decamelized.indexOf('components') === 0) {
|
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; }
|
if (compTemplate) { return compTemplate; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue