Files
aowow/template/bricks/rewards.tpl.php
Sarjuuk e943e27b5b Template/Update (Part 1)
* update TrinityCore components to return new Frontend objects
   - SmartAI => Markup
   - Conditions => Data Listview
  * update template files to accept the new Frontend objects
2025-09-25 15:32:59 +02:00

39 lines
975 B
PHP

<?php
namespace Aowow\Template;
$offset ??= 0; // in case we have multiple icons on the page (prominently quest-rewards)
if ($rewTitle):
echo $rewTitle.' '.($extra ?? '')."\n";
endif;
if ($rewards):
?>
<div class="pad"></div>
<table class="icontab icontab-box">
<tr>
<?php
$last = array_key_last($rewards);
foreach ($rewards as $k => $icon):
echo $icon->renderContainer(24, $offset);
echo $k % 2 && $k != $last ? str_repeat(' ', 24) . "</tr><tr>" : '';
endforeach;
if (count($rewards) % 2):
echo '<th style="display: none"></th><td style="display: none"></td>';
endif;
?>
</tr>
</table>
<script type="text/javascript">//<![CDATA[
<?php
foreach ($rewards as $icon):
echo $icon->renderJS(20);
endforeach;
?>
//]]></script>
<?php
endif;
?>