Merge pull request #1572 from cuneytsenturk/master

Module item show page added multi support categories.
This commit is contained in:
Cüneyt Şentürk 2020-08-18 10:08:02 +03:00 committed by GitHub
commit f58a8378ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 8 deletions

View File

@ -124,10 +124,14 @@
<td class="text-right">{{ Date::parse($module->updated_at)->diffForHumans() }}</td>
</tr>
@endif
@if ($module->category)
<tr>
<th>{{ trans_choice('general.categories', 1) }}</th>
<td class="text-right"><a href="{{ route('apps.categories.show', $module->category->slug) }}">{{ $module->category->name }}</a></td>
@if ($module->categories)
<tr class="row">
<th class="col-5">{{ trans_choice('general.categories', (count($module->categories) > 1) ? 2 : 1) }}</th>
<td class="col-7 text-right">
@foreach ($module->categories as $module_category)
<a href="{{ route('apps.categories.show', $module_category->slug) }}">{{ $module_category->name }}</a> </br>
@endforeach
</td>
</tr>
@endif
</tbody>

View File

@ -108,7 +108,7 @@
@endif
<div class="tab-pane fade" id="review">
@php
@php
$reviews = $module->app_reviews;
@endphp
@ -280,10 +280,14 @@
<td class="col-7 text-right">{{ Date::parse($module->updated_at)->diffForHumans() }}</td>
</tr>
@endif
@if ($module->category)
@if ($module->categories)
<tr class="row">
<th class="col-5">{{ trans_choice('general.categories', 1) }}</th>
<td class="col-7 text-right"><a href="{{ route('apps.categories.show', $module->category->slug) }}">{{ $module->category->name }}</a></td>
<th class="col-5">{{ trans_choice('general.categories', (count($module->categories) > 1) ? 2 : 1) }}</th>
<td class="col-7 text-right">
@foreach ($module->categories as $module_category)
<a href="{{ route('apps.categories.show', $module_category->slug) }}">{{ $module_category->name }}</a> </br>
@endforeach
</td>
</tr>
@endif
<tr class="row">