{# #######################
  content.html
##########################

This block prints the main content of the report - it should loop through
the output from each module and print it in sections.

#}

{% for m in report.modules %}
  {% if not m.hidden %}
    {% if m.sections | length > 0 %}
    <div id="mqc-module-section-{{ m.anchor }}" class="mqc-module-section" data-module-anchor="{{ m.anchor }}">
      {% for s in m.sections %}
        {% if loop.first %}
        <div class="mqc-module-section-first">
          <div class="mqc-module-title-section">
            <h2 class="mqc-module-title" id="{{ m.anchor }}">{{ m.name }}</h2>
            {% if m.versions %}
              <div class="text-muted">
                {% for tool, versions in m.versions.items() %}
                  {% if tool == m.name %}
                    <em>Version{% if versions|length > 1 %}s{% endif %}: </em>
                    <code>
                      {% for version in versions %}
                        {{ version[1] }}{% if not loop.last %}, {% endif %}
                      {% endfor %}
                    </code>
                  {% else %}
                    <em>{{ tool }}:</em>
                    <code>
                      {% for version in versions %}
                        {{ version[1] }}{% if not loop.last %}, {% endif %}
                      {% endfor %}
                    </code>
                  {% endif %}
                {% endfor %}
              </div>
            {% endif %}
          </div>
          {{ m.intro if m.intro }}
          {% if m['comment'] %}<blockquote class="mqc-section-comment">{{ m['comment'] }}</blockquote>{% endif %}
        {% endif %}
          {% if s['print_section'] %}
            {% if (s['name'] is none or s['name'] | length == 0) and s['helptext'] is not none and s['helptext'] | length > 0 %}
              <button class="btn btn-default btn-sm pull-right btn-help" type="button" data-toggle="collapse" data-target="#{{ s['anchor'] }}_helptext" aria-expanded="false" aria-controls="{{ s['anchor'] }}_helptext">
                <span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span>
                Help
              </button>
            {% endif %}
            <div class="mqc-section mqc-section-{{ m.anchor }}">
              {% if s['name'] is not none and s['name'] | length > 0 %}
                <h3 id="{{ s['anchor'] }}">
                    {{ s['name'] }}
                    {% if s['helptext'] is not none and s['helptext'] | length > 0 %}
                      <button class="btn btn-default btn-sm pull-right btn-help" type="button" data-toggle="collapse" data-target="#{{ s['anchor'] }}_helptext" aria-expanded="false" aria-controls="{{ s['anchor'] }}_helptext">
                        <span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span>
                        Help
                      </button>
                    {% endif %}
                </h3>
              {% endif %}
              {% if s['description'] is not none and s['description'] | length > 0 %}<div class="mqc-section-description">{{ s['description'] }}</div>{% endif %}
              {% if s['comment'] is not none and s['comment'] | length > 0 %}<blockquote class="mqc-section-comment">{{ s['comment'] }}</blockquote>{% endif %}
              {% if s['helptext'] is not none and s['helptext'] | length > 0 %}
                <div class="collapse mqc-section-helptext " id="{{ s['anchor'] }}_helptext">
                  <div class="well">{{ s['helptext'] }}</div>
                </div>
              {% endif %}
              {{ s['content_before_plot'] if s['content_before_plot'] }}
              {% if s['plot'] is not none %}<div class="mqc-section-plot">{{ s['plot'] }}</div>{% endif %}
              {{ s['content'] if s['content'] }}
  
              {{ '<hr>' if not loop.last }}
            </div>
          {% endif %}
      {% if loop.first %}
      </div> <!-- end mqc-module-section-first -->
      {% endif %}
    {% endfor %}
    </div>
    {{ '<hr>' if not loop.last }}
    {% endif %}
  {% endif %}
{% endfor %}
