Ranking2 (cached ranking): Added sort by rankscore, shared rank positions

This commit is contained in:
Torsten 2017-08-15 16:19:19 +02:00
parent d62b312eb0
commit b7f4b2be4e
3 changed files with 48 additions and 20 deletions

View file

@ -45,7 +45,7 @@
<p>&nbsp;</p>
<div>
<label style="float:left; width:150px" for="name">Email:</label>
<input style="width:150px" type="text" class="form-control" id="email" name="email" value="{{ $user->email }}" required>
<input type="text" class="form-control" id="email" style="width:600px" name="email" value="{{ $user->email }}" required>
</div>
<p>&nbsp;</p>
<div>

View file

@ -132,26 +132,26 @@
</div>
</th>
@foreach($userids as $userid)
@foreach($rankingDisplay as $entry)
<tr>
<td class="table-bordered">&nbsp;<span class="text list-unstyled" href="#" >&nbsp;{{ $rankingDisplay[$userid]["rankscore"] }}&nbsp;</span></td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/crown.png" style="{{ ($rankingDisplay[$userid]["is_dayscorewinner"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered">&nbsp;<a class="text list-unstyled" href="#" style="vertical-align: middle;">{{ $rankingDisplay[$userid]["user_name"] }} &nbsp;</a></td>
<td class="table-bordered" align="center">&nbsp;{{ $rankingDisplay[$userid]["rankscore"] }}&nbsp;</td>
<td class="table-bordered" align="center">&nbsp;{{ $rankingDisplay[$userid]["dayscore"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$rankingDisplay[$userid]["trendCol1"]}}">&nbsp;{{ $rankingDisplay[$userid]["tipp_score1"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$rankingDisplay[$userid]["trendCol1"]}}">&nbsp;{{ $rankingDisplay[$userid]["tipp_score2"] }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($rankingDisplay[$userid]["joker1"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered" align="center" style="{{$rankingDisplay[$userid]["trendCol2"]}}">&nbsp;{{$rankingDisplay[$userid]["tipp_score3"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$rankingDisplay[$userid]["trendCol2"]}}">&nbsp;{{$rankingDisplay[$userid]["tipp_score4"] }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($rankingDisplay[$userid]["joker2"]? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered" align="center" style="{{$rankingDisplay[$userid]["trendCol3"]}}">&nbsp;{{$rankingDisplay[$userid]["tipp_score5"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$rankingDisplay[$userid]["trendCol3"]}}">&nbsp;{{$rankingDisplay[$userid]["tipp_score6"] }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($rankingDisplay[$userid]["joker3"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered" align="center" style="{{$rankingDisplay[$userid]["trendCol4"]}}">&nbsp;{{$rankingDisplay[$userid]["tipp_score7"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$rankingDisplay[$userid]["trendCol4"]}}">&nbsp;{{$rankingDisplay[$userid]["tipp_score8"] }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($rankingDisplay[$userid]["joker4"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered">&nbsp;<span class="text list-unstyled" href="#" >&nbsp;{{ $entry["rank"] }}&nbsp;</span></td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/crown.png" style="{{ ($entry["is_dayscorewinner"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered">&nbsp;<a class="text list-unstyled" href="#" style="vertical-align: middle;">{{ $entry["user_name"] }} &nbsp;</a></td>
<td class="table-bordered" align="center">&nbsp;{{ $entry["rankscore"] }}&nbsp;</td>
<td class="table-bordered" align="center">&nbsp;{{ $entry["dayscore"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$entry["trendCol1"]}}">&nbsp;{{ $entry["tipp_score1"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$entry["trendCol1"]}}">&nbsp;{{ $entry["tipp_score2"] }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($entry["joker1"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered" align="center" style="{{$entry["trendCol2"]}}">&nbsp;{{$entry["tipp_score3"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$entry["trendCol2"]}}">&nbsp;{{$entry["tipp_score4"] }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($entry["joker2"]? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered" align="center" style="{{$entry["trendCol3"]}}">&nbsp;{{$entry["tipp_score5"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$entry["trendCol3"]}}">&nbsp;{{$entry["tipp_score6"] }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($entry["joker3"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
<td class="table-bordered" align="center" style="{{$entry["trendCol4"]}}">&nbsp;{{$entry["tipp_score7"] }}&nbsp;</td>
<td class="table-bordered" align="center" style="{{$entry["trendCol4"]}}">&nbsp;{{$entry["tipp_score8"] }}&nbsp;</td>
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($entry["joker4"] ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
</tr>
@endforeach