<:args id=`int`:> <:import hoptime.hopapi as=H:> <:if `id is not None`:> <:set game `H.Games.getUnique(id=id)`:> <:if `not game`:> <:import templating.Handler fourOhFourHandler:> <:call `CONNECTION.uri=CONNECTION.realUri`:> <:call `CONNECTION.setStatus(404)`:> <:call `fourOhFourHandler(CONNECTION, {})`:> <:halt:> <:/if:> <:#:>we've got a specific game; render it<:/#:> <:include /games/process_game_forms.pyinc:> <:val `game['title']`:>
<:include /comp/login.inc:>
<:component /games/game.comp game=`game` user=`CONNECTION.hoptimeUser`:> <:else:> <:#:>an index of all games<:/#:> Game Index <:component /games/game_index.comp user=`CONNECTION.hoptimeUser`:> <:/if:>