mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-30 15:05:38 +08:00
在 Ticket 页面加上用户信息
This commit is contained in:
@@ -30,8 +30,16 @@ module.exports =
|
||||
unless mTicket.getMember ticket, account
|
||||
return res.send 403
|
||||
|
||||
renderer 'ticket/view',
|
||||
ticket: ticket
|
||||
async.map ticket.replys, (reply, callback) ->
|
||||
mAccount.findId reply.account_id, (reply_account) ->
|
||||
reply.account = reply_account
|
||||
callback null, reply
|
||||
|
||||
, (err, result) ->
|
||||
ticket.replys = result
|
||||
|
||||
renderer 'ticket/view',
|
||||
ticket: ticket
|
||||
|
||||
post:
|
||||
create: (req, res) ->
|
||||
|
||||
@@ -23,7 +23,7 @@ exports.register = (username, email, passwd, callback = null) ->
|
||||
signup: new Date()
|
||||
group: []
|
||||
setting:
|
||||
avatar_url: crypto.createHash('md5').update(email).digest('hex')
|
||||
avatar_url: "//ruby-china.org/avatar/#{crypto.createHash('md5').update(email).digest('hex')}?s=58"
|
||||
attribure:
|
||||
plans: []
|
||||
tokens: []
|
||||
|
||||
@@ -5,3 +5,16 @@
|
||||
.list-group-item a {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.list-group-item img {
|
||||
width: 58px;
|
||||
height: 58px;
|
||||
}
|
||||
|
||||
.list-content {
|
||||
margin-left: 68px;
|
||||
}
|
||||
|
||||
.label {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
@@ -14,10 +14,13 @@ block main
|
||||
ul.list-group
|
||||
for reply in ticket.replys
|
||||
li.list-group-item.clearfix
|
||||
a.pull-left(href='/member/')
|
||||
img(src='http://ruby-china.org/avatar/efcc15b92617a95a09f514a9bff9e6c3?s=58')
|
||||
a.pull-left
|
||||
img(src= reply.account.setting.avatar_url)
|
||||
.list-content
|
||||
p!= reply.content_html
|
||||
p
|
||||
span.label.label-info= reply.account.username
|
||||
span.label.label-default= reply.created_at
|
||||
|
||||
.row
|
||||
header= t('ticket.create_reply')
|
||||
|
||||
Reference in New Issue
Block a user