@extends('worldexpansion.layout') @section('title') {{ $faction->name }} @endsection @section('content') @if (Auth::check() && Auth::user()->hasPower('manage_world')) @endif {!! breadcrumbs(['World' => 'world', 'Factions' => 'world/factions', $faction->style => 'world/factions/' . $faction->id]) !!}

{!! $faction->style !!}

{!! 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 ($faction->image_extension)
@endif @isset($faction->summary)
{!! $faction->summary !!}
@endisset @isset($faction->parsed_description)
{!! $faction->parsed_description !!}
@endisset
@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 @if (count($faction->members))
Member Figure{{ count($faction->members) == 1 ? '' : 's' }}

@foreach ($faction->members->groupBy('category_id') as $key => $members)

{{ $figure_categories->find($key) ? $figure_categories->find($key)->name : 'Miscellanous' }}: @foreach ($members as $key => $member) {!! $member->displayName !!} @if ($key != count($members) - 1 && count($members) > 2) , @endif @if ($key == count($members) - 2) and @endif @endforeach

@endforeach
@endif @if ($faction->ranks()->count())
Faction Ranks

@if ($faction->ranks()->where('is_open', 0)->count())

Leadership

@foreach ($faction->ranks()->where('is_open', 0)->orderBy('sort')->get() as $rank)
{{ $rank->name }}{{ $rank->description ? ': ' . $rank->description : '' }}
@if ($rank->members()->count())

@foreach ($rank->members as $member) {!! $member->memberObject->displayName !!}{{ !$loop->last ? ',' : '' }} @endforeach

@endif @endforeach
@endif @if ($faction->ranks()->where('is_open', 1)->count())

Member Ranks

@foreach ($faction->ranks()->where('is_open', 1)->orderBy('sort')->get() as $rank)
{{ $rank->name }}{{ $rank->description ? ': ' . $rank->description : '' }}{!! $currency ? ' (' . $currency->display($rank->breakpoint) . ')' : ' (' . $rank->breakpoint . ' Standing)' !!}
@endforeach
@endif

Members: {{ $faction->factionMembers->count() }} ・ See All

@endif
@if (count(allAttachments($faction))) @foreach (allAttachments($faction) as $type => $attachments)
Associated {{ $type }}{{ count($attachments) == 1 ? '' : 's' }}
@foreach ($attachments as $attachment)

{!! $attachment->displayName !!}

@endforeach
@endforeach @endif
@endsection