Showing next season rank. Not fully working
This commit is contained in:
parent
beaba1d389
commit
3f5db4d78c
2 changed files with 16 additions and 4 deletions
|
|
@ -104,14 +104,24 @@ class LeaguesController extends Controller
|
|||
}
|
||||
|
||||
public static function showLeagueRanking($rank, $maxRoundId=-1) {
|
||||
$season = Season::getCurrent();
|
||||
$leagues = array_reverse(League::getRanking($rank));
|
||||
$season = Season::getCurrent();
|
||||
$leagues = array_reverse(League::getRanking($rank));
|
||||
$leagueNames = League::getNames();
|
||||
$userNames = User::getNames();
|
||||
$userNames = User::getNames();
|
||||
|
||||
$leagueScores = League::getRanking($rank);
|
||||
|
||||
return view ('leagues.chart',compact('season','leagues', 'leagueNames', 'userNames','leagueScores'));
|
||||
$totalRanking = League::getTotalRankingOverall(); // Nur für Auf/Abstiegsinfo benötigt.
|
||||
$rankInfo=array();
|
||||
foreach($totalRanking as $index => $entry) {
|
||||
$userId=$entry[0];
|
||||
$rank=3;
|
||||
if ($index<44) { $rank=2; }
|
||||
if ($index<22) { $rank=1; }
|
||||
$rankInfo[$userId]=$rank;
|
||||
}
|
||||
|
||||
return view ('leagues.chart',compact('season','leagues', 'leagueNames', 'userNames','leagueScores','rankInfo'));
|
||||
}
|
||||
|
||||
public static function showSingleUserMatches($userId) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
<td class="table-bordered" style="width:50px;">Punkte</td>
|
||||
<td class="table-bordered" style="width:150px;">Tordifferenz</td>
|
||||
<td class="table-bordered" style="width:150px;">Torverhältnis</td>
|
||||
<td class="table-bordered" style="width:150px;">Quali-Rang</td>
|
||||
</tr>
|
||||
|
||||
<!-- Start Matchgruppen-Loop-->
|
||||
|
|
@ -26,6 +27,7 @@
|
|||
<td> {{$player[1]}} </td>
|
||||
<td> {{$player[2]-$player[3]}} </td>
|
||||
<td> {{$player[2]}}:{{$player[3]}} </td>
|
||||
<td> {{$rankInfo[$player[0]]}} </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue