Model refactoring, reducing number of static methods
This commit is contained in:
parent
92a07b1684
commit
bc5ec5edce
7 changed files with 145 additions and 48 deletions
|
|
@ -43,7 +43,17 @@
|
|||
<table>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Spieler</span>
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;width:50px;">Rang</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;width:50px;">Tagessieg</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;width:150px;">Spieler</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
|
|
@ -58,57 +68,112 @@
|
|||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Spiel 1 - Heim-Mannschaft</span>
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{$games[0]->team1}}</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Spiel 1 - Gast-Mannschaft</span>
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{$games[0]->team2}}</span>
|
||||
</div>
|
||||
</th>
|
||||
<tr class="table-bordered">
|
||||
<td class="table-bordered" align="center" style="width:25px;">#</td>
|
||||
<td class="table-bordered" align="center" style="width:200px;">Name</td>
|
||||
<td class="table-bordered" align="center"> Total </td>
|
||||
<td class="table-bordered" align="center"> Tag </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;"> {{$games[0]->team1}} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;"> {{$games[0]->team2}} </td>
|
||||
<td class="table-bordered" align="center"> Joker </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;"> {{$games[1]->team1}} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;"> {{$games[1]->team2}} </td>
|
||||
<td class="table-bordered" align="center"> Joker </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;"> {{$games[2]->team1}} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;"> {{$games[2]->team2}} </td>
|
||||
<td class="table-bordered" align="center"> Joker </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;"> {{$games[3]->team1}} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;"> {{$games[3]->team2}} </td>
|
||||
<td class="table-bordered" align="center"> Joker </td>
|
||||
</tr>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Joker</span>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{$games[1]->team1}}</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{$games[1]->team2}}</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Joker</span>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{$games[2]->team1}}</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{$games[2]->team2}}</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Joker</span>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{$games[3]->team1}}</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">{{$games[3]->team2}}</span>
|
||||
</div>
|
||||
</th>
|
||||
<th style="height:140px;white-space: nowrap;">
|
||||
<div style="transform:translate(25px, 51px) rotate(315deg);width:30px;">
|
||||
<span style="border-bottom: 1px solid #ccc; padding: 5px 10px;">Joker</span>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
@foreach($users as $user)
|
||||
@if (App\User::is_season_paid($user->id)=="Ja")
|
||||
<tr>
|
||||
<td class="table-bordered"> <span class="text list-unstyled" href="#" style="width:25px;"> {{ $user->rank }} </span></td>
|
||||
<td class="table-bordered"> <a class="text list-unstyled" href="#" style="width:350px;vertical-align: middle;">{{ $user->fullname }} </a></td>
|
||||
<td class="table-bordered"> <span class="text list-unstyled" href="#" > {{ $user->rank }} </span></td>
|
||||
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/crown.png" style="{{ (1==1 ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
|
||||
<td class="table-bordered"> <a class="text list-unstyled" href="#" style="vertical-align: middle;">{{ $user->fullname }} </a></td>
|
||||
<td class="table-bordered" align="center"> {{ $user->totalScore }} </td>
|
||||
|
||||
<td class="table-bordered" align="center"> {{ $user->dayScore }} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;{{App\Tipp::getCol($user->id,$games[0]->id)}}"> {{ $tippDisplay[$user->id][$games[0]->id][0] }} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;{{App\Tipp::getCol($user->id,$games[0]->id)}}"> {{ $tippDisplay[$user->id][$games[0]->id][1] }} </td>
|
||||
<td class="table-bordered"><img src="/img/joker.png" style="{{ ($tippDisplay[$user->id][$games[0]->id][2]==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></td>
|
||||
<td class="table-bordered" align="center" style="width:150px;{{App\Tipp::getCol($user->id,$games[1]->id)}}"> {{$tippDisplay[$user->id][$games[1]->id][0] }} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;{{App\Tipp::getCol($user->id,$games[1]->id)}}"> {{$tippDisplay[$user->id][$games[1]->id][1] }} </td>
|
||||
<td class="table-bordered"><img src="/img/joker.png" style="{{ ($tippDisplay[$user->id][$games[1]->id][2]==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></td>
|
||||
<td class="table-bordered" align="center" style="width:150px;{{App\Tipp::getCol($user->id,$games[2]->id)}}"> {{$tippDisplay[$user->id][$games[2]->id][0] }} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;{{App\Tipp::getCol($user->id,$games[2]->id)}}"> {{$tippDisplay[$user->id][$games[2]->id][1] }} </td>
|
||||
<td class="table-bordered"><img src="/img/joker.png" style="{{ ($tippDisplay[$user->id][$games[2]->id][2]==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></td>
|
||||
<td class="table-bordered" align="center" style="width:150px;{{App\Tipp::getCol($user->id,$games[3]->id)}}"> {{$tippDisplay[$user->id][$games[3]->id][0] }} </td>
|
||||
<td class="table-bordered" align="center" style="width:150px;{{App\Tipp::getCol($user->id,$games[3]->id)}}"> {{$tippDisplay[$user->id][$games[3]->id][1] }} </td>
|
||||
<td class="table-bordered"><img src="/img/joker.png" style="{{ ($tippDisplay[$user->id][$games[3]->id][2]==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></td>
|
||||
<td class="table-bordered" align="center" style="{{App\Tipp::getCol($user->id,$games[0]->id)}}"> {{ $tippDisplay[$user->id][$games[0]->id][0] }} </td>
|
||||
<td class="table-bordered" align="center" style="{{App\Tipp::getCol($user->id,$games[0]->id)}}"> {{ $tippDisplay[$user->id][$games[0]->id][1] }} </td>
|
||||
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($tippDisplay[$user->id][$games[0]->id][2]==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
|
||||
<td class="table-bordered" align="center" style="{{App\Tipp::getCol($user->id,$games[1]->id)}}"> {{$tippDisplay[$user->id][$games[1]->id][0] }} </td>
|
||||
<td class="table-bordered" align="center" style="{{App\Tipp::getCol($user->id,$games[1]->id)}}"> {{$tippDisplay[$user->id][$games[1]->id][1] }} </td>
|
||||
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($tippDisplay[$user->id][$games[1]->id][2]==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
|
||||
<td class="table-bordered" align="center" style="{{App\Tipp::getCol($user->id,$games[2]->id)}}"> {{$tippDisplay[$user->id][$games[2]->id][0] }} </td>
|
||||
<td class="table-bordered" align="center" style="{{App\Tipp::getCol($user->id,$games[2]->id)}}"> {{$tippDisplay[$user->id][$games[2]->id][1] }} </td>
|
||||
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($tippDisplay[$user->id][$games[2]->id][2]==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
|
||||
<td class="table-bordered" align="center" style="{{App\Tipp::getCol($user->id,$games[3]->id)}}"> {{$tippDisplay[$user->id][$games[3]->id][0] }} </td>
|
||||
<td class="table-bordered" align="center" style="{{App\Tipp::getCol($user->id,$games[3]->id)}}"> {{$tippDisplay[$user->id][$games[3]->id][1] }} </td>
|
||||
<td class="table-bordered"><div style="margin: 0 auto; width: 32px;"><img src="/img/joker.png" style="{{ ($tippDisplay[$user->id][$games[3]->id][2]==true ? 'float:left;width:32px;height:32px' : 'display: none;') }}"></div></td>
|
||||
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
<!-- Control Cell width -->
|
||||
<tr>
|
||||
<td> <div></div></td>
|
||||
<td> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
<td style="width:50px;"> <div></div></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue