diff --git a/resources/views/admin/sales/_character_select_entry.blade.php b/resources/views/admin/sales/_character_select_entry.blade.php index 91649be061..2a629dda5e 100644 --- a/resources/views/admin/sales/_character_select_entry.blade.php +++ b/resources/views/admin/sales/_character_select_entry.blade.php @@ -87,11 +87,11 @@ @if ($sales->characters->count() > 1)
- {!! Form::checkbox('character_is_open[' . $character->character->slug . ']', 1, $character->is_open, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} + {!! Form::checkbox('character_is_open[' . ($$character->character->slug ?? 'character-not-found') . ']', 1, $character->is_open, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} {!! Form::label('character_is_open', 'Is Open', ['class' => 'form-check-label ml-3']) !!} {!! add_help('Whether or not this particular character is open or available. If the sale post itself is closed, all character sales attached will also be displayed as closed.') !!}
@else - {!! Form::hidden('character_is_open[' . $character->character->slug . ']', 1) !!} + {!! Form::hidden('character_is_open[' . ($character->character->slug ?? 'character-not-found') . ']', 1) !!} @endif {!! Form::hidden('new_entry[]', 0) !!} diff --git a/resources/views/sales/_character.blade.php b/resources/views/sales/_character.blade.php index cfa4b5fd49..ec4922b505 100644 --- a/resources/views/sales/_character.blade.php +++ b/resources/views/sales/_character.blade.php @@ -1,104 +1,123 @@
-
- {{ $character->fullName }} -
-
-
-
- {{ $character->displayType }}: {!! $character->character->slug !!}[{{ $character->is_open && $character->sales->is_open ? 'Open' : 'Closed' }}]
- - {!! $character->image->species->displayName !!} ・ {!! $character->image->rarity->displayName !!}
-
-
+ @if ($character->character) +
+ {{ $character->fullName }} +
+
+
+
+ {{ $character->displayType }}: {!! $character->character->slug !!}[{{ $character->is_open && $character->sales->is_open ? 'Open' : 'Closed' }}]
+ + {!! $character->image->species->displayName !!} ・ {!! $character->image->rarity->displayName !!}
+
+
- @if ($loop->count == 1) -
- @if (Config::get('lorekeeper.extensions.traits_by_category')) -
- @php - $traitgroup = $character->image - ->features() - ->get() - ->groupBy('feature_category_id'); - @endphp - @if ($character->image->features()->count()) - @foreach ($traitgroup as $key => $group) -
- @if ($group->count() > 1) -
+ @if ($loop->count == 1) +
+ @if (Config::get('lorekeeper.extensions.traits_by_category')) +
+ @php + $traitgroup = $character->image + ->features() + ->get() + ->groupBy('feature_category_id'); + @endphp + @if ($character->image->features()->count()) + @foreach ($traitgroup as $key => $group) +
+ @if ($group->count() > 1) +
+ {!! $key ? $group->first()->feature->category->displayName : 'Miscellaneous' !!}: + @foreach ($group as $feature) + {!! $feature->feature->displayName !!}@if ($feature->data) + ({{ $feature->data }}) + @endif{{ !$loop->last ? ', ' : '' }} + @endforeach +
+ @else {!! $key ? $group->first()->feature->category->displayName : 'Miscellaneous' !!}: - @foreach ($group as $feature) - {!! $feature->feature->displayName !!}@if ($feature->data) - ({{ $feature->data }}) - @endif{{ !$loop->last ? ', ' : '' }} - @endforeach -
- @else - {!! $key ? $group->first()->feature->category->displayName : 'Miscellaneous' !!}: - {!! $group->first()->feature->displayName !!} - @if ($group->first()->data) - ({{ $group->first()->data }}) - @endif - @endif -
- @endforeach - @else -
No traits listed.
- @endif -
- @else -
- image - ->features() - ->with('feature.category') - ->get(); ?> - @if ($features->count()) - @foreach ($features as $feature) -
- @if ($feature->feature->feature_category_id) - {!! $feature->feature->category->displayName !!}: - @endif {!! $feature->feature->displayName !!} @if ($feature->data) - ({{ $feature->data }}) + {!! $group->first()->feature->displayName !!} + @if ($group->first()->data) + ({{ $group->first()->data }}) + @endif @endif -
- @endforeach - @else -
No traits listed.
- @endif -
+
+ @endforeach + @else +
No traits listed.
+ @endif +
+ @else +
+ image + ->features() + ->with('feature.category') + ->get(); ?> + @if ($features->count()) + @foreach ($features as $feature) +
+ @if ($feature->feature->feature_category_id) + {!! $feature->feature->category->displayName !!}: + @endif {!! $feature->feature->displayName !!} @if ($feature->data) + ({{ $feature->data }}) + @endif +
+ @endforeach + @else +
No traits listed.
+ @endif +
+ @endif +
+ @endif + +
+
+ Design: + @foreach ($character->image->designers as $designer) + {!! $designer->displayLink() !!}{{ !$loop->last ? ', ' : '' }} + @endforeach ・ + Art: + @foreach ($character->image->artists as $artist) + {!! $artist->displayLink() !!}{{ !$loop->last ? ', ' : '' }} + @endforeach +
+ + {!! $character->price !!} + {!! isset($character->link) || isset($character->data['end_point']) ? '
' : '' !!} + @if (isset($character->data['end_point'])) + {{ $character->data['end_point'] }} + @endif + {{ isset($character->link) && (!isset($character->sales->comments_open_at) || (Auth::check() && Auth::user()->hasPower('edit_pages')) || $character->sales->comments_open_at < Carbon\Carbon::now()) && isset($character->data['end_point']) ? ' ・ ' : '' }} + @if (isset($character->link) && (!isset($character->sales->comments_open_at) || (Auth::check() && Auth::user()->hasPower('edit_pages')) || $character->sales->comments_open_at < Carbon\Carbon::now())) + {{ $character->typeLink }} @endif -
- @endif + -
-
- Design: - @foreach ($character->image->designers as $designer) - {!! $designer->displayLink() !!}{{ !$loop->last ? ', ' : '' }} - @endforeach ・ - Art: - @foreach ($character->image->artists as $artist) - {!! $artist->displayLink() !!}{{ !$loop->last ? ', ' : '' }} - @endforeach -
+

{!! $character->description !!}

+
+
+ @else +
+
Character not found.
+
+
+
+
+ Character not found. +
- {!! $character->price !!} - {!! isset($character->link) || isset($character->data['end_point']) ? '
' : '' !!} - @if (isset($character->data['end_point'])) - {{ $character->data['end_point'] }} - @endif - {{ isset($character->link) && (!isset($character->sales->comments_open_at) || (Auth::check() && Auth::user()->hasPower('edit_pages')) || $character->sales->comments_open_at < Carbon\Carbon::now()) && isset($character->data['end_point']) ? ' ・ ' : '' }} - @if (isset($character->link) && (!isset($character->sales->comments_open_at) || (Auth::check() && Auth::user()->hasPower('edit_pages')) || $character->sales->comments_open_at < Carbon\Carbon::now())) - {{ $character->typeLink }} - @endif - +
+ If you see this text, please contact an administrator. +
-

{!! $character->description !!}

+

This should only occur if a character was deleted. This entry was likely left in error, or is currently in the process of being removed.

+
-
+ @endif