Learn UI: prev/next navigation, sidebar outline, editing on every page; merge import; defense date

- article page: ← / → navigation across the whole material tree (including
  between sections), sticky sidebar outline with the current article highlighted
- editing on chapter, section and article pages: rename, publish/hide, delete,
  create section/article, move articles while deleting a section; forms return
  to the page they were opened from (validated internal `back` parameter)
- article page opens the edit dialog directly via ?edit=1 (used by "Править"
  links on section/chapter pages)
- import: optional sync flag — with it stale sections/articles of archived
  chapters are deleted (previous behaviour), without it import only adds and
  updates, so material edited in the UI is not overwritten
- student area: lab page and lab cards now show the defense date next to the
  submission deadline
- fix SpEL crash on the student lab page (`and` with nullable strings)
This commit is contained in:
2026-09-17 17:14:16 +03:00
parent 6246d4c8d3
commit df5020fea6
15 changed files with 533 additions and 61 deletions

View File

@@ -367,3 +367,20 @@ th.th-filterable { padding-bottom: 0.35rem; }
border-radius: 0.5rem; padding: 0.5rem 0.75rem;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15); font-size: 0.85rem;
}
/* Чтение материалов: контент + боковое содержание */
.learn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1.5rem; align-items: start; }
.learn-side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; font-size: 0.875rem; }
.side-chapter { font-weight: 600; margin: 0.6rem 0 0.2rem; }
.side-section { margin: 0.25rem 0 0.5rem 0.75rem; }
.side-section > a { color: var(--c-text-muted); }
.side-articles { list-style: none; margin: 0.2rem 0 0 0.75rem; padding: 0; }
.side-articles li { margin: 0.1rem 0; }
.side-articles a { display: inline-block; }
.side-current { font-weight: 600; text-decoration: underline; }
.article-nav { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.article-nav .ml-auto, .article-nav a:last-child:not(:only-child) { margin-left: auto; }
@media (max-width: 1000px) {
.learn-layout { grid-template-columns: 1fr; }
.learn-side { position: static; max-height: none; order: -1; }
}