Browse Source

Began redesign of upgrade/pricing page.

Dan Helfman 10 years ago
parent
commit
e9d2ea28d1

+ 3
- 0
NEWS View File

@@ -1,3 +1,6 @@
1
+1.2.18: March ??, 2008
2
+ * Newly redesigned upgrade/pricing/signup page.
3
+
1 4
 1.2.17: March 18, 2008
2 5
  * Internet Explorer expects quoted download filenames, while Firefox
3 6
    doesn't. So I took that into account by quoting conditionally based on the

+ 19
- 30
controller/Root.py View File

@@ -13,8 +13,8 @@ from model.User import User
13 13
 from view.Main_page import Main_page
14 14
 from view.Front_page import Front_page
15 15
 from view.Tour_page import Tour_page
16
+from view.Upgrade_page import Upgrade_page
16 17
 from view.Notebook_rss import Notebook_rss
17
-from view.Upgrade_note import Upgrade_note
18 18
 from view.Json import Json
19 19
 from view.Error_page import Error_page
20 20
 from view.Not_found_page import Not_found_page
@@ -79,6 +79,8 @@ class Root( object ):
79 79
     if note_title in ( u"sign_up", u"login" ) and https_url and cherrypy.request.remote_addr != https_proxy_ip:
80 80
       if invite_id:
81 81
         return dict( redirect = u"%s/%s?invite_id=%s" % ( https_url, note_title, invite_id ) )
82
+      if after_login:
83
+        return dict( redirect = u"%s/%s?after_login=%s" % ( https_url, note_title, after_login ) )
82 84
       else:
83 85
         return dict( redirect = u"%s/%s" % ( https_url, note_title ) )
84 86
 
@@ -270,48 +272,35 @@ class Root( object ):
270 272
 
271 273
     return result
272 274
 
273
-  @expose( view = Main_page )
275
+  @expose( view = Upgrade_page )
274 276
   @strongly_expire
275 277
   @end_transaction
276 278
   @grab_user_id
277 279
   @validate(
278 280
     user_id = Valid_id( none_okay = True ),
279 281
   )
280
-  def upgrade( self, user_id = None ):
282
+  def pricing( self, user_id = None ):
281 283
     """
282
-    Provide the information necessary to display the Luminotes upgrade page.
284
+    Provide the information necessary to display the Luminotes pricing page.
283 285
     """
284
-    anonymous = self.__database.select_one( User, User.sql_load_by_username( u"anonymous" ) )
285
-    if anonymous:
286
-      main_notebook = self.__database.select_one( Notebook, anonymous.sql_load_notebooks( undeleted_only = True ) )
287
-    else:
288
-      main_notebook = None
289
-
290
-    if user_id:
291
-      user = self.__database.load( User, user_id )
286
+    result = self.__users.current( user_id )
287
+    parents = [ notebook for notebook in result[ u"notebooks" ] if notebook.trash_id and not notebook.deleted ]
288
+    if len( parents ) > 0:
289
+      result[ "first_notebook" ] = parents[ 0 ]
292 290
     else:
293
-      user = None
291
+      result[ "first_notebook" ] = None
294 292
 
295
-    https_url = self.__settings[ u"global" ].get( u"luminotes.https_url" )
296
-    result = self.__users.current( user_id )
297
-    result[ "notebook" ] = main_notebook
298
-    result[ "startup_notes" ] = self.__database.select_many( Note, main_notebook.sql_load_startup_notes() )
299
-    result[ "total_notes_count" ] = self.__database.select_one( Note, main_notebook.sql_count_notes() )
300
-    result[ "note_read_write" ] = False
301
-    result[ "notes" ] = [ Note.create(
302
-      object_id = u"upgrade",
303
-      contents = unicode( Upgrade_note(
304
-        self.__settings[ u"global" ].get( u"luminotes.rate_plans", [] ),
305
-        self.__settings[ u"global" ].get( u"luminotes.unsubscribe_button" ),
306
-        https_url,
307
-        user,
308
-      ) ),
309
-      notebook_id = main_notebook.object_id,
310
-    ) ]
311
-    result[ "invites" ] = []
293
+    result[ "rate_plans" ] = self.__settings[ u"global" ].get( u"luminotes.rate_plans", [] )
294
+    result[ "unsubscribe_button" ] = self.__settings[ u"global" ].get( u"luminotes.unsubscribe_button" )
312 295
 
313 296
     return result
314 297
 
