Permalink
Browse files

开放问答

  • Loading branch information...
1 parent a97c2c8 commit 778b0340cf226fde47c60d8697a2d779c6b718c3 System Administrator committed Aug 6, 2014
Showing with 6,927 additions and 11 deletions.
  1. +553 −0 assets/css/job.less
  2. +75 −1 assets/css/main.css
  3. +2 −1 assets/css/main.less
  4. +98 −0 assets/js/pcaunzip.js
  5. +6 −0 controllers/comment.coffee
  6. +32 −0 controllers/index.coffee
  7. +74 −0 controllers/job.coffee
  8. +2 −0 controllers/topic.coffee
  9. +18 −0 filters/job/all-publish-jobs.coffee
  10. +11 −0 filters/job/check-resume.coffee
  11. +20 −0 filters/job/comments.coffee
  12. +14 −0 functions/job/comment.coffee
  13. +33 −0 functions/job/job.coffee
  14. +14 −0 functions/job/resume.coffee
  15. +11 −1 lib/modelLoader.coffee
  16. +19 −0 models/job/comments.coffee
  17. +7 −0 models/job/job_resumes.coffee
  18. +39 −0 models/job/jobs.coffee
  19. +13 −0 models/job/resumes.coffee
  20. +1 −0 models/user/resume.coffee
  21. BIN resumes/1406636091779-0.jpeg
  22. BIN resumes/1406636104077-前端选品.xlsx
  23. BIN resumes/1406636252598-前端选品.xlsx
  24. +31 −0 resumes/1406638358722-pcasunzip.js
  25. BIN resumes/1406638443302-前端选品.xlsx
  26. BIN resumes/1406638539510-前端选品.xlsx
  27. 0 resumes/test.md
  28. +83 −0 static/amui-edm.html
  29. BIN static/weidian/che.psd
  30. +19 −0 static/weidian/css/button.css
  31. +89 −0 static/weidian/css/button.default.css
  32. +35 −0 static/weidian/css/dialog.css
  33. +86 −0 static/weidian/css/dialog.default.css
  34. +175 −0 static/weidian/css/slider.css
  35. +214 −0 static/weidian/css/wd.css
  36. +81 −0 static/weidian/detail.html
  37. +76 −0 static/weidian/detail1.html
  38. BIN static/weidian/img/call.png
  39. BIN static/weidian/img/che-1.jpg
  40. BIN static/weidian/img/che.png
  41. BIN static/weidian/img/che1.jpg
  42. BIN static/weidian/img/chelist-1.jpg
  43. BIN static/weidian/img/chelist-2.jpg
  44. BIN static/weidian/img/chelist-3.jpg
  45. BIN static/weidian/img/dark-call.png
  46. BIN static/weidian/img/dian.png
  47. BIN static/weidian/img/drop.png
  48. BIN static/weidian/img/load.gif
  49. BIN static/weidian/img/loading.gif
  50. BIN static/weidian/img/posi.png
  51. BIN static/weidian/img/rightArrow.png
  52. BIN static/weidian/img/san.jpg
  53. BIN static/weidian/img/ui-slider-arrow.png
  54. +49 −0 static/weidian/inc/header.html
  55. +89 −0 static/weidian/inc/map.html
  56. +178 −0 static/weidian/index.html
  57. +313 −0 static/weidian/js/button.js
  58. +282 −0 static/weidian/js/dialog.js
  59. +462 −0 static/weidian/js/slider.js
  60. +8 −0 static/weidian/js/zepto.ect.fn.js
  61. +476 −0 static/weidian/js/zepto.extend.js
  62. +39 −0 static/weidian/js/zepto.highlight.js
  63. +95 −0 static/weidian/js/zepto.imglazyload.js
  64. +1,547 −0 static/weidian/js/zepto.js
  65. +2 −0 static/weidian/js/zepto.min.js
  66. +387 −0 static/weidian/js/zepto.ui.js
  67. +166 −0 static/weidian/navi.html
  68. +174 −0 static/weidian/zhaoche.html
  69. +4 −4 tools/email.coffee
  70. +4 −0 views/header.jade
  71. +21 −1 views/index.jade
  72. +145 −0 views/job/add-resume.jade
  73. +144 −0 views/job/add.jade
  74. +335 −0 views/job/job.jade
  75. +70 −0 views/job/list.jade
  76. +2 −1 views/mail/common.html
  77. +4 −2 views/qa/qa.jade
