From ab916bcadbce219a419f101570ff51bfbb613a1c Mon Sep 17 00:00:00 2001 From: Thomas David Baker Date: Sun, 20 Oct 2024 19:27:10 -0700 Subject: [PATCH] Pass the whole href through to CcTable It's our standard to not do URL construction from parts inside the templates. --- gatherling/Views/Components/CcTable.php | 1 + gatherling/templates/partials/ccTable.mustache | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gatherling/Views/Components/CcTable.php b/gatherling/Views/Components/CcTable.php index 13bed9d7..de6b7c5d 100644 --- a/gatherling/Views/Components/CcTable.php +++ b/gatherling/Views/Components/CcTable.php @@ -20,6 +20,7 @@ public function __construct(Deck $deck) foreach ($convertedCosts as $cost => $amt) { $this->castingCosts[] = [ 'cost' => $cost, + 'imgSrc' => "styles/images/mana{$cost}.png", 'amt' => $amt, ]; $total += $cost * $amt; diff --git a/gatherling/templates/partials/ccTable.mustache b/gatherling/templates/partials/ccTable.mustache index 6e54e30b..f1bdb737 100644 --- a/gatherling/templates/partials/ccTable.mustache +++ b/gatherling/templates/partials/ccTable.mustache @@ -5,7 +5,7 @@ {{#castingCosts}} - {{cost}} + {{cost}}   x {{amt}}