From a36bc1c86379f919c40968e130cdcd45219dbe71 Mon Sep 17 00:00:00 2001 From: jysperm Date: Thu, 20 Nov 2014 06:23:47 +0800 Subject: [PATCH] fixbugs --- core/middleware.coffee | 7 ++++++- core/view/panel/financials.jade | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/middleware.coffee b/core/middleware.coffee index fc9bd44..d1d2db3 100644 --- a/core/middleware.coffee +++ b/core/middleware.coffee @@ -69,7 +69,12 @@ exports.accountHelpers = (req, res, next) -> t: app.i18n.getTranslator req moment: -> - return moment.apply(@, arguments).locale(res.language).tz(res.timezone) + if res.language and res.language != 'auto' + return moment.apply(@, arguments).locale(res.language).tz(res.timezone) + else if res.timezone + return moment.apply(@, arguments).tz(res.timezone) + else + return moment.apply(@, arguments) _.extend req, res: res diff --git a/core/view/panel/financials.jade b/core/view/panel/financials.jade index e908da3..03f98fd 100644 --- a/core/view/panel/financials.jade +++ b/core/view/panel/financials.jade @@ -1,7 +1,7 @@ extends ../layout prepend header - title #{t('common.financials')} | #{t(config.web.t_name)} + title #{t('account.financials')} | #{t(config.web.t_name)} block main .row @@ -33,9 +33,9 @@ block main table.table.table-hover thead tr - td= t('common.time') - td= t('common.details') - td= t('common.amount') + th= t('common.time') + th= t('common.details') + th= t('common.amount') tbody for item in billing_log tr