Now only making the subscription plan name into a link to the sign up page if the user is not yet signed up!
This commit is contained in:
parent
bbe9d17940
commit
848a00d692
3
NEWS
3
NEWS
|
@ -1,3 +1,6 @@
|
||||||
|
1.5.13: January ??, 2009
|
||||||
|
* Fixed various bugs related to online subscription processing.
|
||||||
|
|
||||||
1.5.12: December 30, 2008
|
1.5.12: December 30, 2008
|
||||||
* Fixed a bug in which clicking on the notebook rename text field ended the
|
* Fixed a bug in which clicking on the notebook rename text field ended the
|
||||||
renaming prematurely.
|
renaming prematurely.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
VERSION = u"1.5.12"
|
VERSION = u"1.5.13"
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Upgrade_page( Product_page ):
|
||||||
),
|
),
|
||||||
P(
|
P(
|
||||||
Table(
|
Table(
|
||||||
self.fee_row( rate_plans ),
|
self.fee_row( rate_plans, user ),
|
||||||
self.spacer_row( rate_plans ),
|
self.spacer_row( rate_plans ),
|
||||||
Tr(
|
Tr(
|
||||||
[ Td(
|
[ Td(
|
||||||
|
@ -225,7 +225,7 @@ class Upgrade_page( Product_page ):
|
||||||
class_ = u"upgrade_subtitle",
|
class_ = u"upgrade_subtitle",
|
||||||
),
|
),
|
||||||
Table(
|
Table(
|
||||||
self.fee_row( rate_plans, yearly = True ),
|
self.fee_row( rate_plans, user, yearly = True ),
|
||||||
self.spacer_row( rate_plans ),
|
self.spacer_row( rate_plans ),
|
||||||
Tr(
|
Tr(
|
||||||
[ Td(
|
[ Td(
|
||||||
|
@ -276,31 +276,41 @@ class Upgrade_page( Product_page ):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
def fee_row( self, rate_plans, yearly = False ):
|
def fee_row( self, rate_plans, user, yearly = False ):
|
||||||
|
def make_fee_area( plan, index ):
|
||||||
|
fee_area = (
|
||||||
|
Span( plan[ u"name" ].capitalize(), class_ = u"plan_name" ),
|
||||||
|
plan[ u"fee" ] and Div(
|
||||||
|
yearly and Span(
|
||||||
|
u"$%s" % plan[ u"yearly_fee" ],
|
||||||
|
Span( u"/year", class_ = u"month_text" ),
|
||||||
|
class_ = u"price_text",
|
||||||
|
separator = u"",
|
||||||
|
) or Div(
|
||||||
|
u"$%s" % plan[ u"fee" ],
|
||||||
|
Span( u"/month", class_ = u"month_text" ),
|
||||||
|
class_ = u"price_text",
|
||||||
|
separator = u"",
|
||||||
|
),
|
||||||
|
) or Div( Div( u"No fee", class_ = u"price_text" ) ),
|
||||||
|
Div(
|
||||||
|
u"For", plan[ u"designed_for" ],
|
||||||
|
class_ = u"small_text",
|
||||||
|
),
|
||||||
|
( index == self.FOCUSED_PLAN ) and Div( u"Best value", class_ = u"focused_text highlight" ) or None,
|
||||||
|
)
|
||||||
|
|
||||||
|
# if this is a demo/guest user, then make the fee area a big link to the sign up page
|
||||||
|
if not user or user.username in ( u"anonymous", None ):
|
||||||
|
fee_area = A( href = u"/sign_up?plan=%s&yearly=%s" % ( index, yearly ), *fee_area )
|
||||||
|
else:
|
||||||
|
fee_area = Span( *fee_area )
|
||||||
|
|
||||||
|
return fee_area
|
||||||
|
|
||||||
return Tr(
|
return Tr(
|
||||||
[ Th(
|
[ Th(
|
||||||
A(
|
make_fee_area( plan, index ),
|
||||||
Span( plan[ u"name" ].capitalize(), class_ = u"plan_name" ),
|
|
||||||
plan[ u"fee" ] and Div(
|
|
||||||
yearly and Span(
|
|
||||||
u"$%s" % plan[ u"yearly_fee" ],
|
|
||||||
Span( u"/year", class_ = u"month_text" ),
|
|
||||||
class_ = u"price_text",
|
|
||||||
separator = u"",
|
|
||||||
) or Div(
|
|
||||||
u"$%s" % plan[ u"fee" ],
|
|
||||||
Span( u"/month", class_ = u"month_text" ),
|
|
||||||
class_ = u"price_text",
|
|
||||||
separator = u"",
|
|
||||||
),
|
|
||||||
) or Div( Div( u"No fee", class_ = u"price_text" ) ),
|
|
||||||
Div(
|
|
||||||
u"For", plan[ u"designed_for" ],
|
|
||||||
class_ = u"small_text",
|
|
||||||
),
|
|
||||||
( index == self.FOCUSED_PLAN ) and Div( u"Best value", class_ = u"focused_text highlight" ) or None,
|
|
||||||
href = u"/sign_up?plan=%s&yearly=%s" % ( index, yearly ),
|
|
||||||
),
|
|
||||||
class_ = u"plan_name_area plan_width" + ( index == self.FOCUSED_PLAN and u" focused_plan_name_area" or u"" ),
|
class_ = u"plan_name_area plan_width" + ( index == self.FOCUSED_PLAN and u" focused_plan_name_area" or u"" ),
|
||||||
) for ( index, plan ) in enumerate( rate_plans ) ],
|
) for ( index, plan ) in enumerate( rate_plans ) ],
|
||||||
)
|
)
|
||||||
|
|
Reference in New Issue