{% extends "../base.html" %}
{% block content %}
<h2><translate>Resin Settings</translate> <a class="btn btn-default" href="/profile/add" role="button"><span class="glyphicon glyphicon-plus"></span></a></h2>
<table class="table table-striped table-bordered model-list">
        <thead>
            <tr>
                <th translate>Title</th>
                <th><span translate>Layer Thickness</span> <sup translate>Micron</sup></th>
                <th><span translate>Cure Time</span> <sup translate>Second</sup></th>
                <th translate>Default</th>
                <th translate>Actions</th>
            </tr>
        </thead>

        {% if profiles %}
        {% for profile in profiles %}
        <tr>
                <td>{{profile.Title}}</td>
                <td>{{profile.Depth}}</td>
                <td>{{profile.CureTime}}</td>
                <td>
                    {% if defaultProfile==profile.ProfileID %}
                    <span class="glyphicon glyphicon-ok"></span>
                    {% else %}
                    <a class="btn btn-success" href="/profile/default/{{profile.ProfileID}}"><span class="glyphicon glyphicon-plus"></span></a>
                    {% endif %}
                </td>
                <td>
                    <a class="btn btn-primary" href="/profile/edit/{{profile.ProfileID}}"><span class="glyphicon glyphicon-pencil"></span></a>
                    <a class="btn btn-danger ask" data-ask="delete-confirm" href="/profile/delete/{{profile.ProfileID}}"><span class="glyphicon glyphicon-trash"></span></a>
                    <a class="btn btn-info" href="/profile/clone/{{profile.ProfileID}}"><span class="glyphicon glyphicon-duplicate"></span></a>
                    <a class="btn btn-success" href="/profile/export/{{profile.ProfileID}}"><span class="glyphicon glyphicon-export"></span></a>
                    <translate class="hide" id="delete-confirm">Are you sure you want to delete this profile?</translate>
                </td>
        </tr>
        {% endfor %}
        {% else %}
        <tr>
            <td colspan="999">
                <div class="text-center" translate>
                    No Profile
                </div>
            </td>
        </tr>
        {% endif %}
    </table>
    <br>
    <a class="btn btn-success" href="/import"><span class="glyphicon glyphicon-import"></span></a>
{% endblock %}
