Размер файла: 2.31Kb
@extends('layout')
@section('title')
{{ __('blogs.title_move_article') }} {{ $blog->title }}
@stop
@section('breadcrumb')
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
<li class="breadcrumb-item"><a href="/admin">{{ __('index.panel') }}</a></li>
<li class="breadcrumb-item"><a href="/admin/blogs">{{ __('index.blogs') }}</a></li>
@if ($blog->category->parent->id)
<li class="breadcrumb-item"><a href="/admin/blogs/{{ $blog->category->parent->id }}">{{ $blog->category->parent->name }}</a></li>
@endif
<li class="breadcrumb-item"><a href="/admin/blogs/{{ $blog->category->id }}">{{ $blog->category->name }}</a></li>
<li class="breadcrumb-item"><a href="/articles/{{ $blog->id }}">{{ $blog->title }}</a></li>
<li class="breadcrumb-item active">{{ __('blogs.title_move_article') }}</li>
</ol>
</nav>
@stop
@section('content')
<div class="form cut">
<form action="/admin/articles/move/{{ $blog->id }}" method="post">
@csrf
<div class="form-group{{ hasError('cid') }}">
<label for="inputCategory">{{ __('blogs.blog') }}</label>
<?php $inputCategory = getInput('cid', $blog->category_id); ?>
<select class="form-control" id="inputCategory" name="cid">
@foreach ($categories as $data)
<option value="{{ $data->id }}"{{ ($inputCategory === $data->id && ! $data->closed) ? ' selected' : '' }}{{ $data->closed ? ' disabled' : '' }}>{{ $data->name }}</option>
@if ($data->children->isNotEmpty())
@foreach($data->children as $datasub)
<option value="{{ $datasub->id }}"{{ ($inputCategory === $datasub->id && !$datasub->closed) ? ' selected' : '' }}{{ $datasub->closed ? ' disabled' : '' }}>– {{ $datasub->name }}</option>
@endforeach
@endif
@endforeach
</select>
<div class="invalid-feedback">{{ textError('cid') }}</div>
</div>
<button class="btn btn-primary">{{ __('main.move') }}</button>
</form>
</div>
@stop