mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-28 23:49:11 +08:00
/ticket/list, 工单列表前端页面雏形
This commit is contained in:
@@ -13,7 +13,10 @@
|
||||
"error": "错误",
|
||||
"logout": "注销",
|
||||
"panel": "管理面板",
|
||||
"ticket": "工单"
|
||||
"ticket": "工单",
|
||||
"type": "类型",
|
||||
"title": "标题",
|
||||
"status": "状态"
|
||||
},
|
||||
"view": {
|
||||
"signup": {
|
||||
@@ -22,6 +25,11 @@
|
||||
},
|
||||
"login": {
|
||||
"noAccount": "还没有账户?"
|
||||
},
|
||||
"ticket": {
|
||||
"list": {
|
||||
"title": "工单列表"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,15 @@ Account = require '../model/Account'
|
||||
Ticket = require '../model/Ticket'
|
||||
|
||||
module.exports =
|
||||
get: {}
|
||||
get:
|
||||
list: (req, res) ->
|
||||
Account.authenticate req.token, (account) ->
|
||||
Ticket.find
|
||||
account_id: account.id()
|
||||
, (tickets) ->
|
||||
res.render 'ticket/list',
|
||||
account: account
|
||||
tickets: tickets
|
||||
|
||||
post:
|
||||
create: (req, res) ->
|
||||
|
||||
20
core/view/ticket/list.jade
Normal file
20
core/view/ticket/list.jade
Normal file
@@ -0,0 +1,20 @@
|
||||
extends ../layout
|
||||
|
||||
prepend head
|
||||
title #{t('view.ticket.list.title')} | #{t('app.name')}
|
||||
|
||||
block main
|
||||
header= t('view.ticket.list.title')
|
||||
|
||||
table.table.table-hover
|
||||
thead
|
||||
tr
|
||||
td= t('word.type')
|
||||
td= t('word.title')
|
||||
td= t('word.status')
|
||||
tbody
|
||||
for ticket in tickets
|
||||
tr
|
||||
td= ticket.data.type
|
||||
td= ticket.data.title
|
||||
td= ticket.data.status
|
||||
Reference in New Issue
Block a user