298
+  @expose()
299
+  def upgrade( self ):
300
+    return dict(
301
+      redirect = u"/pricing",
302
+    )
303
+
315 304
   # TODO: move this method to controller.Notebooks, and maybe give it a more sensible name
316 305
   @expose( view = Json )
317 306
   @end_transaction

+ 13
- 34
controller/test/Test_root.py View File

@@ -326,8 +326,8 @@ class Test_root( Test_controller ):
326 326
     assert u"error" not in result
327 327
     assert result[ u"notebook" ].object_id == self.privacy_notebook.object_id
328 328
 
329
-  def test_upgrade( self ):
330
-    result = self.http_get( "/upgrade" )
329
+  def test_pricing( self ):
330
+    result = self.http_get( "/pricing" )
331 331
 
332 332
     assert result[ u"user" ].username == u"anonymous"
333 333
     assert len( result[ u"notebooks" ] ) == 4
@@ -341,27 +341,14 @@ class Test_root( Test_controller ):
341 341
     assert rate_plan[ u"name" ] == u"super"
342 342
     assert rate_plan[ u"storage_quota_bytes" ] == 1337 * 10
343 343
 
344
-    assert result[ u"notebook" ].object_id == self.anon_notebook.object_id
345
-    assert len( result[ u"startup_notes" ] ) == 0
346
-    assert result[ u"note_read_write" ] is False
347
-
348
-    assert result[ u"notes" ]
349
-    assert len( result[ u"notes" ] ) == 1
350
-    assert result[ u"notes" ][ 0 ].title == u"upgrade your wiki"
351
-    assert result[ u"notes" ][ 0 ].notebook_id == self.anon_notebook.object_id
352
-
353
-    contents = result[ u"notes" ][ 0 ].contents
354
-    assert u"upgrade" in contents
355
-    assert u"Super" in contents
356
-    assert u"Extra super" in contents
357
-
358
-    # since the user is not logged in, no subscription buttons should be shown
359
-    assert u"button" not in contents
344
+    assert result[ u"first_notebook" ] == None
345
+    assert result[ u"rate_plans" ] == self.settings[ u"global" ].get( u"luminotes.rate_plans", [] )
346
+    assert result[ u"unsubscribe_button" ] == self.settings[ u"global" ].get( u"luminotes.unsubscribe_button" )
360 347
 
361
-  def test_upgrade_after_login( self ):
348
+  def test_pricing_after_login( self ):
362 349
     self.login()
363 350
 
364
-    result = self.http_get( "/upgrade", session_id = self.session_id )
351
+    result = self.http_get( "/pricing", session_id = self.session_id )
365 352
 
366 353
     assert result[ u"user" ].username == self.username
367 354
     assert len( result[ u"notebooks" ] ) == 5
@@ -375,22 +362,14 @@ class Test_root( Test_controller ):
375 362
     assert rate_plan[ u"name" ] == u"super"
376 363
     assert rate_plan[ u"storage_quota_bytes" ] == 1337 * 10
377 364
 
378
-    assert result[ u"notebook" ].object_id == self.anon_notebook.object_id
379
-    assert len( result[ u"startup_notes" ] ) == 0
380
-    assert result[ u"note_read_write" ] is False
381
-
382
-    assert result[ u"notes" ]
383
-    assert len( result[ u"notes" ] ) == 1
384
-    assert result[ u"notes" ][ 0 ].title == u"upgrade your wiki"
385
-    assert result[ u"notes" ][ 0 ].notebook_id == self.anon_notebook.object_id
365
+    assert result[ u"first_notebook" ].object_id == self.notebook.object_id
366
+    assert result[ u"rate_plans" ] == self.settings[ u"global" ].get( u"luminotes.rate_plans", [] )
367
+    assert result[ u"unsubscribe_button" ] == self.settings[ u"global" ].get( u"luminotes.unsubscribe_button" )
386 368
 
387
-    contents = result[ u"notes" ][ 0 ].contents
388
-    assert u"upgrade" in contents
389
-    assert u"Super" in contents
390
-    assert u"Extra super" in contents
369
+  def upgrade( self ):
370
+    result = self.http_get( "/upgrade" )
391 371
 
392
-    # since the user is logged in, subscription buttons should be shown
393
-    assert u"button" in contents
372
+    assert result[ u"redirect" ] == u"/pricing"
394 373
 
395 374
   def test_next_id( self ):
396 375
     result = self.http_get( "/next_id" )

+ 0
- 75
static/css/note.css View File

