Fix #1162.
This commit is contained in:
parent
7545dba51e
commit
6cf7373b93
@ -27,6 +27,7 @@ Build =
|
|||||||
date: data.now
|
date: data.now
|
||||||
dateUTC: data.time
|
dateUTC: data.time
|
||||||
comment: data.com
|
comment: data.com
|
||||||
|
capReps: data.capcode_replies
|
||||||
# thread status
|
# thread status
|
||||||
isSticky: !!data.sticky
|
isSticky: !!data.sticky
|
||||||
isClosed: !!data.closed
|
isClosed: !!data.closed
|
||||||
@ -54,7 +55,7 @@ Build =
|
|||||||
postID, threadID, boardID
|
postID, threadID, boardID
|
||||||
name, capcode, tripcode, uniqueID, email, subject, flagCode, flagName, date, dateUTC
|
name, capcode, tripcode, uniqueID, email, subject, flagCode, flagName, date, dateUTC
|
||||||
isSticky, isClosed
|
isSticky, isClosed
|
||||||
comment
|
comment, capReps
|
||||||
file
|
file
|
||||||
} = o
|
} = o
|
||||||
isOP = postID is threadID
|
isOP = postID is threadID
|
||||||
@ -172,22 +173,39 @@ Build =
|
|||||||
else
|
else
|
||||||
fileHTML = ''
|
fileHTML = ''
|
||||||
|
|
||||||
tripcode =
|
tripcode = if tripcode
|
||||||
if tripcode
|
" <span class=postertrip>#{tripcode}</span>"
|
||||||
" <span class=postertrip>#{tripcode}</span>"
|
else
|
||||||
else
|
''
|
||||||
''
|
|
||||||
|
|
||||||
sticky =
|
sticky = if isSticky
|
||||||
if isSticky
|
" <img src=#{staticPath}sticky.gif alt=Sticky title=Sticky class=stickyIcon>"
|
||||||
" <img src=#{staticPath}sticky.gif alt=Sticky title=Sticky class=stickyIcon>"
|
else
|
||||||
else
|
''
|
||||||
''
|
closed = if isClosed
|
||||||
closed =
|
" <img src=#{staticPath}closed.gif alt=Closed title=Closed class=closedIcon>"
|
||||||
if isClosed
|
else
|
||||||
" <img src=#{staticPath}closed.gif alt=Closed title=Closed class=closedIcon>"
|
''
|
||||||
else
|
|
||||||
''
|
capcodeReplies = ''
|
||||||
|
if capReps
|
||||||
|
generateCapcodeReplies = (capcodeType, array) ->
|
||||||
|
"<span class=smaller><span class=bold>#{
|
||||||
|
switch capcodeType
|
||||||
|
when 'admin'
|
||||||
|
'Administrator'
|
||||||
|
when 'mod'
|
||||||
|
'Moderator'
|
||||||
|
when 'developer'
|
||||||
|
'Developer'
|
||||||
|
} Repl#{if array.length > 1 then 'ies' else 'y'}:</span> #{
|
||||||
|
array.map (ID) ->
|
||||||
|
"<a href='/#{boardID}/res/#{threadID}#p#{ID}' class=quotelink>>>#{ID}</a>"
|
||||||
|
.join ' '
|
||||||
|
}</span><br>"
|
||||||
|
for capcodeType, array of capReps
|
||||||
|
capcodeReplies += generateCapcodeReplies capcodeType, array
|
||||||
|
capcodeReplies = "<br><br><span class=capcodeReplies>#{capcodeReplies}</span>"
|
||||||
|
|
||||||
container = $.el 'div',
|
container = $.el 'div',
|
||||||
id: "pc#{postID}"
|
id: "pc#{postID}"
|
||||||
@ -241,7 +259,7 @@ Build =
|
|||||||
|
|
||||||
(if isOP then '' else fileHTML) +
|
(if isOP then '' else fileHTML) +
|
||||||
|
|
||||||
"<blockquote class=postMessage id=m#{postID}>#{comment or ''}</blockquote> " +
|
"<blockquote class=postMessage id=m#{postID}>#{comment or ''}#{capcodeReplies}</blockquote> " +
|
||||||
|
|
||||||
'</div>'
|
'</div>'
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user