Minor fixes on common components

This commit is contained in:
Bruno Alves de Faria committed 2018-03-07 08:25:59 -03:00
1 parent 6e3e44a1fe
commit d486ebd551
5 files changed
+18 -5

No files matched your search

@@ -15,7 +15,7 @@
{{#if isError}}
{{>pageError (extend this error=this.details)}}
{{else}}
{{#let message=(choose this.bodyText this.reason this.message 'An error has ocurred.')}}
{{#let message=(choose this.bodyText this.reason this.message (valueIf UI.contentBlock '' 'An error has ocurred.' ))}}
<div class="message">{{message}}</div>
{{/let}}
{{/if}}
@@ -24,9 +24,11 @@
<use xlink:href={{absoluteUrl item.iconSvgUse}}></use>
</svg>
{{/if}}
{{#if item.text}}
<span>{{item.text}}</span>
{{/if}}
{{#let text=(getText item)}}
{{#if text}}
<span>{{text}}</span>
{{/if}}
{{/let}}
{{/link}}
</li>
{{#if item.separatorAfter}}
@@ -10,5 +10,13 @@ Template.dropdownFormMenu.helpers({
}
return isVisible;
},
getText(item) {
if (typeof item.text === 'function') {
return item.text(item.params || {});
}
return item.text || '';
}
});