added configurable formats for duration (#287)

This commit is contained in:
Kevin Papst
2018-09-01 17:54:17 +02:00
committed by GitHub
parent 55b7e192aa
commit ebe007eb78
10 changed files with 78 additions and 32 deletions

View File

@@ -94,7 +94,7 @@
{% for widget in section.widgets|slice(1, width) %}
{% set data = widget.data %}
{% if widget.dataType == constant('App\\Model\\Widget::DATA_TYPE_DURATION') %}
{% set data = widget.data|duration %}
{% set data = widget.data|duration('full') %}
{% elseif widget.dataType == constant('App\\Model\\Widget::DATA_TYPE_MONEY') %}
{% set data = widget.data|money %}
{% endif %}