From 31e7b36310f8484c4523a93c5e0be66a13783391 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Mon, 30 Nov 2015 09:19:53 -0800 Subject: [PATCH 1/2] Add link to /acccount/subscription from /account/settings --- app/locale/en.coffee | 1 + app/templates/account/account-settings-view.jade | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/app/locale/en.coffee b/app/locale/en.coffee index f4bf0114f..0b18b4e42 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -747,6 +747,7 @@ password_tab: "Password" emails_tab: "Emails" admin: "Admin" + manage_subscription: "Click here to manage your subscription." new_password: "New Password" new_password_verify: "Verify" type_in_email: "Type in your email to confirm account deletion." diff --git a/app/templates/account/account-settings-view.jade b/app/templates/account/account-settings-view.jade index b4d203557..cabc1d8c9 100644 --- a/app/templates/account/account-settings-view.jade +++ b/app/templates/account/account-settings-view.jade @@ -26,6 +26,15 @@ else .form-group.checkbox label(for="godmode", data-i18n="account_settings.god_mode") God Mode input#godmode(name="godmode", type="checkbox", checked=godmode) + if me.hasSubscription() + .form-group + label(data-i18n="account.subscription") + br + span.spr ✓ + span(data-i18n="account.active") + span.spr= '.' + // TODO: show better summary states, like active, subscribed, free, and active until. + a(href="/account/subscription", data-i18n="account_settings.manage_subscription") .panel.panel-default From a851b7129a7cbc62cb635e8b45aa4ff2a7a61956 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Mon, 30 Nov 2015 10:41:57 -0800 Subject: [PATCH 2/2] :bug:Fix teacher course management null check --- app/views/courses/TeacherCoursesView.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/TeacherCoursesView.coffee b/app/views/courses/TeacherCoursesView.coffee index 516c0d170..a628376b6 100644 --- a/app/views/courses/TeacherCoursesView.coffee +++ b/app/views/courses/TeacherCoursesView.coffee @@ -162,7 +162,7 @@ module.exports = class TeacherCoursesView extends RootView user = @usersToRedeem.first() - prepaid = @prepaids.find((prepaid) -> prepaid.get('properties').endDate? and prepaid.openSpots()) + prepaid = @prepaids.find((prepaid) -> prepaid.get('properties')?.endDate? and prepaid.openSpots()) prepaid = @prepaids.find((prepaid) -> prepaid.openSpots()) unless prepaid $.ajax({ method: 'POST'