Skip to content

Commit

Permalink
feat: allow null in character and corporation partials (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
recursivetree authored Oct 29, 2022
1 parent 31e503b commit b3b76f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/resources/views/partials/character.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@if ($character->name && $character->name !== trans('web::seat.unknown'))
@if($character === null)
{!! img('characters', 'portrait', null, 32, ['class' => 'img-circle eve-icon small-icon'], false) !!}
<span>{{ trans('web::seat.unknown') }}</span>
@elseif ($character->name && $character->name !== trans('web::seat.unknown'))
@if(\Seat\Eveapi\Models\Character\CharacterInfo::find($character->character_id ?? $character->entity_id))
<a href="{{ route('character.view.default', ['character' => $character->character_id ?? $character->entity_id]) }}">
{!! img('characters', 'portrait', $character->character_id ?? $character->entity_id, 32, ['class' => 'img-circle eve-icon small-icon'], false) !!}
Expand Down
5 changes: 4 additions & 1 deletion src/resources/views/partials/corporation.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@if ($corporation->name && $corporation->name !== trans('web::seat.unknown'))
@if($corporation===null)
{!! img('corporations', 'logo', null, 32, ['class' => 'img-circle eve-icon small-icon'], false) !!}
<span>{{ trans('web::seat.unknown') }}</span>
@elseif ($corporation->name && $corporation->name !== trans('web::seat.unknown'))
@if(\Seat\Eveapi\Models\Corporation\CorporationInfo::find($corporation->corporation_id ?? $corporation->entity_id))
<a href="{{ route('corporation.view.default', ['corporation' => $corporation->corporation_id ?? $corporation->entity_id]) }}">
{!! img('corporations', 'logo', $corporation->corporation_id ?? $corporation->entity_id, 32, ['class' => 'img-circle eve-icon small-icon'], false) !!}
Expand Down

0 comments on commit b3b76f9

Please sign in to comment.