1
0
Fork 0

resources/views/character/profession/show.blade.php: show links with wowhead power instead of external link icon.

This commit is contained in:
Henrik Hautakoski 2021-07-09 11:43:29 +02:00
parent d349023310
commit 3085de6334

View file

@ -35,13 +35,17 @@
</h2>
<ul class="ml-2 space-y-2" x-show="open" x-transition>
@foreach($recipes as $recipe)
<li class="flex">
<x-link href="{{ route('recipe.show', [ 'recipe' => $recipe ]) }}">{{ $recipe->name }}</x-link>
@if ($recipe->spell)
<x-wowhead class="h-5 w-5 ml-2" type="spell" id="{{ $recipe->spell->id }}" />
@elseif ($recipe->craft && $recipe->craft->external_id)
<x-wowhead class="h-5 w-5 ml-2" id="{{ $recipe->craft->external_id }}" />
@endif
<li>
@php
if ($recipe->spell) {
$id = $recipe->spell->id;
$type = 'spell';
} else {
$id = $recipe->craft->external_id;
$type = 'item';
}
@endphp
<x-wowhead-link :wh-id="$id" :type="$type" href="{{ route('recipe.show', [ 'recipe' => $recipe ]) }}">{{ $recipe->name }}</x-wowhead-link>
</li>
@endforeach
</ul>