Merge branch '1.1' of http://git.digital-tps.tk/TPS/ORIENT into 1.1
This commit is contained in:
commit
cc4f3bd791
|
|
@ -54,8 +54,10 @@ class postsController extends Controller
|
|||
|
||||
//posts item
|
||||
public function show($locale,$id){
|
||||
$path = Config::get('app.cdn').Config::get('cms.storage.media.path');
|
||||
//$post = $this->Post::find($id,['id','content_html','author','slug', 'afisha_phone', 'afisha_address', 'afisha_phone_new']);
|
||||
$post = $this->Post::where('id', $id)->select('id', 'content_html', 'author', 'title','slug','published_at', 'more_photo','afisha_phone', 'afisha_address', 'afisha_phone_new', DB::raw("IF(featured_image<>'',concat('$path',featured_image),featured_image) as main_image"))->with(['categories:id,name'])->first();
|
||||
|
||||
$post = $this->Post::find($id,['id','content_html','author','slug', 'afisha_phone', 'afisha_address', 'afisha_phone_new',]);
|
||||
|
||||
if(!is_null($post)) {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ random = 0
|
|||
<div class="container">
|
||||
<div class="trending-inner">
|
||||
<div class="trending-aside">
|
||||
<div class="trending-head">
|
||||
<div class="trending-head" style="width: 116rem;">
|
||||
<h2><a href="{{'new/group'|page({categoryGroup: 'stati', slug:'ot-redaktora'})}}">{{ 'new.home.ot.redaktora'|_ }}</a></h2>
|
||||
<span></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -10,23 +10,14 @@ $this['afisha'] = RainLab\Blog\Models\CategoryGroup::where('slug', 'poster')->wi
|
|||
==
|
||||
<div class="sub-news-right">
|
||||
<div class="sub-news-right-top">
|
||||
<h2><a href="{{'new/group'|page({categoryGroup: 'news', slug:'watan'})}}">{{'new.home.page.right'|_ }}</a></h2>
|
||||
<h2>{{'new.home.page.right'|_ }}</h2>
|
||||
<div class="sub-news-right-top-content">
|
||||
|
||||
{% for post in categoryPosts %}
|
||||
|
||||
<a href="{{'new/newPost'|page({id:post.id,slug:post.slug})}}" class="sub-news-left-content-item sub-news-right-top-item">
|
||||
<div class="sub-news-left-content-item-content">
|
||||
<div class="sub-news-left-content-item-date-content-head">
|
||||
<h4>{{ post.published_at| date('d.m.Y')}}</h4>
|
||||
<span>|</span>
|
||||
<h4>{{post.published_at|date('H:i')}}</h4>
|
||||
</div>
|
||||
<p class="sub-news-left-content-item-date-content-info">
|
||||
{{post.title}}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
{% partial 'newHome/post-item-img' post=post %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
[blogPosts postsMainLeft]
|
||||
pageNumber = "{{ :page }}"
|
||||
categoryFilter = "novosti-biznesa"
|
||||
postsPerPage = 5
|
||||
postsPerPage = 6
|
||||
noPostsMessage = "No posts found"
|
||||
sortOrder = "published_at desc"
|
||||
categoryPage = 404
|
||||
|
|
@ -22,9 +22,16 @@ postPage = 404
|
|||
code = 2
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[popularPosts]
|
||||
category = "{{ :category }}"
|
||||
postsLimit = 5
|
||||
noPostsMessage = "No posts found"
|
||||
postPage = 404
|
||||
==
|
||||
{% set postsMainLeft = postsMainLeft.posts %}
|
||||
{% set postsMainRight = postsMainRight.posts %}
|
||||
{% set populars = popularPosts.posts %}
|
||||
|
||||
|
||||
|
||||
|
|
@ -81,7 +88,7 @@ random = 0
|
|||
|
||||
{% partial 'newHome/main-bussiness' categoryPosts = postsMainLeft %}
|
||||
|
||||
{% partial 'newHome/main-tender' categoryPosts = postsMainRight %}
|
||||
{% partial 'newHome/main-tender' categoryPosts = populars %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -92,4 +99,4 @@ random = 0
|
|||
|
||||
</div>
|
||||
</main>
|
||||
<!-- MAIN end ======== -->
|
||||
<!-- MAIN end ======== -->
|
||||
|
|
@ -1,22 +1,25 @@
|
|||
[viewBag]
|
||||
|
||||
[popularPosts]
|
||||
category = "{{ :category }}"
|
||||
postsLimit = 5
|
||||
[blogPosts popularPosts]
|
||||
pageNumber = "{{ :page }}"
|
||||
categoryFilter = "ot-redaktora"
|
||||
postsPerPage = 6
|
||||
noPostsMessage = "No posts found"
|
||||
postPage = "new/newPost"
|
||||
sortOrder = "published_at desc"
|
||||
categoryPage = 404
|
||||
postPage = 404
|
||||
==
|
||||
{% set posts = popularPosts.posts %}
|
||||
|
||||
|
||||
<div class="trending-main">
|
||||
<div class="trending-head">
|
||||
<h2>{{ 'new.page.samoe.chitaemoe'|_ }}</h2>
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="trending-main-content">
|
||||
<div class="trending-main" style="margin-top: 60px;">
|
||||
<!-- <div class="trending-head">
|
||||
<h2>{{ 'new.page.samoe.chitaemoe'|_ }}</h2>
|
||||
<span></span>
|
||||
</div> -->
|
||||
<div class="trending-main-content" style="height: 77% !important;">
|
||||
|
||||
{% for post in posts %}
|
||||
{% for post in posts.slice(1,6) %}
|
||||
|
||||
{% partial 'newHome/post-item-img' post = post %}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ pageNumber = "{{ :page }}"
|
|||
typePost = "turkmenistan"
|
||||
postsPerPage = 6
|
||||
noPostsMessage = "No posts found"
|
||||
sortOrder = "created_at desc"
|
||||
sortOrder = "published_at desc"
|
||||
categoryPage = 404
|
||||
postPage = 404
|
||||
exceptPost = "{{ :id }}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue