5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 16:01:41 +00:00
panel/app/views/i18n/_recursive.haml
f 5b46075d9a
saltar de secciones con un dropdown
recomendación de la clinica de ux de iff
2018-04-16 14:20:45 -03:00

16 lines
587 B
Text

- previous_key ||= ''
- data.each_pair do |key, value|
- keys = [superkeys, key].flatten
- unless keys.first == previous_key
%h2{id: keys.first}
= t("help.i18n.#{keys.first}")
%small
%a.float-md-right{href: '#top'}= t('help.i18n.top')
- if value.is_a? String
= render 'i18n/text_field', keys: keys, value: value
- elsif value.is_a? Hash
= render 'i18n/recursive', data: value, superkeys: keys,
previous_key: keys.first
- elsif value.is_a? Array
= render 'i18n/recursive_array', data: value, superkeys: keys,
previous_key: keys.first