@extends('worldexpansion.layout') @section('title') Locations @endsection @section('content') {!! breadcrumbs(['World' => 'world', 'Locations' => 'world/locations']) !!}

Locations

{!! Form::open(['method' => 'GET', 'class' => '']) !!}
{!! Form::text('name', Request::get('name'), ['class' => 'form-control', 'placeholder' => 'Name']) !!}
{!! Form::select('type_id', $types, Request::get('name'), ['class' => 'form-control']) !!}
{!! Form::select( 'sort', [ 'alpha' => 'Sort Alphabetically (A-Z)', 'alpha-reverse' => 'Sort Alphabetically (Z-A)', 'type' => 'Sort by Type', 'newest' => 'Newest First', 'oldest' => 'Oldest First', ], Request::get('sort') ?: 'type', ['class' => 'form-control'], ) !!}
{!! Form::submit('Search', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
{!! $locations->render() !!}
@foreach ($locations as $location)
@isset($location->thumb_extension) @endisset

{!! $location->fullDisplayName !!}

{!! $location->category ? $location->category->displayName : '' !!}

{!! $location->type ? ucfirst($location->type->displayName) : '' !!} {!! $location->parent ? 'inside ' . $location->parent->displayName : '' !!}

@if (($user_enabled && $location->is_user_home) || ($ch_enabled && $location->is_character_home))

Can be home to {!! $location->is_character_home && $location->is_user_home ? 'both' : '' !!} {!! $user_enabled && $location->is_user_home ? 'users' : '' !!}{!! $location->is_character_home && $location->is_user_home ? ' and' : '' !!}{!! !$location->is_character_home && $location->is_user_home ? '.' : '' !!} {!! $ch_enabled && $location->is_character_home ? 'characters.' : '' !!}

@endif @if (count($location->children))
Contains the following: @foreach ($location->children->groupBy('type_id') as $group => $children)

@if (count($children) == 1) {{ $loctypes->find($group)->name }}@else{{ $loctypes->find($group)->names }} @endif: @foreach ($children as $key => $child) {!! $child->fullDisplayName !!}@if ($key != count($children) - 1) , @endif @endforeach @endforeach

@endif
@isset($location->summary)

{!! $location->summary !!}

@endisset @if (count(allAttachments($location))) @endif
@endforeach
{!! $locations->render() !!}
{{ $locations->total() }} result{{ $locations->total() == 1 ? '' : 's' }} found.
@endsection