{{ __('user.father') }} |
@can ('edit', $user)
@if (request('action') == 'set_father')
{{ Form::open(['route' => ['family-actions.set-father', $user->id]]) }}
{!! FormField::select('set_father_id', $malePersonList, ['label' => false, 'value' => $user->father_id, 'placeholder' => __('app.select_from_existing_males')]) !!}
{{ Form::text('set_father', null, ['class' => 'form-control input-sm', 'placeholder' => __('app.enter_new_name')]) }}
{{ Form::submit(__('app.update'), ['class' => 'btn btn-info btn-sm', 'id' => 'set_father_button']) }}
{{ link_to_route('users.show', __('app.cancel'), [$user->id], ['class' => 'btn btn-default btn-sm']) }}
{{ Form::close() }}
@else
{{ $user->fatherLink() }}
{{ link_to_route('users.show', __('user.set_father'), [$user->id, 'action' => 'set_father'], ['class' => 'btn btn-link btn-xs']) }}
@endif
@else
{{ $user->fatherLink() }}
@endcan
|
---|---|
{{ __('user.mother') }} |
@can ('edit', $user)
@if (request('action') == 'set_mother')
{{ Form::open(['route' => ['family-actions.set-mother', $user->id]]) }}
{!! FormField::select('set_mother_id', $femalePersonList, ['label' => false, 'value' => $user->mother_id, 'placeholder' => __('app.select_from_existing_females')]) !!}
{{ Form::text('set_mother', null, ['class' => 'form-control input-sm', 'placeholder' => __('app.enter_new_name')]) }}
{{ Form::submit(__('app.update'), ['class' => 'btn btn-info btn-sm', 'id' => 'set_mother_button']) }}
{{ link_to_route('users.show', __('app.cancel'), [$user->id], ['class' => 'btn btn-default btn-sm']) }}
{{ Form::close() }}
@else
{{ $user->motherLink() }}
{{ link_to_route('users.show', __('user.set_mother'), [$user->id, 'action' => 'set_mother'], ['class' => 'btn btn-link btn-xs']) }}
@endif
@else
{{ $user->motherLink() }}
@endcan
|
{{ __('user.parent') }} |
@can ('edit', $user)
@unless (request('action') == 'set_parent')
{{ link_to_route('users.show', __('user.set_parent'), [$user->id, 'action' => 'set_parent'], ['class' => 'btn btn-link btn-xs']) }}
@endunless
@endcan
@if ($user->parent)
{{ $user->parent->husband->name }} & {{ $user->parent->wife->name }}
@endif
@can('edit', $user)
@if (request('action') == 'set_parent')
{{ Form::open(['route' => ['family-actions.set-parent', $user->id]]) }}
{!! FormField::select('set_parent_id', $allMariageList, ['label' => false, 'value' => $user->parent_id, 'placeholder' => __('app.select_from_existing_couples')]) !!}
{{ Form::submit(__('app.update'), ['class' => 'btn btn-info btn-sm', 'id' => 'set_parent_button']) }}
{{ link_to_route('users.show', __('app.cancel'), $user, ['class' => 'btn btn-default btn-sm']) }}
{{ Form::close() }}
@endif
@endcan
|
{{ __('user.wife') }} |
@can ('edit', $user)
@unless (request('action') == 'add_spouse')
{{ link_to_route('users.show', __('user.add_wife'), [$user->id, 'action' => 'add_spouse'], ['class' => 'btn btn-link btn-xs']) }}
@endunless
@endcan
@if ($user->wifes->isEmpty() == false)
{{ Form::open(['route' => ['family-actions.add-wife', $user->id]]) }}
{!! FormField::select('set_wife_id', $femalePersonList, ['label' => false, 'placeholder' => __('app.select_from_existing_females')]) !!}
@endif
@endcan
{{ Form::text('set_wife', null, ['class' => 'form-control input-sm', 'placeholder' => __('app.enter_new_name')]) }}
{{ Form::text('marriage_date', null, ['class' => 'form-control input-sm', 'placeholder' => __('couple.marriage_date')]) }}
|
{{ __('user.husband') }} |
@can ('edit', $user)
@unless (request('action') == 'add_spouse')
{{ link_to_route('users.show', __('user.add_husband'), [$user->id, 'action' => 'add_spouse'], ['class' => 'btn btn-link btn-xs']) }}
@endunless
@endcan
@if ($user->husbands->isEmpty() == false)
{{ Form::open(['route' => ['family-actions.add-husband', $user->id]]) }}
{!! FormField::select('set_husband_id', $malePersonList, ['label' => false, 'placeholder' => __('app.select_from_existing_males')]) !!}
@endif
@endcan
{{ Form::text('set_husband', null, ['class' => 'form-control input-sm', 'placeholder' => __('app.enter_new_name')]) }}
{{ Form::text('marriage_date', null, ['class' => 'form-control input-sm', 'placeholder' => __('couple.marriage_date')]) }}
|