@@ -89,81 +89,6 @@ ol li {
89 89
   padding-right: 1em;
90 90
 }
91 91
 
92
-#upgrade_table_area {
93
-  text-align: center;
94
-}
95
-
96
-#upgrade_login_text {
97
-  font-weight: bold;
98
-  text-align: center;
99
-}
100
-
101
-#upgrade_table {
102
-  border-collapse: collapse;
103
-  border: 1px solid #999999;
104
-  margin-left: auto;
105
-  margin-right: auto;
106
-}
107
-
108
-#upgrade_table th {
109
-  padding: 0.5em;
110
-}
111
-
112
-#upgrade_table td {
113
-  text-align: center;
114
-  background-color: #fafafa;
115
-  padding: 0.5em;
116
-}
117
-
118
-#upgrade_table .plan_name {
119
-  width: 16%;
120
-  text-align: center;
121
-  background-color: #d0e0f0;
122
-}
123
-
124
-#upgrade_table .feature_name {
125
-  width: 36%;
126
-  text-align: left;
127
-  background-color: #fafafa;
128
-}
129
-
130
-#upgrade_table_small {
131
-  border-collapse: collapse;
132
-  border: 1px solid #999999;
133
-  margin-left: auto;
134
-  margin-right: auto;
135
-}
136
-
137
-#upgrade_table_small th {
138
-  padding: 0.5em;
139
-}
140
-
141
-#upgrade_table_small td {
142
-  text-align: center;
143
-  background-color: #fafafa;
144
-  padding: 0.5em;
145
-}
146
-
147
-#upgrade_table_small .plan_name {
148
-  width: 33%;
149
-  text-align: center;
150
-  background-color: #d0e0f0;
151
-}
152
-
153
-.price_text {
154
-  color: #ff6600;
155
-}
156
-
157
-.month_text {
158
-  padding-top: 0.5em;
159
-  font-size: 75%;
160
-}
161
-
162
-.subscribe_form {
163
-  margin-top: 0.5em;
164
-  margin-bottom: 0;
165
-}
166
-
167 92
 .thumbnail_left {
168 93
   float: left;
169 94
   margin: 0.5em;

+ 130
- 4
static/css/product.css View File

@@ -105,10 +105,6 @@
105 105
   margin-right: 20px;
106 106
 }
107 107
 
108
-.hook_bullet_list {
109
-  list-style-type: none;
110
-}
111
-
112 108
 .hook_action_area {
113 109
   background-color: #ffff99;
114 110
   font-weight: bold;
@@ -178,6 +174,10 @@
178 174
   padding-bottom: 0.5em;
179 175
 }
180 176
 
177
+.compact_list {
178
+  line-height: 100%;
179
+}
180
+
181 181
 .quotes_area {
182 182
   float: right;
183 183
   width: 400px;
@@ -207,10 +207,12 @@
207 207
 }
208 208
 
209 209
 .footer {
210
+  clear: both;
210 211
   background-color: #b0d0ff;
211 212
   height: 2em;
212 213
   margin-left: 0;
213 214
   margin-right: 0;
215
+  margin-top: 1em;
214 216
   border-top: 1px solid #999999;
215 217
 }
216 218
 
@@ -247,3 +249,127 @@
247 249
 .tour_screenshot_wrapper {
248 250
   padding: 1em;
249 251
 }
