add posts_list_item.tpl

show best and latest posts on profile
main
Barış Soner Uşaklı 6 years ago
parent 2b7f561082
commit 36e1e26502

@ -136,17 +136,33 @@
<!-- ENDIF ips.length -->
<div class="row">
<div class="col-xs-12">
<h1>[[pages:account/posts, {username}]]</h1>
<div class="col-xs-6">
<h1>[[pages:account/best, {username}]]</h1>
<div class="col-xs-12">
<!-- IF !posts.length -->
<!-- IF !bestPosts.length -->
<div class="alert alert-warning">[[user:has_no_posts]]</div>
<!-- ENDIF !posts.length -->
<!-- IMPORT partials/posts_list.tpl -->
<!-- IF config.usePagination -->
<!-- IMPORT partials/paginator.tpl -->
<!-- ENDIF config.usePagination -->
<!-- ENDIF !bestPosts.length -->
<ul component="posts" class="posts-list">
{{{each bestPosts}}}
<!-- IMPORT partials/posts_list_item.tpl -->
{{{end}}}
</ul>
</div>
</div>
<div class="col-xs-6">
<h1>[[pages:account/latest-posts, {username}]]</h1>
<div class="col-xs-12">
<!-- IF !latestPosts.length -->
<div class="alert alert-warning">[[user:has_no_posts]]</div>
<!-- ENDIF !latestPosts.length -->
<ul component="posts" class="posts-list">
{{{each latestPosts}}}
<!-- IMPORT partials/posts_list_item.tpl -->
{{{end}}}
</ul>
</div>
</div>
</div>

@ -1,28 +1,6 @@
<ul component="posts" class="posts-list" data-nextstart="{nextStart}">
{{{each posts}}}
<li component="post" class="posts-list-item row<!-- IF posts.deleted --> deleted<!-- ELSE --><!-- IF posts.topic.deleted --> deleted<!-- ENDIF posts.topic.deleted --><!-- ENDIF posts.deleted -->" data-pid="{posts.pid}" data-uid="{posts.uid}">
<div class="col-lg-11 col-sm-10 col-xs-9 post-body">
<a class="topic-title" href="{config.relative_path}/post/{posts.pid}">
<!-- IF !posts.isMainPost -->RE: <!-- ENDIF !posts.isMainPost -->{posts.topic.title}
</a>
<div component="post/content" class="content">
{posts.content}
</div>
<small class="topic-category"><a href="{config.relative_path}/category/{posts.category.slug}">[[global:posted_in, {posts.category.name}]]</a></small>
<div class="post-info">
<a href="{config.relative_path}/user/{posts.user.userslug}">{buildAvatar(posts.user, "md", true, "user-img")}</a>
<div class="post-author">
<a href="{config.relative_path}/user/{posts.user.userslug}">{posts.user.username}</a><br />
<span class="timeago" title="{posts.timestampISO}"></span>
</div>
</div>
</div>
</li>
<!-- IMPORT partials/posts_list_item.tpl -->
{{{end}}}
</ul>
<div component="posts/loading" class="loading-indicator text-center hidden">

@ -0,0 +1,22 @@
<li component="post" class="posts-list-item row<!-- IF ../deleted --> deleted<!-- ELSE --><!-- IF ../topic.deleted --> deleted<!-- ENDIF --><!-- ENDIF -->" data-pid="{../pid}" data-uid="{../uid}">
<div class="col-lg-11 col-sm-10 col-xs-9 post-body">
<a class="topic-title" href="{config.relative_path}/post/{../pid}">
<!-- IF !../isMainPost -->RE: <!-- ENDIF -->{../topic.title}
</a>
<div component="post/content" class="content">
{../content}
</div>
<small class="topic-category"><a href="{config.relative_path}/category/{../category.slug}">[[global:posted_in, {../category.name}]]</a></small>
<div class="post-info">
<a href="{config.relative_path}/user/{../user.userslug}">{buildAvatar(../user, "md", true, "user-img")}</a>
<div class="post-author">
<a href="{config.relative_path}/user/{../user.userslug}">{../user.username}</a><br />
<span class="timeago" title="{../timestampISO}"></span>
</div>
</div>
</div>
</li>
Loading…
Cancel
Save