{% extends "templates/base.jinja2" %}

{% block content %}
    <h1 class="view">Client <small>{{ object.name }}</small></h1>
    <h2>Jobs <small>{{ job_statistics[0].num_jobs }} total</small></h2>
    {{ macros.jobs_table(request, jobs) }}
{% endblock %}

{% block sidebar %}
    <h1 class="view">Details</h1>
    <table class="table table-striped table-bordered table-condensed word-wrapped">
        <tbody>
            <tr>
               <td>Platform:</td>
               <td>{{ object.uname }}</td>
           </tr>
           <tr>
               <td>Total size of backups:</td>
               <td>{{ object.format_byte_size(job_statistics[0].total_size_backups) }}</td>
           </tr>
           <tr>
               <td>Last successful backup:</td>
               {% if last_successful_job[0] %}
                   <td>{{ macros.link(last_successful_job[0].render_starttime(request)) }}</td>
               {% else %}
                   <td>/</td>
               {% endif %}
           </tr>
           <tr>
               <td>File retention:</td>
               <td>{{ macros.link(object.render_fileretention(request)) }}</td>
           </tr>
           <tr>
               <td>Job retention:</td>
               <td>{{ macros.link(object.render_jobretention(request)) }}</td>
           </tr>
           <tr>
               <td>Auto prune:</td>
               <td>{{ macros.link(object.render_autoprune(request)) }}</td>
           </tr>
        </tbody>
    </table>
{% endblock %}
