{% extends "layout.jinja" %}

{% block title %}Showing Plots if available{% endblock %}

{% block nav_content %}
<div class="container">
    <div class="row">
        <div class="col s8 no-padding">
            <h5 class="header teal-text text-darken-2">
                Plots and Graphs
            </h5>
        </div>
        <div class="col s4">
            <p>
            <a class="waves-effect waves-light btn generate-plots" href="{{ url_for('plots.generate', experiment=experiment) }}"><i class="material-icons right">multiline_chart</i>Generate</a>
            <a class="waves-effect waves-light btn" href="{{ url_for('plots.export', experiment=experiment) }}"><i class="material-icons right">file_download</i>Export</a>
            </p>
        </div>
    </div>
</div>
{% endblock %}

{% block content %}
<div class="section">
    <div class="row" id="plot-images">
        {% for plot in plots %}
        <div class="col s12 m6">
            <img class="materialboxed responsive-img" src="{{ url_for('plots.image', experiment=experiment, filename=plot) }}">
        </div>
        {% else %}
            <div class="col s12"><h3>No Plots available</h3></div>
        {% endfor %}
    </div>
</div>
{% endblock %}