<commit_before>@extends('admin.master', ['title' => 'Category - ' . $category->slug])

@section('content')
<div class="col-sm-12">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">
				<ol class="breadcrumb">
					@foreach($category->getAncestorsAndSelf() as $parent)
					<li><a class ="a-bread" href="{{ route('AdminCategoryShow', $parent) }}">{{ $parent->name }}</a></li>
					@endforeach
				</ol>
			</h3>
		</div>
		<div class="panel-body">
			<div class="buttons">
				<a class="btn btn-default" href="{{ route('AdminCategoryEdit', $category->id) }}" role="button">Edit category</a>
				<a class="btn btn-default" href="{{ route('AdminCategoryDelete', $category->id) }}" role="button">Delete category</a>
			</div>
			<div class="child-categories">
				<h3>Child Categories</h3>
				@if($category->getImmediateDescendants()->isEmpty())
				<p>There is no child categories.</p>
				@else
				<ul>
					@foreach($category->getImmediateDescendants() as $child)
					<li><a href="{{ route('AdminCategoryShow', $child) }}">{{ $child->name }}</a></li>
					@endforeach
				</ul>
				@endif
			</div>
			<div class="category-info">
				<h3>Category information</h3>
				<dl class="dl-horizontal">
					<dt>Name</dt>
					<dd>{{ $category->name }}</dd>

					<dt>Slug</dt>
					<dd>{{ $category->slug }}</dd>

					<dt>No. of products</dt>
					<dd>Derka derka muhamed jihad</dd>
				</dl>
			</div>
		</div>
	</div>
</div>

@endsection<commit_msg>Tweaked individual category view, shows number if products if not leaf<commit_after>@extends('admin.master', ['title' => 'Category - ' . $category->slug])

@section('content')
<div class="col-sm-12">
	<div class="panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">
				<ol class="breadcrumb">
					@foreach($category->getAncestorsAndSelf() as $parent)
					<li><a class ="a-bread" href="{{ route('AdminCategoryShow', $parent) }}">{{ $parent->name }}</a></li>
					@endforeach
				</ol>
			</h3>
		</div>
		<div class="panel-body">
			<div class="buttons">
				<a class="btn btn-default" href="{{ route('AdminCategoryEdit', $category->id) }}" role="button">Edit category</a>
				<a class="btn btn-default" href="{{ route('AdminCategoryDelete', $category->id) }}" role="button">Delete category</a>
			</div>
			<div class="child-categories">
				<h3>Child Categories</h3>
				@if($category->getImmediateDescendants()->isEmpty())
				<p>There is no child categories.</p>
				@else
				<ul>
					@foreach($category->getImmediateDescendants() as $child)
					<li><a href="{{ route('AdminCategoryShow', $child) }}">{{ $child->name }}</a></li>
					@endforeach
				</ul>
				@endif
			</div>
			<div class="category-info">
				<h3>Category information</h3>
				<dl class="dl-horizontal">
					<dt>Name</dt>
					<dd>{{ $category->name }}</dd>

					<dt>Slug</dt>
					<dd>{{ $category->slug }}</dd>

					<dt>No. of products</dt>
					<dd>@if($category->isLeaf()){{ $category->products->count() }}@else {{ 'Not a leaf category'}} @endif</dd>
				</dl>
			</div>
		</div>
	</div>
</div>

@endsection
{'fraction_non_alphanumeric': 0.22515278224509488, 'fraction_numerical': 0.005146349308459312, 'mean_word_length': 3.7336377473363775, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 134, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3010319', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1080, 'n_words': 221}