@php use App\Enums\Article\LinkType; use App\Enums\Content\TimerUsageType; use App\Enums\Content\CategoryUsageType; use App\Enums\Content\MainImageUsageType; @endphp {{-- タイトルを非表示 --}} {{-- @php // ページタイトル $title = $content->name . ' - 編集'; @endphp --}} @extends('layouts.user-admin.page') @push('before-close-head') @vite(['resources/js/pages/articles/block-manager.ts']) @endpush {{-- パンくず --}} @section('breadcrumb') {{-- パンくずリストの位置を左側に配置 --}}
@endsection {{-- コンテンツ --}} @section('content') {{-- タイトルを「編集」→「基本情報」に変更 --}} @php $cardTitle = '基本情報'; @endphp
{{-- フォーム --}} {{-- 入力項目エリア --}} {{-- 項目 - No --}} No {{ $article->id }} {{-- 項目 - タイトル --}} タイトル 100文字以内で入力してください @error('title') {{ $message }} @enderror {{-- 項目 - 掲載期間 --}} @if ($content->timer_usage_type !== TimerUsageType::None) 掲載期間
{{-- 掲載開始 --}}
掲載開始
{{-- 区切り --}}
〜
{{-- 掲載終了 --}} {{-- 公開タイマー機能 - from~to 利用時のみ --}} @if ($content->timer_usage_type === TimerUsageType::Between)
掲載終了
@endif
@if ($content->timer_usage_type === TimerUsageType::Between) 掲載終了日時は任意項目です @endif @error('timer_start_at_date') {{ $message }} @enderror @error('timer_start_at_time') {{ $message }} @enderror @if ($content->timer_usage_type === TimerUsageType::Between) @error('timer_end_at_date') {{ $message }} @enderror @error('timer_end_at_time') {{ $message }} @enderror @endif
@endif {{-- 項目 - カテゴリ --}} @if ($content->category_usage_type !== CategoryUsageType::None) カテゴリ @if ($content->category_usage_type === CategoryUsageType::Single)
@if($canEditCategory)
カテゴリ設定
@endif
@error('category_id') {{ $message }} @enderror @endif @if ($content->category_usage_type === CategoryUsageType::Multiple)
@if($canEditCategory)
カテゴリ設定
@endif
@error('category_ids') {{ $message }} @enderror @endif
@endif {{-- 項目 - タグ --}} @if ($content->is_tag_enabled) タグ @php // oldから文字列を取得して配列に変換 $tags = old('tags', $article->tags->pluck('name')->toArray()); $tags = is_string($tags) ? explode(',', $tags) : $tags; @endphp @error('tags') {{ $message }} @enderror @endif {{-- 項目 - メイン画像 --}} @if ($content->main_image_usage_type !== MainImageUsageType::None) メイン画像 @if ($content->main_image_usage_type !== MainImageUsageType::Multiple)
@php $allowedExtensions = ['jpg', 'jpeg', 'png', 'gif']; $maxFileSize = 10 * 1024 * 1024; // 10MB $value = $article->main_image ?: ''; $valueUrl = $article->attachments['main_image'][0] ?? '' ?: ''; $recommendedSize = config('upload.recommended_image_sizes.main_image'); @endphp @if ($content->main_image_usage_type->isWithCaption())
注釈
200文字以内で入力してください
alt(代替テキスト)
200文字以内で入力してください
@else
alt(代替テキスト)
200文字以内で入力してください
@endif
@else
@php $allowedExtensions = ['jpg', 'jpeg', 'png', 'gif']; $maxFileSize = 10 * 1024 * 1024; // 10MB $maxImages = 5; // 最大5枚 // 既存の画像データを準備 $existingImages = []; foreach ($article->mainImages as $image) { $existingImages[] = [ 'image' => $image->image, 'image_url' => $image->attachments['image'][0] ?? '', 'alt' => $image->alt, ]; } $recommendedSize = config('upload.recommended_image_sizes.main_image'); @endphp
@endif @error('main_image') {{ $message }} @enderror @error('main_image_caption') {{ $message }} @enderror @error('main_image_alt') {{ $message }} @enderror @error('main_images') {{ $message }} @enderror @error('main_images.*') {{ $message }} @enderror
@endif {{-- 項目 - meta --}} @if ($content->is_meta_enabled)
meta(SEO対策・SNS設定) @if (\App\Enums\Ai\Operation::MetaTag->isEnabled()) AIで生成 生成中... @endif
{{-- title --}}
title
検索結果やSNSに表示されるページタイトル 100文字以内で入力してください。(25〜32文字推奨) @error('meta_title') {{ $message }} @enderror
{{-- AI生成結果: description 3パターン --}} {{-- description(実際の送信フィールド) --}}
description
検索結果やSNSに表示される説明文 200文字以内で入力してください。(80〜100文字推奨) @error('meta_description') {{ $message }} @enderror
{{-- OGP画像 --}} @php $allowedExtensions = ['jpg', 'jpeg', 'gif', 'png']; $maxFileSize = 10 * 1024 * 1024; // 10MB $value = $article->ogp_image ?: ''; $valueUrl = $article->attachments['ogp_image'][0] ?? '' ?: ''; $recommendedSize = config('upload.recommended_image_sizes.ogp_image'); @endphp SNSでシェアした際に表示される画像 @error('ogp_image') {{ $message }} @enderror
@endif {{-- 項目 - 掲載タイプ --}} @if ($content->is_link_type_enabled) 掲載タイプ @foreach ($lists['linkTypeOption'] as $key => $option) @endforeach {{-- URL --}}
URL
{{-- ファイル --}}
ファイル @php $allowedExtensions = ['pdf', 'doc', 'docx', 'xls', 'xlsx']; $maxFileSize = 10 * 1024 * 1024; // 10MB $value = $article->link_file ?: ''; $valueName = $article->link_file_name ?: ''; $valueSize = $article->link_file_size ?: 0; $valueExtension = $article->link_file_extension ?: ''; @endphp
@error('link_type') {{ $message }} @enderror @error('link_url') {{ $message }} @enderror @error('link_file') {{ $message }} @enderror
@endif {{-- 項目 - ステータス --}} ステータス @error('status') {{ $message }} @enderror
{{-- ブロック項目エリア --}} {{-- 掲載タイプによって表示を切り替える --}}
{{-- 追従ボタンバー --}}
{{-- 左カラム: 「一覧に戻る」を左端に固定 --}}
記事一覧に戻る
{{-- 中央カラム: 「追加」と「保存」を中央寄せで集約 --}}
{{-- ブロック項目を追加ボタン --}} ブロック項目を追加 {{-- プレビューボタン --}} @if ($content->is_preview_enabled) @endif {{-- 更新ボタン --}} 保存
{{-- 右カラム:削除を右端に配置 --}}
この記事を削除
{{-- 追従バーの分のスペース --}}
{{-- トリミングモーダル --}}
@endsection @section('modal') {{-- 削除モーダル --}}

記事のデータは全て削除されます

@if ($content->is_copy_enabled) @php $url = $article->getLinkCopyUrl(isCopy: true); $key = $article->id; @endphp {{-- Copyモーダル --}}

記事のデータを複製しますか?

@endif @endsection