Skip to content

Commit

Permalink
Update pokemon.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kamieniarz authored Oct 26, 2023
1 parent 3e9ecfd commit e178239
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion pages/display/pokemon.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,29 @@ class="list-group-item d-flex justify-content-between align-items-center">
?>
</span>
</li>
<?php }
<?php } else
if ($row['max_size'] > $row['size'] && $row['size'] != -1) {
?>
<li
class="list-group-item d-flex justify-content-between align-items-center">
<?php echo i8ln("SIZE"); ?>
<span class="badge badge-primary badge-pill">
<?php
$size_mapping = [
'1' => i8ln("XXS"),
'2' => i8ln("XS"),
'3' => i8ln("M"),
'4' => i8ln("XL"),
'5' => i8ln("XXL")
];
$display_size = isset($size_mapping[$row['size']]) ? $size_mapping[$row['size']] : $row['size'];
$display_max_size = isset($size_mapping[$row['max_size']]) ? $size_mapping[$row['max_size']] : $row['max_size'];
echo $display_size . '-' . $display_max_size;
?>
</span>
</li>
<?php
}

if ($row['ping'] <> '') {
?>
Expand Down

0 comments on commit e178239

Please sign in to comment.