- if @mailing.class == MailyHerald::OneTimeMailing .row .col-sm-10 %h2.border One-time mailings - if @one_time_mailings.any? %table.table.table-listing %thead %tr %th Name %th Actions - @one_time_mailings.each do |mailing| %tbody %tr %td - if @mailing != mailing = link_to webui_mailing_path(mailing) do = mailing.title - unless mailing.enabled? %span.label off - else %strong= mailing.title - unless mailing.enabled? %span.label off %td - if @mailing != mailing = link_to 'Show', webui_mailing_path(mailing) - else No mailings - if @mailing.class == MailyHerald::PeriodicalMailing .row .col-sm-10 %h2.border Periodicals - if @periodical_mailings.any? %table.table.table-listing %thead %tr %th Name %th Actions - @periodical_mailings.each do |mailing| %tbody %tr %td - if @mailing != mailing = link_to webui_mailing_path(mailing) do = mailing.title %span.label.label-info= "every " + distance_of_time_in_words(mailing.period) - unless mailing.enabled? %span.label off - else %strong= mailing.title %span.label.label-info= "every " + distance_of_time_in_words(mailing.period) - unless mailing.enabled? %span.label off %td - if @mailing != mailing = link_to 'Show', webui_mailing_path(mailing) - else No mailings - if @mailing.class == MailyHerald::SequenceMailing .row .col-sm-10 %h2.border Sequences - if @sequences.any? %table.table.table-listing %thead %tr %th Name %th Actions - @sequences.scoped.each do |sequence| %tbody %tr %td - if @sequence == sequence && !@mailing %strong= sequence.title - unless sequence.enabled? %span.label off - else = link_to webui_sequence_path(sequence) do = sequence.title - unless sequence.enabled? %span.label off %td - if @sequence == sequence && !@mailing -else = link_to 'Show', webui_sequence_path(sequence) - unless sequence.mailings.empty? - sequence.mailings.each do |mailing| %tr - if @mailing != mailing %td = link_to webui_mailing_path(mailing) do = mailing.title %span.label.label-info= "after " + distance_of_time_in_words(mailing.absolute_delay) - unless mailing.enabled? %span.label off - else %strong= mailing.title %span.label.label-info= "after " + distance_of_time_in_words(mailing.absolute_delay) - unless mailing.enabled? %span.label off %td - if @mailing != mailing = link_to 'Show', webui_mailing_path(mailing) - else No sequences = yield