""" School Management Module - Page Templates. Enthält Template-Funktionen für Schulverwaltungsseiten. """ from .school_styles import get_school_base_styles SCHOOL_NAV_ITEMS = [ {"id": "dashboard", "label": "Dashboard", "href": "/school"}, {"id": "attendance", "label": "Anwesenheit", "href": "/school/attendance"}, {"id": "grades", "label": "Noten", "href": "/school/grades"}, {"id": "timetable", "label": "Stundenplan", "href": "/school/timetable"}, {"id": "onboarding", "label": "Eltern", "href": "/school/onboarding"}, ] SCHOOL_ICONS = { "home": '', "users": '', "calendar": '', "chart": '', "clock": '', "external": '', } def render_school_sidebar(active_page: str = "dashboard") -> str: """Render the school sidebar navigation.""" icon_map = { "dashboard": "home", "attendance": "users", "grades": "chart", "timetable": "clock", "onboarding": "calendar", } nav_html = "" for item in SCHOOL_NAV_ITEMS: active_class = "active" if item["id"] == active_page else "" icon = SCHOOL_ICONS.get(icon_map.get(item["id"], "home"), "") nav_html += f''' {icon} {item['label']} ''' return f''' ''' def render_school_base_page( title: str, content: str, active_page: str = "dashboard", extra_styles: str = "", extra_scripts: str = "" ) -> str: """Render the base page template for school pages.""" return f'''