diff --git a/templates/web/admin/subdefs.twig b/templates/web/admin/subdefs.twig index 8a5961e4ec..f1d436de5f 100644 --- a/templates/web/admin/subdefs.twig +++ b/templates/web/admin/subdefs.twig @@ -267,8 +267,8 @@ @@ -276,49 +276,49 @@ - {% for mediatype, options in subdef.get_mediatype_options() %} -
+ {% for subdefType in subdef.getAvailableSubdefTypes() %} +
- {% for optionname, option in options%} - {% set varname = subdefgroup~'_'~subdefname~'_'~mediatype~'['~optionname~']' %} + {% for option in subdefType.getOptions() %} + {% set varname = subdefgroup~'_'~subdefname~'_'~subdefType.getType()~'['~ option.getName() ~']' %}
- {{optionname}} + {{option.getName()}} {% set extradata = '' %} - {% if option.type == 'range' %} -
+ {% if option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_RANGE') %} +
- {% elseif option.type == 'enum' %} + {% elseif option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_ENUM') %} - {% elseif option.type == 'boolean' %} - {% trans 'yes' %} - {% trans 'no' %} - {% else %} - {{option.type}} + {% elseif option.getType() == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_BOOLEAN') %} + {% trans 'yes' %} + {% trans 'no' %} + {% else %} + {% endif %}
- {% if option.type == 'range' %} - + {% if option.type == constant('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType::TYPE_RANGE') %} + {% endif %}