forked from metin2/web
Localized ranking and modified controllers to read data from cache tables.
This commit is contained in:
@ -6,143 +6,132 @@
|
||||
<div class="content content-last">
|
||||
<div class="content-bg">
|
||||
<div class="content-bg-bottom">
|
||||
<h2>Metin2 - Listarea rangurilor</h2>
|
||||
<h2>{{ __('app/highscore.title') }}</h2>
|
||||
<div class="ranks-inner-content"><br/>
|
||||
<div class="ranks-dropdowns-box">
|
||||
<form action="{{ url('main/highscore') }}" name="highscoreform" method="post">
|
||||
<form action="{{ url('main/highscore') }}" name="highscore-form" method="post">
|
||||
@csrf
|
||||
|
||||
{{-- Temporarily disabled until multi-server support is implemented; added empire choice instead
|
||||
<div class="ranks-select-box">
|
||||
<label>Server:</label>
|
||||
<select name="serverchoice">
|
||||
<option value="1" selected="selected">Server name 1</option>
|
||||
<option value="2">Server name 2</option>
|
||||
<option value="3">Server name 3</option>
|
||||
</select>
|
||||
</div>
|
||||
--}}
|
||||
|
||||
<div class="ranks-select-box">
|
||||
<label>Server:</label>
|
||||
<select name="serverchoice">
|
||||
<option value="1" selected="selected">Leonis</option>
|
||||
<option value="2">Virgo</option>
|
||||
<option value="3">Pegasus</option>
|
||||
<option value="4">Sagitta</option>
|
||||
<option value="5">Corvus</option>
|
||||
<option value="6">Taurus</option>
|
||||
<option value="7">Hydra</option>
|
||||
<option value="8">Aries</option>
|
||||
<option value="9">Gemini</option>
|
||||
<option value="10">Lupus</option>
|
||||
<option value="11">Draco</option>
|
||||
<option value="12">Volans</option>
|
||||
<option value="13">Trianguli</option>
|
||||
<label>{{ __('app/highscore.search.select-empire') }}</label>
|
||||
<select name="empire-choice">
|
||||
<option value="-1">{{ __('app/highscore.search.all-empires') }}</option>
|
||||
@foreach (\App\Models\Enums\EmpireEnum::cases() as $empire)
|
||||
<option value="{{ $empire->value }}" @selected($empireChoice === $empire->value)>
|
||||
{{ $empire->name() }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="ranks-select-box">
|
||||
<label>Arata categoriile:</label>
|
||||
<select name="classchoice">
|
||||
<option value="-1" selected="selected">[all classes]</option>
|
||||
<option value="0">Războinic</option>
|
||||
<option value="1">Ninja</option>
|
||||
<option value="2">Sura</option>
|
||||
<option value="3">Şaman</option>
|
||||
<label>{{ __('app/highscore.search.select-class') }}</label>
|
||||
<select name="class-choice">
|
||||
<option value="-1">{{ __('app/highscore.search.all-classes') }}</option>
|
||||
@foreach (\App\Models\Enums\CharacterClassEnum::cases() as $class)
|
||||
<option value="{{ $class->value }}" @selected($classChoice === $class->value)>
|
||||
{{ $class->name() }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="ranks-select-box">
|
||||
<label>Alege caracterul:</label>
|
||||
<label>{{ __('app/highscore.search.find-character') }}</label>
|
||||
<div class="ranks-input">
|
||||
<input type="text" value="" name="characterchoice"/>
|
||||
<input type="text" value="{{ $characterChoice ?? '' }}" name="character-choice"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ranks-select-box-btn">
|
||||
<a class="small-btn" href="#" onclick="document.forms['highscoreform'].submit();return false;">Căutare</a>
|
||||
<a class="small-btn" href="#" onclick="document.forms['highscore-form'].submit();return false;">
|
||||
{{ __('app/highscore.search') }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="clearfloat"></div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="ranks-nav prev prev-top"><a href="https://web.archive.org/web/20130715184054/http://www.metin2.ro/main/guildhighscore/1/-1/1/"><< anterioarele 10 ranguri</a></div>
|
||||
|
||||
<div class="ranks-nav next next-top"><a href="https://web.archive.org/web/20130708165425/http://www.metin2.ro/main/highscore/1/-1/11/">urmatoarele 10 ranguri >></a></div>
|
||||
<br class="clearfloat"/>
|
||||
<table border="0" style="table-layout:fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rank-th-1">Rang</th>
|
||||
<th class="rank-th-2">Numele Caracterului</th>
|
||||
<th class="rank-th-3">Regat</th>
|
||||
<th class="rank-th-4">Nivel</th>
|
||||
<th class="rank-th-5">EXP</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="rankfirst">
|
||||
<td class="rank-td-1-1">1</td>
|
||||
<td class="rank-td-1-2">picyu3</td>
|
||||
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
|
||||
<td class="rank-td-1-4">105</td>
|
||||
<td class="rank-td-1-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-2-1">2</td>
|
||||
<td class="rank-td-2-2">XXXMEN77</td>
|
||||
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn13/7211083d422c5dc6c70b198e850004.png" width="34" alt="Imperiul Shinsoo" title="Imperiul Shinsoo"/></td>
|
||||
<td class="rank-td-2-4">105</td>
|
||||
<td class="rank-td-2-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-1-1">3</td>
|
||||
<td class="rank-td-1-2">Spydy</td>
|
||||
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn13/7211083d422c5dc6c70b198e850004.png" width="34" alt="Imperiul Shinsoo" title="Imperiul Shinsoo"/></td>
|
||||
<td class="rank-td-1-4">105</td>
|
||||
<td class="rank-td-1-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-2-1">4</td>
|
||||
<td class="rank-td-2-2">beLeSe</td>
|
||||
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
|
||||
<td class="rank-td-2-4">105</td>
|
||||
<td class="rank-td-2-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-1-1">5</td>
|
||||
<td class="rank-td-1-2">alexdenis</td>
|
||||
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
|
||||
<td class="rank-td-1-4">105</td>
|
||||
<td class="rank-td-1-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-2-1">6</td>
|
||||
<td class="rank-td-2-2">addygryg</td>
|
||||
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
|
||||
<td class="rank-td-2-4">105</td>
|
||||
<td class="rank-td-2-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-1-1">7</td>
|
||||
<td class="rank-td-1-2">Pixie03</td>
|
||||
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
|
||||
<td class="rank-td-1-4">105</td>
|
||||
<td class="rank-td-1-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-2-1">8</td>
|
||||
<td class="rank-td-2-2">KingARAGORN</td>
|
||||
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn17/202178f2cf7a2e45f4be61bb360228.png" width="34" alt="Imperiul Jinno" title="Imperiul Jinno"/></td>
|
||||
<td class="rank-td-2-4">105</td>
|
||||
<td class="rank-td-2-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-1-1">9</td>
|
||||
<td class="rank-td-1-2">pauldpv2001</td>
|
||||
<td class="rank-td-1-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf3.geo.gfsrv.net/cdnbe/2bb161df7f13e26bd0545acc5967b2.png" width="34" alt="Imperiul Chunjo" title="Imperiul Chunjo"/></td>
|
||||
<td class="rank-td-1-4">105</td>
|
||||
<td class="rank-td-1-5">0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="rank-td-2-1">10</td>
|
||||
<td class="rank-td-2-2">SCORPIO1</td>
|
||||
<td class="rank-td-2-3"><img src="https://web.archive.org/web/20130708165425im_/http://gf2.geo.gfsrv.net/cdn13/7211083d422c5dc6c70b198e850004.png" width="34" alt="Imperiul Shinsoo" title="Imperiul Shinsoo"/></td>
|
||||
<td class="rank-td-2-4">105</td>
|
||||
<td class="rank-td-2-5">0</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="ranks-nav prev"><a href="https://web.archive.org/web/20130715184054/http://www.metin2.ro/main/guildhighscore/1/-1/1/"><< anterioarele 10 ranguri</a></div>
|
||||
@if ($highscore->isEmpty())
|
||||
<div class="error-mini error-mini-margin error-mini-maxwidth">{{ __("app/highscore.no-results") }}</div>
|
||||
@else
|
||||
@if ($highscore->lastPage() > 1)
|
||||
<div class="ranks-nav prev prev-top">
|
||||
@if ($highscore->currentPage() > 1)
|
||||
<a href="{{ route('highscore-page', ['empireChoice' => $empireChoice, 'classChoice' => $classChoice, 'page' => $highscore->currentPage() - 1, 'character-choice' => $characterChoice ?? null]) }}"><< {{ __("app/highscore.pagination.prev", ['count' => $highscore->perPage()]) }}</a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="ranks-nav next next-top">
|
||||
@if ($highscore->hasMorePages())
|
||||
<a href="{{ route('highscore-page', ['empireChoice' => $empireChoice, 'classChoice' => $classChoice, 'page' => $highscore->currentPage() + 1, 'character-choice' => $characterChoice ?? null]) }}">{{ __("app/highscore.pagination.next", ['count' => $highscore->perPage()]) }} >></a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="ranks-nav next"><a href="https://web.archive.org/web/20130708165425/http://www.metin2.ro/main/highscore/1/-1/11/">urmatoarele 10 ranguri >></a></div>
|
||||
<br class="clearfloat"/>
|
||||
<table border="0" style="table-layout:fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rank-th-1">{{ __("app/highscore.header.rank") }}</th>
|
||||
<th class="rank-th-2">{{ __("app/highscore.header.character-name") }}</th>
|
||||
<th class="rank-th-3">{{ __("app/highscore.header.empire") }}</th>
|
||||
<th class="rank-th-4">{{ __("app/highscore.header.level") }}</th>
|
||||
<th class="rank-th-5">{{ __("app/highscore.header.exp") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($highscore as $entry)
|
||||
<tr @class(["rankfirst" => $entry->id == 1, "zebra" => $loop->odd])>
|
||||
<td @class(["rank-td-1-1" => $loop->odd, "rank-td-2-1" => $loop->even])>
|
||||
{{ $entry->id }}
|
||||
</td>
|
||||
<td @class(["rank-td-1-2" => $loop->odd, "rank-td-2-2" => $loop->even])>
|
||||
{{ $entry->name }}
|
||||
</td>
|
||||
<td @class(["rank-td-1-3" => $loop->odd, "rank-td-2-3" => $loop->even])>
|
||||
@if ($entry->empire == \App\Models\Enums\EmpireEnum::SHINSOO)
|
||||
<img src="{{ asset("assets/main/img/empire1.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
|
||||
@elseif ($entry->empire == \App\Models\Enums\EmpireEnum::CHUNJO)
|
||||
<img src="{{ asset("assets/main/img/empire2.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
|
||||
@elseif ($entry->empire == \App\Models\Enums\EmpireEnum::JINNO)
|
||||
<img src="{{ asset("assets/main/img/empire3.png") }}" width="34" alt="{{ $entry->empire->longName() }}" title="{{ $entry->empire->longName() }}" />
|
||||
@endif
|
||||
</td>
|
||||
<td @class(["rank-td-1-4" => $loop->odd, "rank-td-2-4" => $loop->even])>
|
||||
{{ $entry->level }}
|
||||
</td>
|
||||
<td @class(["rank-td-1-5" => $loop->odd, "rank-td-2-5" => $loop->even])>
|
||||
{{ $entry->exp }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="clearfloat"></div>
|
||||
<div class="ranks-update-time">Update: 08.07.2013 14:57:16</div>
|
||||
@if ($highscore->lastPage() > 1)
|
||||
<div class="ranks-nav prev">
|
||||
@if ($highscore->currentPage() > 1)
|
||||
<a href="{{ route('highscore-page', ['empireChoice' => $empireChoice, 'classChoice' => $classChoice, 'page' => $highscore->currentPage() - 1, 'character-choice' => $characterChoice ?? null]) }}"><< {{ __("app/highscore.pagination.prev", ['count' => $highscore->perPage()]) }}</a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="ranks-nav next">
|
||||
@if ($highscore->hasMorePages())
|
||||
<a href="{{ route('highscore-page', ['empireChoice' => $empireChoice, 'classChoice' => $classChoice, 'page' => $highscore->currentPage() + 1, 'character-choice' => $characterChoice ?? null]) }}">{{ __("app/highscore.pagination.next", ['count' => $highscore->perPage()]) }} >></a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="clearfloat"></div>
|
||||
<div class="ranks-update-time">{{ __('app/highscore.update-time') }} {{ $highscore->max('date')->translatedFormat('d F Y H:i:s') }}</div>
|
||||
@endif
|
||||
<div class="box-foot"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -150,9 +139,4 @@
|
||||
</div>
|
||||
<div class="shadow"> </div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#highscore table tr:odd').addClass('zebra');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
Reference in New Issue
Block a user