2008-01-10 08:33:19 +00:00
|
|
|
from Tags import Div, Span, H3, P, A, Table, Tr, Th, Td, Br, Img
|
|
|
|
|
|
|
|
|
|
|
|
class Upgrade_note( Span ):
|
2008-01-10 23:15:37 +00:00
|
|
|
def __init__( self, rate_plans, unsubscribe_button, https_url, user ):
|
2008-01-10 08:33:19 +00:00
|
|
|
MEGABYTE = 1024 * 1024
|
|
|
|
|
|
|
|
Span.__init__(
|
|
|
|
self,
|
|
|
|
H3( u"upgrade your wiki" ),
|
|
|
|
P(
|
|
|
|
"""
|
2008-01-10 20:58:31 +00:00
|
|
|
Use of your personal wiki is completely free. But if you upgrade your
|
2008-02-20 20:45:39 +00:00
|
|
|
Luminotes account, you'll also get more storage space and powerful
|
|
|
|
notebook sharing features so that you and your friends can all
|
|
|
|
collaborate on your wiki notebook.
|
2008-01-10 08:33:19 +00:00
|
|
|
""",
|
|
|
|
),
|
|
|
|
P(
|
|
|
|
Table(
|
2008-01-10 21:11:45 +00:00
|
|
|
self.fee_row( rate_plans, user ),
|
2008-01-10 08:33:19 +00:00
|
|
|
Tr(
|
|
|
|
Td( u"included storage space", class_ = u"feature_name" ),
|
|
|
|
[ Td(
|
|
|
|
plan[ u"storage_quota_bytes" ] // MEGABYTE, " MB",
|
|
|
|
) for plan in rate_plans ],
|
|
|
|
),
|
|
|
|
Tr(
|
|
|
|
Td( u"unlimited wiki notebooks", class_ = u"feature_name" ),
|
|
|
|
[ Td(
|
|
|
|
Img( src = u"/static/images/check.png", width = u"20", height = u"17" ),
|
|
|
|
) for plan in rate_plans ],
|
|
|
|
),
|
|
|
|
Tr(
|
|
|
|
Td( u"friendly email support", class_ = u"feature_name" ),
|
|
|
|
[ Td(
|
|
|
|
Img( src = u"/static/images/check.png", width = u"20", height = u"17" ),
|
|
|
|
) for plan in rate_plans ],
|
|
|
|
),
|
|
|
|
Tr(
|
|
|
|
Td( u"multi-user collaboration", class_ = u"feature_name" ),
|
|
|
|
[ Td(
|
|
|
|
plan[ u"notebook_collaboration" ] and
|
|
|
|
Img( src = u"/static/images/check.png", width = u"20", height = u"17" ) or u" ",
|
|
|
|
) for plan in rate_plans ],
|
|
|
|
),
|
|
|
|
Tr(
|
|
|
|
Td( u"wiki access control", class_ = u"feature_name" ),
|
|
|
|
[ Td(
|
|
|
|
plan[ u"notebook_collaboration" ] and
|
|
|
|
Img( src = u"/static/images/check.png", width = u"20", height = u"17" ) or u" ",
|
|
|
|
) for plan in rate_plans ],
|
|
|
|
),
|
|
|
|
border = u"1",
|
|
|
|
id = u"upgrade_table",
|
|
|
|
),
|
2008-01-10 21:11:45 +00:00
|
|
|
( not user ) and P(
|
2008-01-10 08:33:19 +00:00
|
|
|
u"To upgrade your Luminotes account, please",
|
|
|
|
A( u"login", href = https_url + u"/login?after_login=/upgrade", target = u"_top" ),
|
|
|
|
u"first!",
|
|
|
|
id = u"upgrade_login_text",
|
|
|
|
) or None,
|
|
|
|
id = u"upgrade_table_area",
|
|
|
|
),
|
|
|
|
|
2008-01-11 22:55:04 +00:00
|
|
|
user and P(
|
2008-01-10 21:11:45 +00:00
|
|
|
u"You're currently subscribed to Luminotes %s." %
|
|
|
|
rate_plans[ user.rate_plan ][ u"name" ].capitalize(),
|
2008-01-11 22:55:04 +00:00
|
|
|
( user.rate_plan > 0 ) and unsubscribe_button or None,
|
2008-01-10 21:11:45 +00:00
|
|
|
) or None,
|
|
|
|
|
2008-01-10 08:33:19 +00:00
|
|
|
H3( u"share your notebook" ),
|
|
|
|
P(
|
|
|
|
A(
|
|
|
|
Img(
|
|
|
|
src = u"/static/images/share_thumb.png",
|
|
|
|
class_ = u"thumbnail_right",
|
|
|
|
width = u"200",
|
|
|
|
height = u"200",
|
|
|
|
),
|
|
|
|
href = u"/static/images/share.png",
|
|
|
|
target = u"_new",
|
|
|
|
),
|
|
|
|
u"""
|
|
|
|
Most of the time, you want to keep your personal wiki all to yourself. But
|
|
|
|
sometimes you simply need to share your work with friends and colleagues.
|
|
|
|
""",
|
|
|
|
),
|
|
|
|
P(
|
|
|
|
u"""
|
|
|
|
With an upgraded Luminotes account, you'll be able to invite specific people
|
|
|
|
to collaborate on your wiki simply by entering their email addresses. You can
|
2008-01-18 23:24:42 +00:00
|
|
|
even give them full editing capabilities, so several people can contribute.
|
2008-01-15 08:14:45 +00:00
|
|
|
And you can invite as many people as you want to collaborate on your wiki.
|
|
|
|
They only need to sign up for a free Luminotes account to particpate.
|
2008-01-10 08:33:19 +00:00
|
|
|
"""
|
|
|
|
),
|
|
|
|
H3( u"wiki access control" ),
|
|
|
|
P(
|
|
|
|
A(
|
|
|
|
Img(
|
|
|
|
src = u"/static/images/access_thumb.png",
|
|
|
|
class_ = u"thumbnail_left",
|
|
|
|
width = u"200",
|
|
|
|
height = u"200",
|
|
|
|
),
|
|
|
|
href = u"/static/images/access.png",
|
|
|
|
target = u"_new",
|
|
|
|
),
|
|
|
|
u"""
|
|
|
|
With an upgraded Luminotes wiki, you'll decide exactly how much access to give
|
|
|
|
people. Collaborators can make changes to your notebook, while viewers can
|
|
|
|
only read your wiki. And owners have the same complete access to your notebook
|
|
|
|
that you do. When you're done collaborating, a single click revokes a user's
|
|
|
|
notebook access.
|
|
|
|
""",
|
|
|
|
),
|
|
|
|
P(
|
|
|
|
u"""
|
|
|
|
Your wiki access control works on a per-notebook basis, so you can easily
|
|
|
|
share one notebook with your friends while keeping your other notebooks
|
|
|
|
completely private.
|
|
|
|
""",
|
|
|
|
),
|
|
|
|
H3( u"additional storage space" ),
|
|
|
|
P(
|
|
|
|
u"""
|
|
|
|
An upgraded Luminotes account gets you more than just notebook sharing
|
|
|
|
features. You'll also be treated to way more room for your personal wiki. That
|
2008-02-20 20:45:39 +00:00
|
|
|
means you'll have more space for your notes and files, and you won't have to
|
2008-01-10 08:33:19 +00:00
|
|
|
worry about running out of room anytime soon.
|
|
|
|
""",
|
|
|
|
),
|
|
|
|
H3( u"no questions asked money-back guarantee" ),
|
|
|
|
P(
|
|
|
|
u"""
|
|
|
|
If you upgrade your Luminotes account and find that it's not meeting your
|
|
|
|
needs, then simply request a refund within 30 days and your money will be
|
|
|
|
returned in full without any questions.
|
|
|
|
"""
|
|
|
|
),
|
|
|
|
P(
|
|
|
|
u"""
|
|
|
|
And no matter how long you've been using an upgraded Luminotes account, you
|
|
|
|
can cancel online anytime. You won't have to send email or talk to anyone in a
|
|
|
|
call center. If you do cancel, you keep all of your wiki notebooks and simply
|
|
|
|
return to a free account.
|
|
|
|
""",
|
|
|
|
),
|
|
|
|
P(
|
|
|
|
Table(
|
2008-01-10 21:11:45 +00:00
|
|
|
self.fee_row( rate_plans, user, include_blank = False ),
|
2008-01-10 08:33:19 +00:00
|
|
|
Tr(
|
|
|
|
[ Td(
|
|
|
|
plan[ u"storage_quota_bytes" ] // MEGABYTE, " MB",
|
|
|
|
) for plan in rate_plans ],
|
|
|
|
),
|
|
|
|
border = u"1",
|
|
|
|
id = u"upgrade_table_small",
|
|
|
|
),
|
2008-01-10 21:11:45 +00:00
|
|
|
( not user ) and P(
|
2008-01-10 08:33:19 +00:00
|
|
|
u"Please",
|
|
|
|
A( u"login", href = https_url + u"/login?after_login=/upgrade", target = u"_top" ),
|
|
|
|
u"to upgrade your wiki!",
|
|
|
|
id = u"upgrade_login_text",
|
|
|
|
) or None,
|
|
|
|
id = u"upgrade_table_area",
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
2008-01-10 21:11:45 +00:00
|
|
|
def fee_row( self, rate_plans, user, include_blank = True ):
|
2008-01-10 08:33:19 +00:00
|
|
|
return Tr(
|
|
|
|
include_blank and Th( u" " ) or None,
|
|
|
|
[ Th(
|
|
|
|
plan[ u"name" ].capitalize(),
|
|
|
|
plan[ u"fee" ] and Div(
|
|
|
|
Span(
|
|
|
|
u"$%s" % plan[ u"fee" ],
|
|
|
|
Span( u"/month", class_ = u"month_text" ),
|
|
|
|
class_ = u"price_text",
|
|
|
|
separator = u"",
|
|
|
|
),
|
2008-01-22 22:08:09 +00:00
|
|
|
user and user.rate_plan != index and plan.get( u"button" ).strip() and plan.get( u"button" ) % user.object_id or None,
|
2008-01-10 08:33:19 +00:00
|
|
|
) or None,
|
|
|
|
class_ = u"plan_name",
|
2008-01-10 21:11:45 +00:00
|
|
|
) for ( index, plan ) in enumerate( rate_plans ) ],
|
2008-01-10 08:33:19 +00:00
|
|
|
)
|