Hide empty shop tables.

This commit is contained in:
Znote 2017-10-15 15:40:27 +02:00
parent c110edf41b
commit c5decc03d1

View File

@ -133,11 +133,11 @@ foreach ($shop_list as $key => $offer) {
?>
<div id="categoryNavigator">
<a class="nav_link" href="#all">ALL</a>
<a class="nav_link" href="#cat_itemids">ITEMS</a>
<a class="nav_link" href="#cat_premium">PREMIUM</a>
<a class="nav_link" href="#cat_outfits">OUTFITS</a>
<a class="nav_link" href="#cat_mounts">MOUNTS</a>
<a class="nav_link" href="#cat_misc">MISC</a>
<?php if (!empty($category_items)): ?><a class="nav_link" href="#cat_itemids">ITEMS</a><?php endif; ?>
<?php if (!empty($category_premium)): ?><a class="nav_link" href="#cat_premium">PREMIUM</a><?php endif; ?>
<?php if (!empty($category_outfits)): ?><a class="nav_link" href="#cat_outfits">OUTFITS</a><?php endif; ?>
<?php if (!empty($category_mounts)): ?><a class="nav_link" href="#cat_mounts">MOUNTS</a><?php endif; ?>
<?php if (!empty($category_misc)): ?><a class="nav_link" href="#cat_misc">MISC</a><?php endif; ?>
</div>
<script type="text/javascript">
function domReady () {
@ -198,6 +198,7 @@ foreach ($shop_list as $key => $offer) {
}
</script>
<?php if (!empty($category_items)): ?>
<!-- ITEMIDS -->
<table class="show" id="cat_itemids">
<tr class="yellow">
@ -227,6 +228,8 @@ foreach ($shop_list as $key => $offer) {
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php if (!empty($category_premium)): ?>
<!-- PREMIUM DURATION -->
<table class="show" id="cat_premium">
<tr class="yellow">
@ -256,6 +259,8 @@ foreach ($shop_list as $key => $offer) {
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php if (!empty($category_outfits)): ?>
<!-- OUTFITS -->
<table class="show" id="cat_outfits">
<tr class="yellow">
@ -283,6 +288,8 @@ foreach ($shop_list as $key => $offer) {
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php if (!empty($category_mounts)): ?>
<!-- MOUNTS -->
<table class="show" id="cat_mounts">
<tr class="yellow">
@ -310,6 +317,8 @@ foreach ($shop_list as $key => $offer) {
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php if (!empty($category_misc)): ?>
<!-- MISCELLANEOUS -->
<table class="show" id="cat_misc">
<tr class="yellow">
@ -343,6 +352,7 @@ foreach ($shop_list as $key => $offer) {
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<?php if ($shop['enableShopConfirmation']) { ?>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>