Add twig-extensions and use TwigBooleanStringExtension

Fixes #3
This commit is contained in:
Oliver Davies 2016-07-15 02:52:31 +01:00
parent a5a9d51db8
commit bfc4d44751
4 changed files with 50 additions and 7 deletions

View file

@ -8,9 +8,9 @@
<category term='filter'></category>
<title>Mail Filter</title>
<content></content>
<apps:property name='shouldArchive' value='{{ filter.isArchive ? 'true' : 'false' }}'/>
<apps:property name='shouldNeverSpam' value='{{ filter.isNeverSpam ? 'true' : 'false' }}'/>
<apps:property name='shouldTrash' value='{{ filter.isTrash ? 'true' : 'false' }}'/>
<apps:property name='shouldArchive' value='{{ filter.isArchive|boolean_string }}'/>
<apps:property name='shouldNeverSpam' value='{{ filter.isNeverSpam|boolean_string }}'/>
<apps:property name='shouldTrash' value='{{ filter.isTrash|boolean_string }}'/>
{% for condition in filter.conditions -%}
<apps:property name='{{ condition[0] }}' value='{{ condition[1] }}'/>
{%- endfor %}