@extends('task/layout') @section('content')

ルーブリック一覧

@if(request('show_all')) 登録されている全てのルーブリック(親・子)を表示中 @else 登録されているルーブリックの一覧です(親ルーブリックのみ表示) @endif

@if(request('show_all')) 親のみ表示 @else 全て表示 @endif 新規作成
@forelse($rubrics as $rubric)
{{ $rubric->title }}
@if($rubric->rubric_criterion_id) 子ルーブリック @else @if(($rubric->child_rubrics_count ?? 0) > 0) 親ルーブリック (子: {{ $rubric->child_rubrics_count }}) @endif @endif
@if($rubric->rubric_criterion_id && $rubric->parent_criteria)
親観点: {{ $rubric->parent_criteria->parentrubric->title }} - {{ $rubric->parent_criteria->item }}
@endif @if($rubric->description)

{{ Str::limit($rubric->description, 100) }}

@endif
{{ $rubric->level }}
評価項目: {{ $rubric->criteria->count() }}個
作成日: {{ $rubric->created_at->format('Y-m-d H:i') }}
更新日: {{ $rubric->updated_at->format('Y-m-d H:i') }}
@php $currentUserId = Auth::id() ?? 1; // デフォルトでユーザーID=1を使用 @endphp プレビュー
{{-- 子ルーブリック一覧 --}} @if(!$rubric->rubric_criterion_id) @php $childRubrics = []; foreach($rubric->criteria as $criterion) { if($criterion->rubric) { $childRubrics[] = [ 'criterion' => $criterion, 'rubric' => $criterion->rubric ]; } } @endphp @if(count($childRubrics) > 0)
子ルーブリック ({{ count($childRubrics) }})
@foreach($childRubrics as $child)
{{ $child['rubric']->title }} 親観点: {{ $child['criterion']->item }} 評価項目: {{ $child['rubric']->criteria->count() }}個
@endforeach
@endif @endif
@empty
ルーブリックが登録されていません。新規作成ボタンから作成してください。
@endforelse
@push('scripts') @endpush @endsection