$def with (auth_methods, error) $# $# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for $# more information about the licensing of this file. $# $var title: $:_("Welcome") $# Start content
$if error: $if allow_registration:
$ auth_meths = auth_methods.items() $ remaining = len(auth_meths) $ on_line = min(remaining, 4) $if remaining: $if allow_registration:
$:_("Sign in with")
$ authid = 0 $for id, auth_method in auth_meths: $if authid % on_line == 0:
$ remaining = remaining - 1 $if authid % on_line == on_line-1:
$ on_line = min(remaining, 4) $ authid = 0 $else: $ authid += 1