@if($edit)
    <div class="mceNonEditable component-container" data-component-key="allChildren">
<a href="#" class="btn btn-danger pull-right delete-component">X</a>
        <h4>@lang('hilco::app.container_children')</h4>
    </div>
@endif

@if($script)
    <script type="text/javascript">
        registerComponent('allChildren', {
            menuText: '@lang('hilco::app.children')',
            bladeTemplate: 'hilco::components.allChildren',
            init: function (body) {

            },
            serialize: function (componentNode) {
                return {};
            },
        });
    </script>
@endif

@if($view)
    @if(isset($lpModel) && $lpModel->children->count())
    <div class="row row-centered">
        @foreach($lpModel->children as $child)
            <div class="col-sm-4 col-lg-3 col-centered">
                <a href="{{$child->slugUrl()}}" class="thumbnail">
                    <div class="image" style="min-height: 100px; padding-top: 15px">
                        <img src="{{ $child->primaryImage(325, 125) }}" class="img img-responsive center-block" style="max-height: 150px">
                    </div>
                    <div class="caption text-center">
                        <h4>{{ $child->name }}</h4>
                    </div>
                </a>
            </div>
        @endforeach
    </div>
    @endif
@endif
