{{--
* 表示画面テンプレート(カード形式)
*
* @author 永原 篤 <[email protected]>
* @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved
* @category サンプル・プラグイン
--}}
@extends('core.cms_frame_base')
@section("plugin_contents_$frame->id")
@if (isset($frame) && $frame->bucket_id)
{{-- バケツあり --}}
{{-- 新規登録 --}}
@can('posts.create',[[null, 'bbses', $buckets]])
@if (isset($frame) && $frame->bucket_id)
<div class="row">
<p class="text-right col-12">
{{-- 新規登録ボタン --}}
<button type="button" class="btn btn-success" onclick="location.href='{{url('/')}}/plugin/samples/edit/{{$page->id}}/{{$frame_id}}#frame-{{$frame_id}}'">
<i class="far fa-edit"></i> 新規登録
</button>
</p>
</div>
@endif
@endcan
<dl class="row mb-0">
@foreach($posts as $post_item)
<div class="col-md-3 mb-3">
<div class="card">
<div class="card-header">
<a href="{{URL::to('/')}}/plugin/samples/show/{{$page->id}}/{{$frame_id}}/{{$post_item->id}}#frame-{{$frame->id}}">
{{$post_item->title}}
</a>
</div>
<div class="card-body">{{$post_item->content}}</div>
</div>
</div>
@endforeach
</dl>
{{-- ページング処理 --}}
@include('plugins.common.user_paginate', ['posts' => $posts, 'frame' => $frame, 'aria_label_name' => $frame->id, 'class' => 'mt-3'])
@else
{{-- バケツなし --}}
<div class="card border-danger">
<div class="card-body">
<p class="text-center cc_margin_bottom_0">フレームの設定画面から、使用するサンプルを選択するか、作成してください。</p>
</div>
</div>
@endif
@endsection