This commit is contained in:
jysperm
2014-11-16 01:38:02 +08:00
parent b7006d588e
commit 91a5b0ea2c
8 changed files with 11 additions and 17 deletions

View File

@@ -78,10 +78,11 @@
vi /etc/supervisor/conf.d/rpadmin.conf
[program:RootPanel]
command=node /home/rpadmin/RootPanel/start.js
autorestart=true
command = coffee /home/rpadmin/RootPanel/app.coffee
directory = /home/rpadmin/RootPanel
autorestart = true
redirect_stderr = true
user=rpadmin
user = rpadmin
service nginx restart
service mongodb restart

View File

@@ -35,7 +35,7 @@ CouponCode = mongoose.Schema
CouponCode.plugin mongooseUniqueValidator,
message: 'unique_validation_error'
exports.coupons_meta = coupons_meta =
config.coupons_meta = coupons_meta =
amount:
validate: (account, coupon, callback) ->
apply_log = _.find coupon.apply_log, (item) ->

View File

@@ -1,6 +1,7 @@
{express, async, _} = app.libs
{requireAdminAuthenticate} = app.middleware
{Account, Ticket, Financials, CouponCode} = app.models
{config} = app
module.exports = exports = express.Router()
@@ -10,7 +11,7 @@ exports.get '/', (req, res) ->
Account.find {}, (err, accounts) ->
return res.render 'admin',
accounts: accounts
coupon_code_types: _.keys CouponCode.coupons_meta
coupon_code_types: _.keys config.coupons_meta
exports.get '/ticket', (req, res) ->
LIMIT = 10

View File

@@ -8,9 +8,7 @@ $ ->
$('.action-use').click ->
code = $('.form-coupon .input-coupon_code').val()
request '/coupon/info',
code: code
, (result) ->
request "/coupon/info?code=#{code}", {}, {method: 'get'}, (result) ->
if window.confirm result.message
request '/coupon/apply',
code: code

View File

@@ -8,9 +8,3 @@
text-align: right;
margin-right: 50px;
}
#sidebar {
a.btn {
width: 90px;
}
}

View File

@@ -3,6 +3,6 @@
<hr />
Created by <%= account.username %> at <%= ticket.created_at %>, View ticket:
<a href='<%= config.web.url %>/ticket/view/?id=<%= ticket._id %>'><%= ticket._id %></a>
<a href='<%= config.web.url %>/ticket/view/<%= ticket._id %>'><%= ticket._id %></a>
<br />
Notice from <%= t(config.web.t_name) %>.

View File

@@ -3,6 +3,6 @@
<hr />
Replied by <%= account.username %> at <%= reply.created_at %>, View ticket:
<a href='<%= config.web.url %>/ticket/view/?id=<%= ticket._id %>'><%= ticket._id %></a>
<a href='<%= config.web.url %>/ticket/view/<%= ticket._id %>'><%= ticket._id %></a>
<br />
Notice from <%= t(config.web.t_name) %>.

View File

@@ -30,7 +30,7 @@ module.exports =
plans:
sample:
t_name: 'plans.sample.name'
t_description: 'plans.sample.name.description'
t_description: 'plans.sample.description'
billing_by_time:
unit: 24 * 3600 * 1000