252
+
253
+.upgrade_subtitle {
254
+  text-align: center;
255
+  font-weight: bold;
256
+  padding-bottom: 0.5em;
257
+}
258
+
259
+.upgrade_text {
260
+  text-align: left;
261
+}
262
+
263
+.upgrade_area {
264
+  text-align: center;
265
+  padding-top: 1em;
266
+  padding-bottom: 1em;
267
+  background-color: #ffffff;
268
+  border-bottom: 1px solid #cccccc;
269
+  margin: 0 auto;
270
+  margin-bottom: 1em;
271
+}
272
+
273
+.upgrade_table_area {
274
+  text-align: center;
275
+}
276
+
277
+#upgrade_table {
278
+  border-collapse: collapse;
279
+  border: 1px solid #999999;
280
+  margin-left: auto;
281
+  margin-right: auto;
282
+  margin-bottom: 1em;
283
+}
284
+
285
+#upgrade_table th {
286
+  padding: 0.5em;
287
+}
288
+
289
+#upgrade_table td {
290
+  text-align: center;
291
+  background-color: #fafafa;
292
+  padding: 0.5em;
293
+}
294
+
295
+#upgrade_table .plan_name {
296
+  width: 16%;
297
+  text-align: center;
298
+  background-color: #d0e0f0;
299
+}
300
+
301
+#upgrade_table .feature_name {
302
+  width: 36%;
303
+  text-align: left;
304
+  background-color: #fafafa;
305
+}
306
+
307
+#upgrade_table_small {
308
+  clear: both;
309
+  border-collapse: collapse;
310
+  border: 1px solid #999999;
311
+  margin-left: auto;
312
+  margin-right: auto;
313
+}
314
+
315
+#upgrade_table_small th {
316
+  padding: 0.5em;
317
+}
318
+
319
+#upgrade_table_small td {
320
+  text-align: center;
321
+  background-color: #fafafa;
322
+  padding: 0.5em;
323
+}
324
+
325
+#upgrade_table_small .plan_name {
326
+  width: 33%;
327
+  text-align: center;
328
+  background-color: #d0e0f0;
329
+}
330
+
331
+.price_text {
332
+  color: #ff6600;
333
+}
334
+
335
+.month_text {
336
+  padding-top: 0.5em;
337
+  font-size: 75%;
338
+}
339
+
340
+.subscribe_form {
341
+  margin-top: 0.5em;
342
+  margin-bottom: 0;
343
+}
344
+
345
+.sign_up_button_area {
346
+  margin-top: 0.5em;
347
+}
348
+
349
+.upgrade_left_area {
350
+  width: 400px;
351
+  margin-bottom: 1em;
352
+}
353
+
354
+.upgrade_right_area {
355
+  float: right;
356
+  width: 400px;
357
+  margin-left: 20px;
358
+  margin-bottom: 1em;
359
+}
360
+
361
+.thumbnail_left {
362
+  float: left;
363
+  margin: 0.5em;
364
+  margin-right: 1em;
365
+  margin-bottom: 0.5em;
366
+  border: 1px solid #999999;
367
+}
368
+
369
+.thumbnail_right {
370
+  float: right;
371
+  margin: 0.5em;
372
+  margin-left: 1em;
373
+  margin-bottom: 0.5em;
374
+  border: 1px solid #999999;
375
+}

+ 5
- 10
static/html/sign up.html View File

@@ -1,20 +1,15 @@
1 1
 <h3>sign up</h3>
2 2
 
3 3
 <p>
4
-To get started with your own personal wiki, all you need to do is sign up for
5
-an account. <b>There's nothing to download or install.</b>
4
+<b>There's nothing to download or install.</b>
6 5
 </p>
7 6
 
8 7
 <p>
9
-If you haven't seen it already, <a href="/users/demo" target="_top">try the
10
-demo</a> first! The Luminotes demo doesn't require any sort of sign up.
8
+If you're not ready to sign up
9
+yet, <a href="/users/demo" target="_top">try the demo</a> first!
11 10
 </p>
12 11
 
13 12
 <p>
14
-<b>Providing your email address is completely optional.</b> I only ask for it
15
-in case you ever need your password reset. Your email address will absolutely
16
-not be given out or used for spam.
17
-</p>
18 13
 
19 14
 <form id="signup_form">
20 15
 <p>
@@ -28,12 +23,12 @@ not be given out or used for spam.
28 23
 </p>
29 24
 
30 25
 <p>
31
-<b>password (again)</b><br />
26
+<b>password</b> (again)<br />
32 27
 <input type="password" name="password_repeat" id="password_repeat" class="text_field" size="30" maxlength="30" />
33 28
 </p>
34 29
 
35 30
 <p>
36
-<b>email address (optional)</b><br />
31
+<b>email address</b> (optional and never shared)<br />
37 32
 <input type="text" name="email_address" id="email_address" class="text_field" size="30" maxlength="60" />
38 33
 </p>
39 34
 

BIN
static/images/more_collaboration.png View File


BIN
static/images/more_collaboration.xcf View File


BIN
static/images/more_room_to_stretch_out.png View File


BIN
static/images/more_room_to_stretch_out.xcf View File


BIN
static/images/sign_up.png View File


BIN
static/images/sign_up.xcf View File


BIN
static/images/sign_up_button.png View File


BIN
static/images/sign_up_button.xcf View File


BIN
static/images/subscribe_button.png View File


BIN
static/images/subscribe_button.xcf View File


BIN
static/images/unsubscribe_button.png View File


BIN
static/images/unsubscribe_button.xcf View File


BIN
static/images/upgrade.png View File


BIN
static/images/upgrade.xcf View File


