mirror of https://github.com/zulip/zulip.git
templates: Add `is_false` handlebars helper.
There is need for such a helper because `unless` executes to be true even when we haven't passed the context variable on which we are checking the conditional statement.
This commit is contained in:
parent
0292ffe04b
commit
d1c62369b7
|
@ -79,6 +79,13 @@ Handlebars.registerHelper('if_or', function () {
|
||||||
return options.inverse(this);
|
return options.inverse(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper('is_false', function (variable, options) {
|
||||||
|
if (variable === false) {
|
||||||
|
return options.fn(this);
|
||||||
|
}
|
||||||
|
return options.inverse(this);
|
||||||
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('t', function (i18n_key) {
|
Handlebars.registerHelper('t', function (i18n_key) {
|
||||||
// Marks a string for translation.
|
// Marks a string for translation.
|
||||||
// Example usage:
|
// Example usage:
|
||||||
|
|
Loading…
Reference in New Issue