post summary change

v1.18.x
Baris Soner Usakli 11 years ago
parent 76d8d09f9b
commit 976744480f

@ -140,8 +140,8 @@
<span class="pull-right"> <span class="pull-right">
<a href="../../topic/{posts.tid}/#{posts.pid}">[[global:posted]]</a> <a href="../../topic/{posts.tid}/#{posts.pid}">[[global:posted]]</a>
[[global:in]] [[global:in]]
<a href="../../category/{posts.categorySlug}"> <a href="../../category/{posts.category.slug}">
<i class="fa {posts.categoryIcon}"></i> {posts.categoryName} <i class="fa {posts.category.icon}"></i> {posts.category.name}
</a> </a>
<span class="timeago" title="{posts.relativeTime}"></span> <span class="timeago" title="{posts.relativeTime}"></span>
</span> </span>

@ -25,10 +25,10 @@
<div> <div>
<small> <small>
<span class="pull-right"> <span class="pull-right">
<a href="../../topic/{posts.tid}/#{posts.pid}">[[global:posted]]</a> <a href="../../topic/{posts.topic.slug}#{posts.pid}">[[global:posted]]</a>
[[global:in]] [[global:in]]
<a href="../../category/{posts.categorySlug}"> <a href="../../category/{posts.category.slug}">
<i class="fa {posts.categoryIcon}"></i> {posts.categoryName} <i class="fa {posts.category.icon}"></i> {posts.category.name}
</a> </a>
<span class="timeago" title="{posts.relativeTime}"></span> <span class="timeago" title="{posts.relativeTime}"></span>
</span> </span>

@ -25,10 +25,10 @@
<div> <div>
<small> <small>
<span class="pull-right"> <span class="pull-right">
<a href="../../topic/{posts.tid}/#{posts.pid}">posted</a> <a href="../../topic/{posts.topic.slug}#{posts.pid}">[[global:posted]]</a>
in [[global:in]]
<a href="../../category/{posts.categorySlug}"> <a href="../../category/{posts.category.slug}">
<i class="fa {posts.categoryIcon}"></i> {posts.categoryName} <i class="fa {posts.category.icon}"></i> {posts.category.name}
</a> </a>
<span class="timeago" title="{posts.relativeTime}"></span> <span class="timeago" title="{posts.relativeTime}"></span>
</span> </span>

@ -61,7 +61,7 @@
<!-- BEGIN posts --> <!-- BEGIN posts -->
<div class="topic-row panel panel-default clearfix"> <div class="topic-row panel panel-default clearfix">
<div class="panel-body"> <div class="panel-body">
<a href="../../topic/{posts.topicSlug}#{posts.pid}" class="search-result-text"> <a href="../../topic/{posts.topic.slug}#{posts.pid}" class="search-result-text">
{posts.content} {posts.content}
</a> </a>
@ -71,10 +71,10 @@
<a href="../../user/{posts.userslug}"> <a href="../../user/{posts.userslug}">
<img title="{posts.username}" class="img-rounded user-img" src="{posts.picture}"> <img title="{posts.username}" class="img-rounded user-img" src="{posts.picture}">
</a> </a>
<a href="../../topic/{posts.topicSlug}#{posts.pid}">posted</a> <a href="../../topic/{posts.topic.slug}#{posts.pid}"> [[global:posted]]</a>
in [[global:in]]
<a href="../../category/{posts.categorySlug}"> <a href="../../category/{posts.category.slug}">
<i class="fa {posts.categoryIcon}"></i> {posts.categoryName} <i class="fa {posts.category.icon}"></i> {posts.category.name}
</a> </a>
<span class="timeago" title="{posts.relativeTime}"></span> <span class="timeago" title="{posts.relativeTime}"></span>
</span> </span>

@ -281,11 +281,9 @@ var db = require('./database'),
return callback(null); return callback(null);
} }
categories.getCategoryFields(topicData.cid, ['name', 'icon', 'slug'], function(err, categoryData) { categories.getCategoryFields(topicData.cid, ['name', 'icon', 'slug'], function(err, categoryData) {
postData.categoryName = categoryData.name; postData.category = categoryData;
postData.categoryIcon = categoryData.icon; topicData.title = validator.escape(topicData.title);
postData.categorySlug = categoryData.slug; postData.topic = topicData;
postData.title = validator.escape(topicData.title);
postData.topicSlug = topicData.slug;
next(null, postData); next(null, postData);
}); });
}); });

Loading…
Cancel
Save