BIN
static/images/zero_hassle.png View File


BIN
static/images/zero_hassle.xcf View File


+ 68
- 14
view/Front_page.py View File

@@ -1,5 +1,5 @@
1 1
 from Product_page import Product_page
2
-from Tags import Div, Img, A, P, Table, Tr, Td, Li, Span, I, Br
2
+from Tags import Div, Img, A, P, Table, Tr, Td, Li, Span, I, Br, Ul, Li
3 3
 
4 4
 
5 5
 class Front_page( Product_page ):
@@ -49,7 +49,7 @@ class Front_page( Product_page ):
49 49
               A( u"Take a tour", href = u"/tour", class_ = u"hook_action" ), u", ",
50 50
               A( u"Try the demo", href = u"/users/demo", class_ = u"hook_action" ), u", ",
51 51
               Span( u" or ", class_ = u"hook_action_or" ),
52
-              A( u"Sign up", href = u"/sign_up", class_ = u"hook_action"  ),
52
+              A( u"Sign up", href = u"/pricing", class_ = u"hook_action"  ),
53 53
               class_ = u"hook_action_area",
54 54
               separator = u"",
55 55
             ),
@@ -70,6 +70,27 @@ class Front_page( Product_page ):
70 70
             ),
71 71
           ),
72 72
 
