witten
/
luminotes
Archived
1
0
Fork 0

Added new notebook_sharing rate plan config option to control whether the user can share notebooks at all.

This commit is contained in:
Dan Helfman 2008-08-20 17:05:21 -07:00
parent f5b0839e4b
commit 7d8240f7be
6 changed files with 23 additions and 10 deletions

3
NEWS
View File

@ -1,3 +1,6 @@
1.4.27:
*
1.4.26: August 20, 2008:
* Ported all database code to support SQLite in addition to the existing
PostgreSQL support. This is a necessary first step for Luminotes Desktop.

View File

@ -32,6 +32,7 @@ settings = {
"designed_for": "students",
"storage_quota_bytes": 30 * MEGABYTE,
"included_users": 1,
"notebook_sharing": True,
"notebook_collaboration": False,
"user_admin": False,
"fee": None,
@ -42,6 +43,7 @@ settings = {
"designed_for": "home users",
"storage_quota_bytes": 250 * MEGABYTE,
"included_users": 1,
"notebook_sharing": True,
"notebook_collaboration": True,
"user_admin": False,
"fee": 5,
@ -58,6 +60,7 @@ settings = {
"designed_for": "professionals",
"storage_quota_bytes": 500 * MEGABYTE,
"included_users": 1,
"notebook_sharing": True,
"notebook_collaboration": True,
"user_admin": False,
"fee": 9,
@ -74,6 +77,7 @@ settings = {
"designed_for": "small teams",
"storage_quota_bytes": 1000 * MEGABYTE,
"included_users": 5,
"notebook_sharing": True,
"notebook_collaboration": True,
"user_admin": True,
"fee": 19,
@ -90,6 +94,7 @@ settings = {
"designed_for": "organizations",
"storage_quota_bytes": 5000 * MEGABYTE,
"included_users": 30,
"notebook_sharing": True,
"notebook_collaboration": True,
"user_admin": True,
"fee": 99,

View File

@ -15,6 +15,7 @@ settings = {
"designed_for": "individuals",
"storage_quota_bytes": None, # None indicates that there is no storage quota
"included_users": 1,
"notebook_sharing": False,
"notebook_collaboration": False,
"user_admin": False,
"fee": None,

View File

@ -4,7 +4,7 @@ from Search_form import Search_form
class Link_area( Div ):
def __init__( self, notebooks, notebook, parent_id, notebook_path, updates_path, user ):
def __init__( self, notebooks, notebook, parent_id, notebook_path, updates_path, user, rate_plan ):
linked_notebooks = [ nb for nb in notebooks if
( nb.read_write or not nb.name.startswith( u"Luminotes" ) ) and
nb.name not in ( u"trash" ) and
@ -42,7 +42,7 @@ class Link_area( Div ):
class_ = u"link_area_item",
) or None,
( notebook.name == u"Luminotes blog" ) and Div(
( rate_plan.get( u"notebook_sharing" ) and notebook.name == u"Luminotes blog" ) and Div(
A(
u"subscribe to rss",
href = u"%s?rss" % notebook_path,
@ -55,7 +55,7 @@ class Link_area( Div ):
title = u"Subscribe to the RSS feed for the Luminotes blog.",
),
class_ = u"link_area_item",
) or ( updates_path and Div(
) or ( updates_path and rate_plan.get( u"notebook_sharing" ) and Div(
A(
u"subscribe to rss",
href = updates_path,
@ -112,7 +112,7 @@ class Link_area( Div ):
class_ = u"link_area_item",
) or None,
( notebook.owner and user.username ) and Div(
( notebook.owner and user.username and rate_plan.get( u"notebook_sharing" ) ) and Div(
A(
u"share",
href = u"#",

View File

@ -78,10 +78,13 @@ class Main_page( Page ):
else:
title = None
updates_path = u"/notebooks/updates/%s?rss&%s" % (
notebook.object_id,
urlencode( [ ( u"notebook_name", notebook.name.encode( "utf8" ) ) ] ),
)
if rate_plan.get( u"notebook_sharing" ):
updates_path = u"/notebooks/updates/%s?rss&%s" % (
notebook.object_id,
urlencode( [ ( u"notebook_name", notebook.name.encode( "utf8" ) ) ] ),
)
else:
updates_path = None
if notebook.name == u"Luminotes":
notebook_path = u"/"
@ -231,7 +234,7 @@ class Main_page( Page ):
id = u"center_content_area",
),
Div(
Link_area( notebooks, notebook, parent_id, notebook_path, updates_path, user ),
Link_area( notebooks, notebook, parent_id, notebook_path, updates_path, user, rate_plan ),
id = u"right_area",
),
id = u"everything_area",

View File

@ -142,7 +142,8 @@ class Upgrade_page( Product_page ):
class_ = u"feature_name",
),
[ Td(
Img( src = u"/static/images/check.png", width = u"22", height = u"22" ),
plan[ u"notebook_sharing" ] and
Img( src = u"/static/images/check.png", width = u"22", height = u"22" ) or u"&nbsp",
) for plan in rate_plans ],
),
Tr(