View
Oops, something went wrong.
View
@@ -41,7 +41,7 @@ body{background:url(../images/bg-repeat.png);background:#e5e5e5;}
#content .btn.gray{background:#f7f7f7;background-image:-moz-linear-gradient(top, #f7f7f7, #f3f3f3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f7f7f7), to(#f3f3f3));background-image:-webkit-linear-gradient(top, #f7f7f7, #f3f3f3);background-image:-o-linear-gradient(top, #f7f7f7, #f3f3f3);background-image:linear-gradient(to bottom, #f7f7f7, #f3f3f3);color:#666;border:1px solid #ddd;}
#content .btn.gray:hover{background:#f7f7f7;}
#content .btn.blue{background:#68a4d1;}
-#content .small-btn{font-size:12px;height:23px;line-height:23px;padding:0 7px;}
+#content .small-btn{font-size:12px;height:21px;line-height:23px;padding:0 7px;}
.group{margin-bottom:10px;}
.group .label{margin:0 5px;}
.pagination{margin-bottom:5px;margin-left:0;}.pagination ul{display:inline-block;}
@@ -839,5 +839,79 @@ body{background:url(../images/bg-repeat.png);background:#e5e5e5;}
#blogs .blog-list .blog .desc{color:#999;line-height:20px;font-size:12px;height:40px;}
#blogs .article-list .article{margin:10px;}#blogs .article-list .article .title{line-height:30px;font-size:14px;}#blogs .article-list .article .title a{color:#444;}
#blogs .article-list .article .desc{color:#aaa;}
+#jobs{font-size:14px;}#jobs .my-resume .item{margin-right:20px;line-height:30px;}#jobs .my-resume .item .key{color:#999;}
+#jobs .my-resume .item .value{color:#444;padding-left:10px;}
+#jobs .my-resume .add-job{border-top:1px solid #eee;padding-top:10px;margin-top:10px;}
+#jobs .job-list-hd{line-height:16px;margin:10px 0;font-size:16px;height:16px;font-weight:100;color:#666;border-left:3px solid #88d1b4;padding-left:8px;margin-top:20px;}
+#jobs .job-list{width:1100px;}#jobs .job-list .job{background:#fff;border-radius:5px;width:325px;display:inline-block;vertical-align:top;margin-right:10px;margin-bottom:10px;border:1px solid #ddd;box-shadow:1px 1px 5px #ddd;overflow:hidden;}#jobs .job-list .job .title{background:#fff;padding:10px;font-size:16px;color:#444;line-height:30px;}#jobs .job-list .job .title a{color:#444;}
+#jobs .job-list .job .title img{width:30px;height:30px;border-radius:50px;float:left;}
+#jobs .job-list .job .title .headpic{margin-right:10px;}
+#jobs .job-list .job .con{padding:10px;line-height:25px;background:#f7f7f7;}#jobs .job-list .job .con .item{margin-right:10px;}#jobs .job-list .job .con .item .key{color:#666;}
+#jobs .job-list .job .con .item .value{color:#999;}
+#jobs .job-list .job .con .count em{color:#999;margin-right:10px;}
+#jobs .job-list .job .user .nick{float:left;font-size:14px;line-height:50px;margin:10px;}
+#job .job-base-info .item{display:inline-block;vertical-align:top;line-height:30px;font-size:14px;width:200px;}#job .job-base-info .item .key{color:#999;}
+#job .job-base-info .item .value{color:#333;margin-left:10px;}
+#job .right .module.count span{font-size:12px;color:#999;padding-right:10px;}
+#job .right .module.count a{font-size:12px;padding-right:10px;}
+#job .right .edithistory .item{color:#999;}
+#job .right .edithistory em{color:#666;font-style:normal;}
+#job .right .item{border-bottom:1px solid #eee;padding:5px 0;}#job .right .item a{color:#6fb79b;}
+#job .main .con-comments{margin-top:10px;}
+#job .main .comment{background:#f7f7f7;padding:10px;}#job .main .comment .comment-list{margin:0;}
+#job .main .comment .comment-item{padding-bottom:5px;}
+#job .main .comment .comment-publish{margin-top:10px;}
+#job .topic-title{border-bottom:1px solid #ddd;}#job .topic-title .title{font-size:20px;line-height:50px;font-weight:normal;margin:0;padding:0;}
+#job .topic-content{padding:10px;font-size:14px;color:#404040;}#job .topic-content h3.con-title{font-size:18px;margin-top:20px;}
+#job .topic-content p{line-height:25px;margin:15px 0;}
+#job .topic-content blockquote p{line-height:25px;margin:0;font-size:12px;}
+#job .topic-content img{border:1px solid #ddd;margin:10px;}
+#job .actions{padding:10px;float:left;padding-left:0;color:#666;font-size:14px;}#job .actions .action{cursor:pointer;color:#666;font-size:13px;line-height:30px;text-decoration:none;height:30px;padding:0 10px;display:inline-block;background:#eee;border-radius:5px;margin-right:10px;}#job .actions .action em{font-style:normal;}
+#job .actions .action span{color:#aaa;font-size:12px;}
+#job .actions .action:hover{background:#dedede;}
+#job .actions i{background:none;font-size:15px;margin-right:5px;color:#aaa;}
+#job .actions i{margin-right:3px;}
+#job .zans .action{color:#666;font-size:13px;line-height:30px;text-decoration:none;height:30px;padding:0 10px;display:inline-block;background:#fff;border-radius:5px;}#job .zans .action em{font-style:normal;}
+#job .zans .action span{color:#aaa;font-size:12px;}
+#job .zans i{background:none;font-size:15px;margin-right:5px;color:#aaa;}
+#job .zans .btn{line-height:28px;}
+#job .zans .zan{background:#f27369;color:#fff;}#job .zans .zan i{background:none;font-size:15px;margin-right:5px;color:#fff;}
+#job .zans .zan span{color:#fff;}
+#job .zans .action{font-size:12px;margin-right:10px;}
+#job .zans .my{margin-left:10px;line-height:30px;}
+#job .zans .fav-list{margin-top:10px;}#job .zans .fav-list a{margin-right:5px;}
+#job .zanlogs a{display:inline-block;}#job .zanlogs a img{margin-top:-2px;width:30px;height:30px;border-radius:30px;margin-right:5px;border:2px solid #fff;box-shadow:1px 1px 2px #ccc;}
+#job .topic-user .action{float:left;}#job .topic-user .action a{line-height:40px;margin-right:10px;color:#999;font-size:14px;}#job .topic-user .action a i{-webkit-transform:scale(0.9);-moz-transform:scale(0.9);}
+#job .topic-user .action .tags a{padding:1px 4px;margin-right:5px;color:#fff;font-weight:normal;font-size:12px;background:#aaa;}
+#job .topic-user .action .tags a:hover{background:#5bb793;}
+#job .topic-user .user{float:right;font-size:12px;}#job .topic-user .user img{width:40px;height:40px;float:left;margin-right:10px;}
+#job .topic-user .user .nick{width:120px;float:left;}#job .topic-user .user .nick em{color:#999;font-weight:bold;font-size:12px;font-style:normal;}
+#job .topic-user .user .time{color:#999;}
+#job .comment-list .comment-item{border-bottom:1px solid #ddd;padding:10px 0;padding-bottom:0;position:relative;}#job .comment-list .comment-item h1,#job .comment-list .comment-item h2,#job .comment-list .comment-item h3,#job .comment-list .comment-item h4,#job .comment-list .comment-item h5{font-size:1.5em;}
+#job .comment-list .comment-item .ans-lou{position:absolute;right:0px;top:0;display:inline;padding:0px 10px;background:#eee;}
+#job .comment-list .comment-item .ans-con{float:left;width:558px;margin-left:10px;font-size:14px;color:#404040;line-height:25px;}#job .comment-list .comment-item .ans-con p{line-height:25px;margin:0;}
+#job .comment-list .comment-item .ans-con blockquote p{line-height:25px;margin:0;font-size:12px;}
+#job .comment-list .comment-item .ans-con .con-hd{font-size:14px;color:#444;}#job .comment-list .comment-item .ans-con .con-hd a,#job .comment-list .comment-item .ans-con .con-hd a:visited{color:#333;font-weight:bold;line-height:25px;font-size:14px;}
+#job .comment-list .comment-item .ans-con .con-hd .hd-time{color:#aaa;line-height:20px;font-size:12px;}
+#job .comment-list .comment-item .ans-con .con-bd{padding:10px 0;}#job .comment-list .comment-item .ans-con .con-bd a{padding:0 5px;}
+#job .comment-list .comment-item .ans-con .con-action a{line-height:30px;color:#999;font-size:12px;margin-right:10px;}#job .comment-list .comment-item .ans-con .con-action a i{-webkit-transform:scale(0.9);-moz-transform:scale(0.9);vertical-align:-1px;background:none;}
+#job .comment-list .comment-item .comment-publish{margin-top:10px;}#job .comment-list .comment-item .comment-publish textarea{height:60px;}
+#job .comment-list .comment-item .con-comments{margin-top:10px;background:#f3f3f3;padding:10px;border-radius:5px;}#job .comment-list .comment-item .con-comments .comment-list{font-size:12px;}#job .comment-list .comment-item .con-comments .comment-list .comment-item{border-bottom:1px dashed #ddd;padding:8px 0;}#job .comment-list .comment-item .con-comments .comment-list .comment-item .content{color:#666;}
+#job .comment-list .comment-item .con-comments .comment-list .comment-item .time{padding-left:10px;color:#999;}
+#job .comment-list .comment-item .con-comments .comment-list .comment-item .reply{display:none;cursor:pointer;}
+#job .comment-list .comment-item .con-comments .comment-list .comment-item:hover .reply{display:inline;}
+#job .comment-list .comment-item .con-comments .more{line-height:30px;font-size:12px;color:#6fb79b;}
+#job .comment-list .comment-item .ans-user{float:left;padding-top:3px;width:40px;}#job .comment-list .comment-item .ans-user .zan{margin-top:10px;background:#efefef;border:1px solid #eee;width:38px;height:40px;display:inline-block;border-radius:3px;text-align:center;overflow:hidden;}#job .comment-list .comment-item .ans-user .zan em{display:block;font-style:normal;line-height:25px;color:#999;}
+#job .comment-list .comment-item .ans-user .zan i{display:block;margin-top:-1px;margin-left:10px;width:0;height:0;border-width:8px 8px;border-style:solid;border-color:#efefef #efefef #5bb793 #efefef;}
+#job .comment-list .comment-item .ans-user .zan:hover{background:#5bb793;}#job .comment-list .comment-item .ans-user .zan:hover em{color:#fff;}
+#job .comment-list .comment-item .ans-user .zan:hover i{border-color:#5bb793 #5bb793 #ffffff #5bb793;}
+#job .comment-list .comment-item .ans-user img{border-radius:5px;}
+#job .comment-list .comment-item .ans-user .user{color:#666;display:block;}
+#job .comment-list .comment-item .ans-user .nick,#job .comment-list .comment-item .ans-user .time{width:120px;text-align:left;margin-left:40px;padding-left:10px;}
+#job .comment-list .comment-item .ans-user .time{color:#999;}
+#job .comment-list .comment-item .ans-user img{width:40px;height:40px;border-radius:50px;border:1px solid #fff;box-shadow:0px 0px 3px #aaa;}
+#job .publish legend{margin:0;}
+#job .publish .control-group{margin-top:10px;}
+#job .publish .fake-form{padding-top:10px;}#job .publish .fake-form textarea{width:600px;border-radius:3px;}
code .comment{background:none !important;}
@media screen and (min-width:100px) and (max-width:800px){#googlead{display:none !important;} .ad-tip{display:none;} .ujian-hook{display:none;} #gotop{right:10px;bottom:10px;} #coin-fixed{display:none;} .wxqcode{display:none;} #article .other-articles{width:100%;padding:0 !important;margin:0;} #article .other-articles span{display:none;} #article .writer-and-column{width:100%;} #article .writer-and-column .writer,#article .writer-and-column .column{width:100%;float:none;padding-bottom:20px;} .content{width:96% !important;padding:0 2% !important;} #content textarea{width:100% !important;} #content .wmd-panel .btn-group{margin-bottom:5px;margin-left:0px;margin-right:5px;} #content fieldset{width:100% !important;} #content #wmd-input,#content #wmd-preview-con{width:100% !important;} .modal{width:300px;margin-left:-150px;} #content,#header,#footer{width:100% !important;}#content .left,#header .left,#footer .left{width:100% !important;} #content .right,#header .right,#footer .right{width:100% !important;margin-left:0 !important;}#content .right .module,#header .right .module,#footer .right .module{margin-left:0 !important;} #content .module,#header .module,#footer .module{padding:10px;} #content .wrapper,#header .wrapper,#footer .wrapper{width:100% !important;} #content .main,#header .main,#footer .main{width:100% !important;} .navbar .container{width:100% !important;} #index .timeline-item .others{margin-top:10px;} #index .timeline-item .entry-foot{line-height:25px;} #index .timeline-item .item{line-height:14px;} #index .timeline-item .time{display:block;} #index .mod .bd{overflow:hidden;width:100% !important;} #index .mod .item{width:auto;float:none;display:block;} #index .recent_articles .columns .column{width:95%;} #index #content .search input{width:70%;} #index #content .search button{width:27%;} #index .mod .bd{width:110%;} #index .tags,#index .topic_tags{width:auto;} #index .recent_articles .columns{width:auto;} #header .navbar li[pageId="4"]{display:none !important;} #header .navbar li[pageId="5"]{display:none !important;} #header .navbar li[pageId="2"]{display:none !important;} #header .navbar li[pageId="9"]{display:none !important;} #header .navbar li.sub-trigger{display:none !important;} #header .navbar i{display:none;} #articles .column-item{width:90% !important;} #articles .jian{display:none;} #cards .f2er-list{width:100% !important;}#cards .f2er-list li{width:90% !important;margin:10px 0 !important;padding:5%;} #qas .actions .right-actions{display:none;} #article{padding:0;}#article .title{overflow:hidden;}#article .title .wrapper{padding:10px;}#article .title .wrapper h2{width:98%;} #article article{width:98%;} #article .comment{width:100%;padding:0;}#article .comment .wrapper{width:auto;} #article #comment{width:auto !important;} #article .artivle_nav{display:none !important;} #articles .my_columns .bd{width:auto;} #articles .columns{width:auto;}#articles .columns .column{width:100%;overflow:hidden;} #header .search{display:none;} #topics .head .publish-tip{height:auto;} #qa #content .answer-list .answer-item .ans-user{width:100%;margin-bottom:10px;} #qa #content .answer-list .answer-item .ans-user a{margin-top:0;display:inline-block;vertical-align:top;margin-right:10px;width:38px;height:40px;line-height:40px;} #qa .answer-list .answer-item .ans-con{margin:0 !important;width:auto !important;}}
@@ -332,7 +332,7 @@ box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
}
.small-btn{
font-size: 12px;
- height:23px;
+ height:21px;
line-height: 23px;
padding: 0 7px;
}
@@ -1342,5 +1342,6 @@ margin:100px auto;
@import 'talk.less';
@import 'topic.less';
@import 'blog.less';
+@import 'job.less';
code .comment{background: none !important;}
@import 'mobile.less';
View
Oops, something went wrong.
@@ -90,6 +90,12 @@ module.exports.controllers =
action_name:"【评论】了您的问题"
target_path_name:question.title
content:req.body.html
+ if question.user_id!=res.locals.user.id
+ func_user.getById question.user_id,(error,user)->
+ func_email.sendMessage user.email,
+ title:res.locals.user.nick+"评论了您的提问《"+question.title+""
+ content:req.body.html
+ url:"http://www.html-js.com/qa/"+question.id
else if match = req.body.target_id.match(/^act_([0-9]*)$/)
(__F 'act').addCount(match[1],"comment_count")
console.log req.body
@@ -248,6 +248,36 @@ module.exports.controllers =
else
result.info = "错误的图片文件"
res.send result
+ "/upload_resume":
+ "post":(req,res,next)->
+ result =
+ success:0
+ info:""
+ pack = req.files['file']
+ if pack
+ sourcePath = pack.path
+ pack_name = (new Date()).getTime()+"-"+pack.name
+ targetPath = config.resume_path+pack_name
+ fs.rename sourcePath, targetPath, (err) ->
+
+ upyun = new UPYun(config.upyun_bucketname, config.upyun_username, config.upyun_password)
+ fileContent = fs.readFileSync(targetPath)
+ md5Str = md5(fileContent)
+ upyun.setContentMD5(md5Str)
+ upyun.setFileSecret('bac')
+ upyun.writeFile '/uploads/'+pack_name, fileContent, false,(error, data)->
+ if error
+ result.info = error.message
+ res.send result
+ return
+ else
+ result.success = 1
+ result.data =
+ filename:"http://htmljs.b0.upaiyun.com/uploads/"+pack_name
+ res.send result
+ else
+ result.info = "错误的图片文件"
+ res.send result
"/online_to_local":
"post":(req,res,next)->
result =
@@ -370,8 +400,10 @@ module.exports.filters =
get:['freshLogin',
"index/actives",
"index/recent_articles",
+ "index/recent_questions"
"index/recent_topics",
'index/recent_columns',
+ 'index/all_tags',
'index/all_topic_tags',
'article/checkRss',
'index/recent_users',
@@ -0,0 +1,74 @@
+func_job = __F 'job/job'
+func_resume = __F 'job/resume'
+func_comment = __F 'job/comment'
+pagedown = require("pagedown")
+safeConverter =new pagedown.Converter()
+pagedown.Extra.init(safeConverter);
+config = require './../config.coffee'
+Sina=require("./../lib/sdk/sina.js")
+sina=new Sina(config.sdks.sina)
+module.exports.controllers =
+ "/":
+ get:(req,res,next)->
+ res.render 'job/list'
+ "/add":
+ get:(req,res,next)->
+ res.render 'job/add'
+ post:(req,res,next)->
+ func_job.add req.body,(error,job)->
+ if error
+ next error
+ else
+ res.redirect '/job'
+ "/:id":
+ get:(req,res,next)->
+ func_job.getById req.params.id,(error,job)->
+ if error then next error
+ else
+ res.locals.job = job
+ res.render 'job/job'
+ "/:id/add":
+ post:(req,res,next)->
+ req.body.html = safeConverter.makeHtml req.body.md
+ req.body.user_id = res.locals.user.id
+ req.body.user_headpic = res.locals.user.head_pic
+ req.body.user_nick = res.locals.user.nick
+ req.body.job_id = req.params.id
+ func_comment.add req.body,(error,commment)->
+ if error
+ res.send
+ success:0
+ info:error.message
+ else
+ res.send
+ success:1
+ "/resume/add":
+ get:(req,res,next)->
+ res.render 'job/add-resume'
+ post:(req,res,next)->
+ func_resume.add req.body,(error,resume)->
+ if error
+ next error
+ else
+ res.redirect '/job'
+ "/resume/edit/:id":
+ get:(req,res,next)->
+ func_resume.getById req.params.id,(error,resume)->
+ if error then next error
+ else
+ res.locals.resume = resume
+ res.render 'job/add-resume'
+
+module.exports.filters =
+ "/":
+ get:['freshLogin','job/all-publish-jobs','job/check-resume']
+ "/add":
+ get:['checkLogin']
+ "/:id":
+ get:['freshLogin',"job/comments"]
+ "/:id/add":
+ post:['checkLogin']
+ "/resume/add":
+ get:['checkLogin']
+ "/resume/edit/:id":
+ get:["checkLogin"]
@@ -114,6 +114,7 @@ module.exports.controllers =
func_email.sendMessage u.email,
title:res.locals.user.nick+"回复了您发起的话题《"+topic.title+""
content:req.body.html
+ url:"http://www.html-js.com/topic/"+topic.id
if atnames = req.body.md.match(/\@([^\s]*)/g)
atcount = atnames.length
html = req.body.html
@@ -139,6 +140,7 @@ module.exports.controllers =
func_email.sendMessage user.email,
title:res.locals.user.nick+"在《"+topic.title+"》回帖中【提到】了你"
content:req.body.html
+ url:"http://www.html-js.com/topic/"+topic.id
if req.body.to_weibo
sina.statuses.update
access_token:res.locals.user.weibo_token
@@ -0,0 +1,18 @@
+func_job = __F 'job/job'
+
+module.exports = (req,res,next)->
+ condition =
+ is_publish:1
+ page = req.query.page || 1
+ count = req.query.count || 20
+ func_job.count condition,(error,_count)->
+ if error then next error
+ else
+ res.locals.total=_count
+ res.locals.totalPage=Math.ceil(_count/count)
+ res.locals.page = (req.query.page||1)
+ func_job.getAll page,count,condition,'sort desc,id desc',(error,jobs)->
+ if error then next error
+ else
+ res.locals.jobs = jobs
+ next()
@@ -0,0 +1,11 @@
+module.exports = (req,res,next)->
+ if res.locals.user
+
+ (__F 'job/resume').getByField "user_id",res.locals.user.id,(error,resume)->
+ if error
+ next error
+ else
+ res.locals.resume = resume
+ next()
+ else
+ next()
Oops, something went wrong.

0 comments on commit 778b034

Please sign in to comment.