- case @style
- when 'qanda'
= html_tag('div', { :id => @id, :class => ['qlist', @style, role] }.merge(data_attrs(@attributes)))
- if title?
.title=title
ol
- items.each do |questions, answer|
li
- [*questions].each do |question|
p: em=question.text
- unless answer.nil?
- if answer.text?
p=answer.text
- if answer.blocks?
=answer.content
- when 'horizontal'
= html_tag('div', { :id => @id, :class => ['hdlist', role] }.merge(data_attrs(@attributes)))
- if title?
.title=title
table
- if (attr? :labelwidth) || (attr? :itemwidth)
colgroup
col style=((attr? :labelwidth) ? %(width:#{(attr :labelwidth).chomp '%'}%;) : nil)
col style=((attr? :itemwidth) ? %(width:#{(attr :itemwidth).chomp '%'}%;) : nil)
- items.each do |terms, dd|
tr
td class=['hdlist1',('strong' if option? 'strong')]
- terms = [*terms]
- last_term = terms.last
- terms.each do |dt|
=dt.text
- if dt != last_term
br
td.hdlist2
- unless dd.nil?
- if dd.text?
p=dd.text
- if dd.blocks?
=dd.content
- else
= html_tag('div', { :id => @id, :class => ['dlist', @style, role] }.merge(data_attrs(@attributes)))
- if title?
.title=title
dl
- items.each do |terms, dd|
- [*terms].each do |dt|
dt class=('hdlist1' unless @style) =dt.text
- unless dd.nil?
dd
- if dd.text?
p=dd.text
- if dd.blocks?
=dd.content