Files
2026-11-16 13:32:09 +07:00

38 lines
1.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%- include('../partials/head') %>
<section class="page-hero">
<div class="page-head">
<div>
<span class="eyebrow">Operator</span>
<h1>Kegiatan</h1>
<p class="sub">Atur kegiatan, ketua tim, dan dosen pemantaunya.</p>
</div>
<div class="actions"><a class="btn btn-primary" href="/admin/kegiatan/baru">Tambah kegiatan</a></div>
</div>
</section>
<div class="card table-wrap">
<% if (!kegiatan.length) { %>
<div class="empty-inline">
<p>Belum ada kegiatan. Pastikan akun ketua tim sudah dibuat, lalu tambahkan kegiatan.</p>
<a class="btn btn-primary btn-sm" href="/admin/kegiatan/baru">Tambah kegiatan</a>
</div>
<% } else { %>
<table class="table">
<thead><tr><th>Kegiatan</th><th>Ketua tim</th><th>Dosen pemantau</th><th>Periode</th><th>Log</th><th></th></tr></thead>
<tbody>
<% kegiatan.forEach(function (k) { %>
<tr>
<td data-label="Kegiatan"><a href="/kegiatan/<%= k.id %>"><strong><%= k.nama %></strong></a></td>
<td data-label="Ketua tim"><%= k.ketua_nama %></td>
<td data-label="Dosen"><%= k.dosen_nama || '-' %></td>
<td data-label="Periode"><%= k.tanggal_mulai ? fmtDateShort(k.tanggal_mulai) + ' – ' + fmtDateShort(k.tanggal_selesai) : '-' %></td>
<td data-label="Log"><%= k.jml_log %><% if (k.log_terakhir) { %> <span class="muted small">(terakhir <%= fmtDateShort(k.log_terakhir) %>)</span><% } %></td>
<td class="row-actions"><a class="btn btn-sm" href="/admin/kegiatan/<%= k.id %>/edit">Ubah</a></td>
</tr>
<% }) %>
</tbody>
</table>
<% } %>
</div>
<%- include('../partials/foot') %>