<!-- BEGIN [% component.name %] -->
    <div class="row">
        <div class="span2">
          <span class="label label-info">Supporting information:</span>
        </div>
    </div>

    [% accordion_class = ['accordion-body', 'collapse'];
          # force collapsed section open if print request:
          accordion_class.push('in') IF is_print_request;
    %]
    <div class="accordion" [% UNLESS is_print_request # prevent collapse %]
          id="summaries"[% END %]>
        [% IF report.morphology %]
          <!-- morphology -->
          <div class="accordion-group">
            <div class="accordion-heading">
              <a class="accordion-toggle" data-toggle="collapse"
                  data-parent="#summaries" href="#collapseOne">
                MORPHOLOGY [% UNLESS is_print_request %]
                    <i class="icon-fullscreen"></i>
                [% END %]
              </a>
            </div>
            <div class="collapseOne" class="[% accordion_class.join(' ') %]">
              <div class="accordion-inner">
                <div class="indent">
                  [% class = foo ? 'text-error' : 'normal' %]
                  <pre class="[% class %]">[% symbolise(report.morphology)
                    | html_line_break %]
                  </pre>
                </div>
              </div>
            </div>
          </div>
        [% END %]

        [% FOREACH entry IN result_summaries; # INCLUDE dumper.tt dump = entry.value;
            section_name = entry.key ; # section_name %]
          <!-- [% section_name %] -->
          <div class="accordion-group">
            <div class="accordion-heading">
              <a class="accordion-toggle" data-toggle="collapse" data-parent="#summaries"
                href="#collapse[% section_name.replace('\W+', '').lower %]">
                 [% label = special_formatting.section_name_map.item(section_name.lower)
                    || section_name; label.upper %]
                [% UNLESS is_print_request %]
                  <i class="icon-fullscreen"></i>
                  <!-- <span style="font-size: x-small">]expand]</span> -->
                [% END %]
              </a>
            </div>

            <div [% UNLESS is_print_request # prevent collapse %]
                id="collapse[% section_name.replace('\W+', '').lower %]"[% END %]
                class="[% accordion_class.join(' ') %]">
              <div class="accordion-inner">
                <div class="indent">
                  [% foreign_id = remote_system_ids.item(section_name).foreign_id;
                    IF foreign_id %]
                    <p class="accordion-heading">Specimen ref: [% foreign_id %]</p>
                  [% END %]
                  <!-- make_chart // will draw chart if required: -->
                  [% PROCESS site/make_chart.tt format_info = special_formatting %]
                  [%
                    class = entry.value.time AND ref_time # fatal if either unset:
                        AND ( entry.value.time.subtract_datetime(ref_time).delta_days > 0 )
                        ? 'text-error rs-highlight' : 'normal'; # INCLUDE debug_delta_days o = entry.value.time;
                    result_summary = symbolise(entry.value.results_summary); # escapeHTML already done
                    %]
                  <pre class="[% class %]">[%- result_summary; ' '; # separator
                    INCLUDE record/report/phenotype.tt -%]</pre>
                </div>
              </div>
            </div>
          </div>
        [% END %]
    </div>
<!-- END [% component.name %] -->
