Add breadcrumbs to admin project documentation versions views

- Introduce breadcrumbs for `index`, `create`, `edit`, and `show` views.
- Adjust breadcrumb logic to handle optional categories in `show` view.
This commit is contained in:
2026-07-25 01:25:18 +05:00
parent ace4c69bd8
commit 754a67c5d0
4 changed files with 9 additions and 1 deletions
@@ -1,5 +1,6 @@
@section('meta_title', __('admin-sections.Documentation version'))
@section('h1', __('admin-sections.Project') . ': ' . $project->name)
@section('breadcrumbs', Breadcrumbs::render('admin.projects.documentation-versions.create', $project))
<x-admin.layout>
@include('admin.projects.documentation-versions._top')
<div class="row">
@@ -1,5 +1,6 @@
@section('meta_title', __('admin-sections.Documentation version'))
@section('h1', __('admin-sections.Project') . ': ' . $project->name)
@section('breadcrumbs', Breadcrumbs::render('admin.projects.documentation-versions.edit', $project, $version))
<x-admin.layout>
@include('admin.projects.documentation-versions._top')
<div class="row">
@@ -1,5 +1,6 @@
@section('meta_title', __('admin-sections.Documentation version'))
@section('h1', __('admin-sections.Project') . ': ' . $project->name)
@section('breadcrumbs', Breadcrumbs::render('admin.projects.documentation-versions.index', $project))
<x-admin.layout>
@include('admin.projects.documentation-versions._top')
<div class="card border-0 shadow mb-4">
@@ -41,7 +42,7 @@
@endif
</td>
<td>
<a href="{{ route('admin.projects.documentation-versions.edit', ['project' => $project->id, 'documentation_version' => $version->id]) }}" class="btn btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ __('Edit') }}">
<a href="{{ route('admin.projects.documentation-versions.edit', ['project' => $project->id, 'documentation_version' => $version->id]) }}" class="btn btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ __('Edit') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="align-text-top" viewBox="0 0 16 16">
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
</svg>
@@ -1,5 +1,10 @@
@section('meta_title', __('admin-sections.Documentation version'))
@section('h1', __('admin-sections.Project') . ': ' . $project->name)
@if(!empty($category))
@section('breadcrumbs', Breadcrumbs::render('admin.projects.documentation-versions.show.category', $project, $version, $category, $categoryPath ?? null))
@else
@section('breadcrumbs', Breadcrumbs::render('admin.projects.documentation-versions.show', $project, $version))
@endif
@php
$categoryId = null;
if (!empty($category) && $category->id) {