working on gshirt / windows adaptation

This commit is contained in:
Torsten Schneider 2017-12-17 15:34:19 +01:00
parent 2e21eb48d0
commit 1b064fe899
16 changed files with 2722 additions and 2342 deletions

View file

@ -578,8 +578,9 @@ class UsersController extends Controller
if (Auth::guest()) { return redirect("/"); }
$rankingDisplay = Tipp::gshirt_table();
$test="Test";
return view ('users.gshirt_ranking', compact('rankingDisplay'));
$usernames = User::getNames();
$roundnames = array_reverse(Round::getNames());
return view ('users.gshirt_ranking', compact('rankingDisplay','usernames', 'roundnames'));
}
}

View file

@ -705,6 +705,8 @@ class Tipp extends Model
$last_round_id = end($round_ids);
$users=User::getActives();
$roundNames = Round::getNames();
$lastroundentries=array();
foreach ($users as $user) {
$key=$last_round_id."_".$user->id;
@ -722,6 +724,7 @@ class Tipp extends Model
$rankingDisplay[$user_id]=array();
}
$rankingDisplay[$user_id][$round_id]=array();
$roundtipps[$key]["round_name"]=$roundNames[$round_id];
array_push($rankingDisplay[$user_id][$round_id],$roundtipps[$key]);
}
}