Use get_event_name result in Jinja templates
The method get_event_name was extracted in 3953ebdc,
and used throughout the code base since - except in
some of the Jinja templates, where we were still
manually constructing event names.
Here we build a global mapping between scope slugs
and event names, that we pass to the Jinja template.
(Also rename some variables for consistency).