Мне нужно, чтобы мои подзаголовки правильно работали на моем столе, чтобы я мог его стилизовать. Пока что мне это не удается. Для каждого подзаголовка указывается Under1Subheader, Under2ndSubheader и Under3rdSubheader.
%h3
=conmodels_t('cons.models', 'my_events')
%table#some_table.my_table
%tr.header
%th{rowspan: 2} View
%th{rowspan: 2} Date and Time
%th{colspan: 3} Place
%th{rowspan: 2} How Long
- if display_some_field?(@pres.application, :event, :some_exp) && course_event_general_expenses?(course)
%th Expense
%th How Intense
%th{rowspan: 2} State
%th.actions{rowspan: 2} Action
%tr.header
%th SubHeader 1
%th SubHeader 2
%th SubHeader 3
- if course.events.count > 0
- events.each do |event|
- rowspan = event.event_locations.size+1
- tr do
%td{rowspan: rowspan}= link_to event.event_name
%td{rowspan: rowspan}
= show_date event.event_date
= "#{event.event_start} - #{event.event_end}"
%td{rowspan: rowspan}
= "#{event.duration}"
- if event.workshop_duration
= " (#{event.workshop_duration})"
- if display_something
%th{rowspan: rowspan}= event.is_other_location ? number_to_currency(event.general_expenses) : ''
%th{rowspan: rowspan}= event.is_other_location ? number_to_percentage(event_general_expenses(event), precision: 0) : ''
%th{rowspan: rowspan}= course_status_name(event.status)
%td{rowspan: rowspan}
- if event.can_edit?
.button=link_to 'Edit', edit_event_path(@course.app, event)
- elsif event.course.ended?
.button=link_to 'View', some_app_path(@course.path, event)
- event.event_locations.drop(1).each do |location|
%tr.row1
%td= location.Under1Subheader
%td= location.Under2ndSubheader
%td= location.Under3rdSubheader
- else
%tr
%td Nothing to view