Archived
1
0
This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
luminotes/view/Error_page.py
Dan Helfman 613ee8a217 Completely revamped the way the main page and the notes on it are loaded by
the client. Previously, the main page would load as mostly blank, then the
client would immediately issue two async json calls to load the user and
notebook data, including startup notes. Now, the main page loads with the note
data actually as part of the page. If JavaScript is off, then you see all the
notes displayed, including startup notes and any designated note. If
JavaScript is on, then those "static" notes are instantly hidden and their
contents are loaded into iframes for editing/display.

The real upshot is that Luminotes in read-only mode is now more useful when
JavaScript is off, and actually displays notes and their contents. This is
very useful for search engine indexing.

Updated all Python unit tests. Still have to get to JavaScript unit tests,
what few their are.
2007-10-16 21:37:12 +00:00

51 lines
1.3 KiB
Python

from Page import Page
from Tags import Div, H2, P, A, Ul, Li, Strong, Noscript
class Error_page( Page ):
def __init__( self, support_email, message = None ):
if message:
title = u"whoops"
Page.__init__(
self,
H2( title ),
P( message ),
include_js = False,
)
return
title = u"uh oh"
Page.__init__(
self,
title,
Div(
H2( title ),
Noscript(
P(
Strong(
u"""
Please enable JavaScript in your web browser. JavaScript is necessary for many Luminotes
features to work properly.
""",
),
),
),
P(
u"Something went wrong! If you care, please",
A( "let me know about it.", href = "mailto:%s" % support_email ),
u"Be sure to include the following information:",
),
Ul(
Li( u"the series of steps you took to produce this error" ),
Li( u"the time of the error" ),
Li( u"the name of your web browser and its version" ),
Li( u"any other information that you think is relevant" ),
),
P(
u"Thanks!",
),
class_ = u"error_box",
),
include_js = False,
)