Merge branch 'dev' into dobrotyzpece.cz
This commit is contained in:
@@ -62,6 +62,7 @@ class Content extends Model
|
|||||||
{
|
{
|
||||||
return Content::where('status', '!=', Content::STATUS_DRAFT)
|
return Content::where('status', '!=', Content::STATUS_DRAFT)
|
||||||
->select('contents.*')
|
->select('contents.*')
|
||||||
|
->with('author')
|
||||||
->join('modules', 'modules.handler', '=', 'contents.module_handler')
|
->join('modules', 'modules.handler', '=', 'contents.module_handler')
|
||||||
->where('language', LaravelLocalization::getCurrentLocale())
|
->where('language', LaravelLocalization::getCurrentLocale())
|
||||||
->where('modules.enabled', true);
|
->where('modules.enabled', true);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class Article extends Handler implements ContentTitles
|
|||||||
$content->comments = [];
|
$content->comments = [];
|
||||||
if (isset($content->module_settings->allowComments) && $content->module_settings->allowComments) {
|
if (isset($content->module_settings->allowComments) && $content->module_settings->allowComments) {
|
||||||
$content->comments = Comment::where('content_id', $content->id)
|
$content->comments = Comment::where('content_id', $content->id)
|
||||||
|
->with('author')
|
||||||
->where('approved', 1)
|
->where('approved', 1)
|
||||||
->orderBy('created_at')
|
->orderBy('created_at')
|
||||||
->get();
|
->get();
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class ArticleList extends Handler
|
|||||||
->enabled()
|
->enabled()
|
||||||
) {
|
) {
|
||||||
$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>
|
||||||
|
|||||||
Reference in New Issue
Block a user