Add course duplicate and compact list/roster layout
- POST /api/courses/:id/duplicate deep-copies a course with all units, items, and quiz questions; opens the copy immediately for renaming - Roster changed from broken vertical stack to horizontal chip-pills (fixes admin-card label override that was collapsing inline-flex) - item-row padding reduced for tighter lists throughout admin - Courses and Kids admin panels now use a 2-column auto-fill grid Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
ca68e9df52
commit
0ae0db76bc
4 files changed
+68
-3
No files matched your search
@@ -280,6 +280,13 @@ $('#course-meta-form').addEventListener('submit', async (e) => {
|
||||
openCourseDetail(currentCourseId);
|
||||
});
|
||||
|
||||
$('#cd-duplicate').addEventListener('click', async () => {
|
||||
const { id } = await api(`/api/courses/${currentCourseId}/duplicate`, { method: 'POST' });
|
||||
currentCourseId = id;
|
||||
showPanel('course-detail');
|
||||
msg('Course duplicated — update the name and details below.');
|
||||
});
|
||||
|
||||
$('#cd-delete').addEventListener('click', async () => {
|
||||
if (!confirm('Delete this whole course, including all units, items, and grades?')) return;
|
||||
await api(`/api/courses/${currentCourseId}`, { method: 'DELETE' });
|
||||
|
||||
Reference in new issue
Block a user