Skip to content

Commit

Permalink
Merge pull request #750 from distributive/april-fools-2023
Browse files Browse the repository at this point in the history
Late Night Hotfix
  • Loading branch information
distributive authored Apr 1, 2023
2 parents d6bbc72 + 3637639 commit 92e4e9d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
3 changes: 1 addition & 2 deletions app/Resources/views/Search/display-full.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<div class="col-sm-5" style="margin-bottom:2em">
<div class="card-image">
{% if card.imageUrl %}
<img data-src="{{ card_image_url }}{{ asset(card.large_image_path) }}" alt="{{ card.title }}" class="img-responsive lazyload card-image" style="margin:auto">
<img data-src="{{ card_image_url }}{{ asset(card.daeg_image_path) }}" alt="{{ card.title }}" class="img-responsive lazyload card-image" style="margin:auto">
{% else %}
<div class="no-image" style="margin:auto"><div class="no-image-text">No image</div></div>
{% endif %}
Expand All @@ -66,4 +66,3 @@
</div>

{% endblock %}

2 changes: 1 addition & 1 deletion app/Resources/views/Search/display-zoom.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="col-sm-4">
<div class="card-image">
{% if card.imageUrl %}
<img data-src="{{ card_image_url }}{{ asset(card.large_image_path) }}" alt="{{ card.title }}" class="img-responsive lazyload card-image" style="margin:auto">
<img data-src="{{ card_image_url }}{{ asset(card.daeg_image_path) }}" alt="{{ card.title }}" class="img-responsive lazyload card-image" style="margin:auto">
{% else %}
<div class="no-image" style="margin:auto"><div class="no-image-text">No image</div></div>
{% endif %}
Expand Down
14 changes: 11 additions & 3 deletions src/AppBundle/Entity/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -1035,29 +1035,37 @@ public function getDaegedImageCode()
*/
public function getTinyImagePath()
{
return '/tiny/' . $this->getDaegedImageCode() . '.jpg';
return '/tiny/' . $this->code . '.jpg';
}

/**
* @return string
*/
public function getSmallImagePath()
{
return '/small/' . $this->getDaegedImageCode() . '.jpg';
return '/small/' . $this->code . '.jpg';
}

/**
* @return string
*/
public function getMediumImagePath()
{
return '/medium/' . $this->getDaegedImageCode() . '.jpg';
return '/medium/' . $this->code . '.jpg';
}

/**
* @return string
*/
public function getLargeImagePath()
{
return '/large/' . $this->code . '.jpg';
}

/**
* @return string
*/
public function getDaegImagePath()
{
return '/large/' . $this->getDaegedImageCode() . '.jpg';
}
Expand Down
1 change: 1 addition & 0 deletions src/AppBundle/Service/CardsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ public function getCardInfo(Card $card, string $locale)
"small_image_path" => $card->getSmallImagePath(),
"medium_image_path" => $card->getMediumImagePath(),
"large_image_path" => $card->getLargeImagePath(),
"daeg_image_path" => $card->getDaegImagePath(),
];

// setting the card cost to X if the cost is null and the card is not of a costless type
Expand Down

0 comments on commit 92e4e9d

Please sign in to comment.