Skip to content

Commit

Permalink
Display Max Size if <> Size
Browse files Browse the repository at this point in the history
  • Loading branch information
bbdoc committed Oct 27, 2023
1 parent a2fdade commit 1f2d31f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
12 changes: 12 additions & 0 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,18 @@ function get_lure_name($id) {

}

function get_size_name($id) {

if ($id == '1') { $size_name = "XXS"; }
else if ($id == '2') { $size_name = "XS"; }
else if ($id == '3') { $size_name = "M"; }
else if ($id == '4') { $size_name = "L"; }

This comment has been minimized.

Copy link
@kamieniarz

kamieniarz Oct 27, 2023

Contributor

4 should be XL, 5 XXL

else if ($id == '5') { $size_name = "XL"; }

return $size_name;

}

function get_gym_name($id) {

if ( $id == "0") {
Expand Down
12 changes: 7 additions & 5 deletions pages/display/pokemon.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,13 @@ class="list-group-item d-flex justify-content-between align-items-center">
<?php echo i8ln("SIZE"); ?>
<span class="badge badge-primary badge-pill">
<?php
if ($row['size'] == '1') { echo i8ln("XXS"); }
if ($row['size'] == '2') { echo i8ln("XS"); }
if ($row['size'] == '3') { echo i8ln("M"); }
if ($row['size'] == '4') { echo i8ln("XL"); }
if ($row['size'] == '5') { echo i8ln("XXL"); }
$size_name=get_size_name($row['size']);
echo $size_name;
if ( $row['max_size'] <> $row['size'] )
{
$max_size_name=get_size_name($row['max_size']);
echo "-".$max_size_name;
}
?>
</span>
</li>
Expand Down

0 comments on commit 1f2d31f

Please sign in to comment.