<% // Current path (res.locals.pfad, set in the auth middleware) drives the active // state. The old header had none — you could never tell which section you were // in. Copied into a differently named local: re-declaring `pfad` here would // shadow the EJS local under `with(locals)`. var aktPfad = (typeof pfad !== 'undefined' && pfad) ? String(pfad) : '/'; // Bewerbungen owns the dashboard and every single application page. var istBewerbungen = (aktPfad === '/' || aktPfad.indexOf('/bewerbung') === 0); // Offene Angebote only — "übernommen" lives under Stellensuche, with the rest // of the search machinery. var istAngebote = (aktPfad === '/jobangebote'); var istPostfach = (aktPfad.indexOf('/postfach') === 0); var istVorlagen = (aktPfad.indexOf('/vorlagen') === 0); var istStatistik = (aktPfad.indexOf('/statistik') === 0); // The search machinery: how offers get found, what was taken, what is blocked. var istSuchprofil = (aktPfad.indexOf('/jobsuche') === 0); var istUebernommen = (aktPfad.indexOf('/jobangebote/uebernommen') === 0); var istBlacklist = (aktPfad.indexOf('/blacklist') === 0); var istStellensuche = istSuchprofil || istUebernommen || istBlacklist; var istEinstellungen = (aktPfad.indexOf('/einstellungen') === 0); var istAdmin = (aktPfad.indexOf('/admin') === 0); var angemeldet = (typeof user !== 'undefined' && user); var initiale = angemeldet ? String(user.username || '?').charAt(0).toUpperCase() : '?'; %>