mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-05 20:11:26 +01:00
closes #332
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<div class="{topic_row_size}">
|
||||
<ul id="topics-container">
|
||||
<!-- BEGIN topics -->
|
||||
<a href="../../topic/{topics.slug}"><li class="category-item {topics.deleted-class}">
|
||||
<a href="../../topic/{topics.slug}#{topics.teaser_pid}"><li class="category-item {topics.deleted-class}">
|
||||
<div class="row">
|
||||
<div class="col-md-12 topic-row">
|
||||
<div class="latest-post visible-lg visible-md">
|
||||
|
||||
@@ -313,6 +313,7 @@ schema = require('./schema.js'),
|
||||
topicData.teaser_text = topicInfo.teaserInfo.text || '',
|
||||
topicData.teaser_username = topicInfo.teaserInfo.username || '';
|
||||
topicData.teaser_userpicture = topicInfo.teaserInfo.picture || '';
|
||||
topicData.teaser_pid = topicInfo.teaserInfo.pid;
|
||||
|
||||
topicData.teaser_timestamp = topicInfo.teaserInfo.timestamp ? (new Date(parseInt(topicInfo.teaserInfo.timestamp, 10)).toISOString()) : '';
|
||||
|
||||
@@ -575,7 +576,7 @@ schema = require('./schema.js'),
|
||||
Topics.getTeaser = function(tid, callback) {
|
||||
threadTools.getLatestUndeletedPid(tid, function(err, pid) {
|
||||
if (!err) {
|
||||
posts.getPostFields(pid, ['content', 'uid', 'timestamp'], function(postData) {
|
||||
posts.getPostFields(pid, ['pid', 'content', 'uid', 'timestamp'], function(postData) {
|
||||
|
||||
user.getUserFields(postData.uid, ['username', 'picture'], function(err, userData) {
|
||||
if (err)
|
||||
@@ -584,6 +585,7 @@ schema = require('./schema.js'),
|
||||
var stripped = postData.content,
|
||||
timestamp = postData.timestamp,
|
||||
returnObj = {
|
||||
"pid": postData.pid,
|
||||
"username": userData.username,
|
||||
"picture": userData.picture,
|
||||
"timestamp": timestamp
|
||||
|
||||
Reference in New Issue
Block a user