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

Factions

{!! 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() !!}
{!! $factions->render() !!}
@foreach ($factions as $faction)
@isset($faction->thumb_extension) @endisset

{!! $faction->fullDisplayName !!}

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

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

@if (($user_enabled && $faction->is_user_faction) || ($ch_enabled && $faction->is_character_faction))

Can be joined by {!! $faction->is_character_faction && $faction->is_user_faction ? 'both' : '' !!} {!! $user_enabled && $faction->is_user_faction ? 'users' : '' !!}{!! $faction->is_character_faction && $faction->is_user_faction ? ' and' : '' !!}{!! !$faction->is_character_faction && $faction->is_user_faction ? '.' : '' !!} {!! $ch_enabled && $faction->is_character_faction ? 'characters.' : '' !!}

@endif @if (count($faction->children))
Contains the following: @foreach ($faction->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($faction->summary)

{!! $faction->summary !!}

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