# TODO ## In Progress - [ ] Extract `SearchController` — most complex public page (§2 step 4) - [ ] Extract `SystemController` — biggest single-file win, 500→8 lines (§2 step 3, §5) - [ ] Extract `ThesisEditController` — merges edit.php + actions/edit.php, deduplicate jury fieldset (§2 step 5) - [ ] Extract remaining controllers one by one (§2 step 6) - [ ] Consolidate action handlers into controller methods (§4) - [ ] Introduce pagination partial `templates/partials/pagination.php` (§6) - [ ] Introduce admin form partials: select-field, checkbox-list, jury-fieldset (§6) - [ ] Unify flash message keys project-wide to `_flash_error` / `_flash_success` (§7) - [ ] Move OG tag construction into controller logic (§8) - [ ] Extract inline CSS/JS from `system.php` into separate assets (§5) ## Completed - [x] Create `src/App.php` — boot, adminGuard, verifyCsrf, rotateCsrf, redirect, flash, consumeFlash, render - [x] Auto-load `App.php` from `config/bootstrap.php` - [x] Create `templates/partials/flash-messages.php` — unified flash partial with legacy key drain - [x] Merge public and admin head/nav templates into unified `templates/head.php` and `templates/header.php` - `templates/head.php` — outputs `…`, reads `$bodyClass`, `$isAdmin`; handles admin title suffix, admin.css prepend, and OG tag suppression internally - `templates/header.php` — outputs `
` with public nav + search bar or admin nav depending on `$isAdmin` - Deleted: `templates/public/head.php`, `templates/admin/head.php`, `templates/nav.php`, `templates/admin/nav.php` - All 11 admin pages and 5 public pages updated to set `$bodyClass` / `$isAdmin` and include new templates - [x] Replace nav/header BEM custom classes with semantic HTML targeting in CSS - `common.css`: `.site-nav` → `header nav`, `.site-nav__logo` → `header nav > a`, etc. - `admin.css`: `.admin-nav` → `.admin-body header nav`, logout via `[data-nav-logout]` attribute - [x] PHP vs Flask architecture analysis (`ANALYSIS_PHP_VS_FLASK.md`) - [x] Refactoring recommendations for controller/template separation (`REFACTORING_RECOMMENDATIONS.md`)