{{define "partials/cron_jobs.html"}}
{{if .Jobs}}
<table>
    <thead>
        <tr>
            <th>App</th>
            <th>Job</th>
            <th>Type</th>
            <th>Schedule</th>
            <th>Prochain run</th>
            <th>Statut</th>
        </tr>
    </thead>
    <tbody>
        {{range .Jobs}}
        <tr>
            <td><code>{{index . "app_id"}}</code></td>
            <td><strong>{{index . "name"}}</strong></td>
            <td>{{index . "type"}}</td>
            <td><code>{{index . "schedule"}}</code></td>
            <td>{{index . "next_run"}}</td>
            <td>
                {{if index . "enabled"}}
                <span class="status-badge status-ok">Actif</span>
                {{else}}
                <span class="status-badge status-error">Inactif</span>
                {{end}}
            </td>
        </tr>
        {{end}}
    </tbody>
</table>
{{else}}
<p>Aucun job cron configuré.</p>
{{end}}
{{end}}
