"FEATURE: add categories into article detail and article list"

This reverts commit 08e97fe2cb.
This commit is contained in:
Michal Kváček
2016-10-10 20:15:10 +02:00
parent 2c36203690
commit 20f6295f84
3 changed files with 15 additions and 2 deletions
@@ -71,7 +71,7 @@ class ArticleList extends Handler
if ($categoryUrl && $categoriesEnabled) { if ($categoryUrl && $categoriesEnabled) {
$category = Category::where('url', $categoryUrl) $category = Category::where('url', $categoryUrl)
->first(); ->firstOrFail();
$subcategories = $category->getChildren() $subcategories = $category->getChildren()
->toArray(); ->toArray();
@@ -17,6 +17,13 @@
<small>{{$page->author->name}}</small> <small>{{$page->author->name}}</small>
</div> </div>
@if($page->category)
<div class="m-t-25 text-center">
<a href="./seznam-clanku?category={{$page->category->url}}"><i class="fa fa-tag"></i> {{$page->category->name}}</a>
</div>
@endif
@if(isset($page->module_settings->allowComments) && $page->module_settings->allowComments != 0) @if(isset($page->module_settings->allowComments) && $page->module_settings->allowComments != 0)
<div class="m-t-25 text-center"> <div class="m-t-25 text-center">
<a href="#comments"><i class="fa fa-comments"></i> {{$page->comments->count()}}</a> <a href="#comments"><i class="fa fa-comments"></i> {{$page->comments->count()}}</a>
@@ -37,8 +37,14 @@
<a href="{{route('page.content', ['url' => $article->url])}}">více</a> <a href="{{route('page.content', ['url' => $article->url])}}">více</a>
</article> </article>
@if(isset($article->module_settings->allowComments) && $article->module_settings->allowComments != 0) @if(isset($article->module_settings->allowComments) && $article->module_settings->allowComments != 0 || $article->category)
<footer class="text-right"> <footer class="text-right">
@if($article->category)
<a href="./seznam-clanku?category={{$article->category->url}}"><i
class="fa fa-tag"></i> {{$article->category->name}}</a>
@endif
<a href="{{route('page.content', ['url' => $article->url])}}#comments"> <a href="{{route('page.content', ['url' => $article->url])}}#comments">
<i class="fa fa-fw fa-comments"></i> {{$article->comments->count()}} <i class="fa fa-fw fa-comments"></i> {{$article->comments->count()}}
</a> </a>