Add cross-module lesson navigation and admin edit button
- Admin lesson editor now navigates across module boundaries (full course flat list) - Student lesson view shows "Edit" button for admins linking to lesson editor Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,18 @@ export default async function LessonPage({ params }: Props) {
|
||||
|
||||
return (
|
||||
<article className="max-w-3xl mx-auto px-6 py-8">
|
||||
{/* Admin edit bar */}
|
||||
{isAdmin && (
|
||||
<div className="flex items-center justify-end mb-4">
|
||||
<Link
|
||||
href={`/admin/courses/${lesson.module.course.id}/modules/${lesson.moduleId}/lessons/${lessonId}`}
|
||||
className="btn-aubade text-xs px-3 py-1.5"
|
||||
>
|
||||
Редактировать урок
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Title */}
|
||||
<h1 className="text-2xl font-bold mb-6 leading-snug">{lesson.title}</h1>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user