Fixed backwards Approved button and candidate time sort.

This commit is contained in:
Nick Winter 2014-06-07 19:58:06 -06:00
parent 3aaf02446d
commit cefeb1df14
2 changed files with 3 additions and 2 deletions

View file

@ -27,7 +27,7 @@ block content
i.icon-eye-close
span(data-i18n="account_profile.inactive") Not looking for offers right now
if profile && (profile.active || me.isAdmin())
if !profileApproved
if profileApproved
button.btn.btn-success#toggle-job-profile-approved(disabled=!me.isAdmin())
i.icon-eye-open
span(data-i18n='account_profile.approved') Approved

View file

@ -94,6 +94,7 @@ module.exports = class EmployersView extends View
for s in [a, b]
n = parseInt s
n = 0 unless _.isNumber n
n = 1 if /^a/.test s
for [duration, factor] in [
[/second/i, 1 / (86400 * 1000)]
[/minute/i, 1 / 1440]
@ -182,7 +183,7 @@ module.exports = class EmployersView extends View
oldState = _.cloneDeep window.history.state ? {}
oldState["lastViewedCandidateID"] = id
window.history.replaceState(oldState,"")
else
else
window.location.hash = id
url = "/account/profile/#{id}"
window.open url,"_blank"