73
+          Div(
74
+            Div(
75
+              u'"',
76
+              Span(
77
+                u"As soon as I saw Luminotes I knew it was what I and my students needed.",
78
+                class_ = u"quote_title",
79
+                separator = u"",
80
+              ),
81
+              u"""
82
+              Clear, easy to use and beautifully simple.
83
+              """,
84
+              class_ = u"quote_text",
85
+              separator = u"",
86
+            ),
87
+            Div(
88
+              u"-Jonathan Lecun, Director, ", A( u"UK Teachers Online", href = u"http://www.ukteachersonline.co.uk/" ),
89
+              class_ = u"quote_signature"
90
+            ),
91
+            class_ = u"quote",
92
+          ),
93
+
73 94
           Div(
74 95
             Div(
75 96
               u'"',
@@ -94,6 +115,29 @@ class Front_page( Product_page ):
94 115
             class_ = u"quote",
95 116
           ),
96 117
 
118
+          Div(
119
+            Div(
120
+              u'"',
121
+              Span(
122
+                u"I'm a wiki addict, so I've tried most of them, desktop and web-based.",
123
+                class_ = u"quote_title",
124
+                separator = u"",
125
+              ),
126
+              u"""
127
+              What I like about your excellent product is the modeless editing (no edit
128
+              and save buttons). This makes Luminotes the fastest web-based wiki I have
129
+              used.
130
+              """,
131
+              class_ = u"quote_text",
132
+              separator = u"",
133
+            ),
134
+            Div(
135
+              u"-Scott Tiner",
136
+              class_ = u"quote_signature"
137
+            ),
138
+            class_ = u"quote",
139
+          ),
140
+
97 141
           Div(
98 142
             Div(
99 143
               u'"',
@@ -194,6 +238,17 @@ class Front_page( Product_page ):
194 238
               ),
195 239
               class_ = u"thumbnail_area",
196 240
             ),
241
+            P(
242
+              u"What can you do with Luminotes?",
243
+            ),
244
+            Ul(
245
+              Li( u"Plan a story" ),
246
+              Li( u"Collect recipes" ),
247
+              Li( u"Record your ideas" ),
248
+              Li( u"Keep track of your tasks" ),
249
+              Li( u"Take notes" ),
250
+              class_ = u"compact_list",
251
+            ),
197 252
             P(
198 253
               u"""
199 254
               Luminotes is open source / free software and licensed under the terms of the
@@ -202,24 +257,23 @@ class Front_page( Product_page ):
202 257
             ),
203 258
             class_ = u"what_is_luminotes_text",
204 259
           ),
260
+          Div(
261
+            P(
262
+              Span( u"Sound interesting?", class_ = u"hook_action_question" ), Br(),
263
+              A( u"Take a tour", href = u"/tour", class_ = u"hook_action" ), u", ",
264
+              A( u"Try the demo", href = u"/users/demo", class_ = u"hook_action" ), u", ",
265
+              Span( u" or ", class_ = u"hook_action_or" ),
266
+              A( u"Sign up", href = u"/pricing", class_ = u"hook_action"  ),
267
+              class_ = u"hook_action_area",
268
+              separator = u"",
269
+            ),
270
+          ),
205 271
           class_ = u"what_is_luminotes_area",
206 272
         ),
207 273
 
208 274
         class_ = u"wide_center_area",
209 275
       ),
210 276
 
211
-      Div(
212
-        P(
213
-          Span( u"Sound interesting?", class_ = u"hook_action_question" ), Br(),
214
-          A( u"Take a tour", href = u"/tour", class_ = u"hook_action" ), u", ",
215
-          A( u"Try the demo", href = u"/users/demo", class_ = u"hook_action" ), u", ",
216
-          Span( u" or ", class_ = u"hook_action_or" ),
217
-          A( u"Sign up", href = u"/sign_up", class_ = u"hook_action"  ),
218
-          class_ = u"hook_action_area",
219
-          separator = u"",
220
-        ),
221
-        class_ = u"center_area",
222
-      ),
223 277
       P(
224 278
         Span( id = u"new_note_button_preload" ),
225 279
         Span( id = u"link_button_preload" ),

+ 7
- 5
view/Product_page.py View File

@@ -18,7 +18,8 @@ class Product_page( Page ):
18 18
         Div(
19 19
           ( note_title == u"home" ) and title_image or A( title_image, href = u"/" ),   
20 20
           ( login_url and user.username == u"anonymous" ) and Div(
21
-            A( u"sign up", href = u"/sign_up", class_ = u"bold_link" ), u" | ",
21
+            ( note_title == u"pricing" ) and Span( u"pricing &amp sign up", class_ = u"bold_link" ) or \
22
+            A( u"pricing &amp; sign up", href = u"/pricing", class_ = u"bold_link" ), u" | ",
22 23
             A(
23 24
               u"login",
24 25
               href = login_url,
@@ -39,16 +40,18 @@ class Product_page( Page ):
39 40
             user.username and Span(
40 41
               A(
41 42
                 u"upgrade",
42
-                href = u"/upgrade",
43
+                href = u"/pricing",
43 44
                 title = u"Upgrade your Luminotes account.",
44 45
                 class_ = u"bold_link",
45 46
               ),
46 47
               " | ",
47 48
             ) or Span(
49
+              ( note_title == u"pricing" ) and Span( u"pricing &amp sign up", class_ = u"bold_link" ) or \
48 50
               A(
49
-                u"sign up",
50
-                href = u"/sign_up",
51
+                u"pricing &amp; sign up",
52
+                href = u"/pricing",
51 53
                 title = u"Sign up for a real Luminotes account.",
54
+                class_ = u"bold_link",
52 55
               ),
53 56
               " | ",
54 57
             ) or None,
@@ -64,7 +67,6 @@ class Product_page( Page ):
64 67
             ( note_title == u"home" ) and Span( u"home", class_ = u"bold_link" ) or A( u"home", href = u"/" ), u" | ",
65 68
             ( note_title == u"tour" ) and Span( u"tour", class_ = u"bold_link" ) or A( u"tour", href = u"/tour" ), u" | ",
66 69
             ( note_title == u"demo" ) and Span( u"demo", class_ = u"bold_link" ) or A( u"demo", href = u"/users/demo" ), u" | ",
67
-            ( note_title == u"upgrade" ) and Span( u"upgrade", class_ = u"bold_link" ) or A( u"pricing", href = u"/upgrade" ), u" | ",
68 70
             ( note_title == u"faq" ) and Span( u"faq", class_ = u"bold_link" ) or A( u"faq", href = u"/faq" ), u" | ",
69 71
             ( note_title == u"guide" ) and Span( u"guide", class_ = u"bold_link" ) or A( u"help", href = u"/guide" ), u" | ",
70 72
             ( note_title == u"contact" ) and Span( u"contact", class_ = u"bold_link" ) or A( u"contact", href = u"/contact_info" ), u" | ",

+ 1
- 1
view/Thanks_error_note.py View File

@@ -25,7 +25,7 @@ class Thanks_error_note( Span ):
25 25
         u"""
26 26
         Note: You can check the current status of your account by refreshing the
27 27
         """,
28
-        A( u"upgrade", href = u"/upgrade", target = "_top" ),
28
+        A( u"upgrade", href = u"/pricing", target = "_top" ),
29 29
         u"""
30 30
         page while logged in.
31 31
         """

+ 1
- 1
view/Tour_page.py View File

@@ -74,7 +74,7 @@ class Tour_page( Product_page ):
74 74
           Span( u"Like what you've seen so far?", class_ = u"hook_action_question" ), Br(),
75 75
           A( u"Try the demo", href = u"/users/demo", class_ = u"hook_action" ),
76 76
           Span( u" or ", class_ = u"hook_action_or" ),
77
-          A( u"Sign up", href = u"/sign_up", class_ = u"hook_action"  ),
77
+          A( u"Sign up", href = u"/pricing", class_ = u"hook_action"  ),
78 78
           class_ = u"hook_action_area",
79 79
           separator = u"",
80 80
         ),

+ 190
- 0
view/Upgrade_page.py View File

@@ -0,0 +1,190 @@
1
+from Product_page import Product_page
2
+from Tags import Div, Img, A, P, Table, Th, Tr, Td, Li, Span, I, Br, Ul, Li
3
+
4
+
5
+class Upgrade_page( Product_page ):
6
+  def __init__( self, user, notebooks, first_notebook, login_url, logout_url, rate_plan, rate_plans, unsubscribe_button ):
7
+    MEGABYTE = 1024 * 1024
8
+
9
+    Product_page.__init__(
10
+      self,
11
+      user,
12
+      first_notebook,
13
+      login_url,
14
+      logout_url,
15
+      u"pricing", # note title
16
+
17
+      Div(
18
+        Div(
19
+          user and user.username not in ( None, u"anonymous" ) and Div(
20
+            Img(
21
+              src = u"/static/images/upgrade.png",
22
+              width = u"152", height = u"51",
23
+              alt = u"Upgrade",
24
+            ),
25
+          ) or Div(
26
+            Img(
27
+              src = u"/static/images/sign_up.png",
28
+              width = u"138", height = u"51",
29
+              alt = u"Sign Up",
30
+            ),
31
+          ),
32
+          P(
33
+            """
34
+            Upgrade, downgrade, or cancel anytime. 60-day money-back guarantee.
35
+            """,
36
+            class_ = u"upgrade_subtitle",
37
+          ),
38
+          P(
39
+            Table(
40
+              self.fee_row( rate_plans, user ),
41
+              Tr(
42
+                Td( u"Included storage space", class_ = u"feature_name" ),
43
+                [ Td(
44
+                  plan[ u"storage_quota_bytes" ] // MEGABYTE, " MB",
45
+                ) for plan in rate_plans ],
46
+              ),
47
+              Tr(
48
+                Td( u"Unlimited wiki notebooks", class_ = u"feature_name" ),
49
+                [ Td(
50
+                  Img( src = u"/static/images/check.png", width = u"20", height = u"17" ),
51
+                ) for plan in rate_plans ],
52
+              ),
53
+              Tr(
54
+                Td( u"Friendly email support", class_ = u"feature_name" ),
55
+                [ Td(
56
+                  Img( src = u"/static/images/check.png", width = u"20", height = u"17" ),
57
+                ) for plan in rate_plans ],
58
+              ),
59
+              Tr(
60
+                Td( u"Invite people to view your wiki", class_ = u"feature_name" ),
61
+                [ Td(
62
+                  Img( src = u"/static/images/check.png", width = u"20", height = u"17" ),
63
+                ) for plan in rate_plans ],
64
+              ),
65
+              Tr(
66
+                Td( u"Invite people to edit your wiki", class_ = u"feature_name" ),
67
+                [ Td(
68
+                  plan[ u"notebook_collaboration" ] and
69
+                  Img( src = u"/static/images/check.png", width = u"20", height = u"17" ) or u"&nbsp",
70
+                ) for plan in rate_plans ],
71
+              ),
72
+              Tr(
73
+                Td( u"Wiki access control", class_ = u"feature_name" ),
74
+                [ Td(
75
+                  plan[ u"notebook_collaboration" ] and
76
+                  Img( src = u"/static/images/check.png", width = u"20", height = u"17" ) or u"&nbsp",
77
+                ) for plan in rate_plans ],
78
+              ),
79
+              border = u"1",
80
+              id = u"upgrade_table",
81
+            ),
82
+            class_ = u"upgrade_table_area",
83
+          ),
84
+
85
+          user and user.username and P(
86
+            u"You're currently subscribed to Luminotes %s." % 
87
+            rate_plans[ user.rate_plan ][ u"name" ].capitalize(),
88
+            ( user.rate_plan > 0 ) and unsubscribe_button or None,
89
+          ) or None,
90
+          class_ = u"upgrade_area",
91
+        ),
92
+
93
+        Div(
94
+          Div(
95
+            Img(
96
+              src = u"/static/images/more_room_to_stretch_out.png",
97
+              width = u"280", height = u"29",
98
+              alt = u"More room to stretch out",
99
+            ),
100
+            Ul(
101
+              Li( u"More room for your wiki notes." ),
102
+              Li( u"More room for your documents and files." ),
103
+              class_ = u"upgrade_text",
104
+            ),
105
+            Img(
106
+              src = u"/static/images/zero_hassle.png",
107
+              width = u"122", height = u"29",
108
+              alt = u"Zero hassle",
109
+            ),
110
+            Ul(
111
+              Li( u"Cancel online anytime without losing access to your wiki." ),
112
+              Li( u"60-day money-back guarantee. No questions asked." ),
113
+              Li( u"No lock-in: Download your entire wiki anytime." ),
114
+              class_ = u"upgrade_text",
115
+            ),
116
+            class_= u"upgrade_right_area",
117
+          ),
118
+
119
+          Div(
120
+            Img(
121
+              src = u"/static/images/more_collaboration.png",
122
+              width = u"204", height = u"29",
123
+              alt = u"More collaboration",
124
+            ),
125
+            P(
126
+              Ul(
127
+                Li( u"Invite specific people to collaborate on your wiki." ),
128
+                Li( u"Decide who can edit and who can only view." ),
129
+                Li( u"Invite as many people as you want. They only need free Luminotes accounts." ),
130
+                Li( u"Revoke access with a single click." ),
131
+                Li( u"Share only the notebooks you want to share. Keep the others private." ),
132
+                class_ = u"upgrade_text",
133
+              ),
134
+            ),
135
+            class_= u"upgrade_left_area",
136
+          ),
137
+
138
+          P(
139
+            Table(
140
+              self.fee_row( rate_plans, user, include_blank = False ),
141
+              Tr(
142
+                [ Td(
143
+                  plan[ u"storage_quota_bytes" ] // MEGABYTE, " MB",
144
+                ) for plan in rate_plans ],
145
+              ),
146
+              border = u"1",
147
+              id = u"upgrade_table_small",
148
+            ),
149
+            class_= u"upgrade_table_area",
150
+          ),
151
+
152
+          Div(
153
+            P(
154
+              Span( u"Have a question before you sign up?", class_ = u"hook_action_question" ), Br(),
155
+              A( u"Contact support", href = u"/contact_info", class_ = u"hook_action" ),
156
+              class_ = u"hook_action_area",
157
+              separator = u"",
158
+            ),
159
+            class_ = u"center_area",
160
+          ),
161
+
162
+          class_ = u"wide_center_area",
163
+        ),
164
+      ),
165
+    )
166
+
167
+  def fee_row( self, rate_plans, user, include_blank = True ):
168
+    return Tr(
169
+      include_blank and Th( u"&nbsp;" ) or None,
170
+      [ Th(
171
+        plan[ u"name" ].capitalize(),
172
+        plan[ u"fee" ] and Div(
173
+          Span(
174
+            u"$%s" % plan[ u"fee" ],
175
+            Span( u"/month", class_ = u"month_text" ),
176
+            class_ = u"price_text",
177
+            separator = u"",
178
+          ),
179
+          user and user.username and user.rate_plan != index and plan.get( u"button" ).strip() and plan.get( u"button" ) % user.object_id,
180
+        ) or None,
181
+        ( not user or user.username in ( u"anonymous", None ) ) and Div(
182
+          A(
183
+            Img( src = u"/static/images/sign_up_button.png", width = "76", height = "23" ),
184
+            href = u"/sign_up?plan=%s" % index,
185
+          ),
186
+          class_ = u"sign_up_button_area",
187
+        ) or None,
188
+        class_ = u"plan_name",
189
+      ) for ( index, plan ) in enumerate( rate_plans ) ],
190
+    )

+ 2
- 2
view/User_area.py View File

@@ -17,14 +17,14 @@ class User_area( Div ):
17 17
         user.username and Span(
18 18
           A(
19 19
             u"upgrade",
20
-            href = u"/upgrade",
20
+            href = u"/pricing",
21 21
             title = u"Upgrade your Luminotes account.",
22 22
           ),
23 23
           " | ",
24 24
         ) or Span(
25 25
           A(
26 26
             u"sign up",
27
-            href = u"/sign_up",
27
+            href = u"/pricing",
28 28
             title = u"Sign up for a real Luminotes account.",
29 29
           ),
30 30
           " | ",

Loading…
Cancel
Save