Blame Scripts/CentOS-Web/Apps/Unknown/page.py

5cb01a
"""Support module for page layout inside `Unknown' web application.
5cb01a
5cb01a
"""
5cb01a
from Apps import page
5cb01a
5cb01a
app = page.Layout()
5cb01a
5cb01a
5cb01a
def page_content():
5cb01a
    """Returns page content."""
5cb01a
    output = app.tag_p('', [12,1], 'The page you tried to open was not found in this server. Try one of the links above to start over.')
5cb01a
    output = app.admonition('Warning', 'Page not found.', output)
5cb01a
    return output
5cb01a
5cb01a
5cb01a
def main():
5cb01a
    """Returns final output."""
5cb01a
5cb01a
    # Define page name. This value is used as reference to determine
5cb01a
    # which application to load and what tab in the navigation bar to
5cb01a
    # focus on.
5cb01a
    app.name = 'Unknown'
5cb01a
5cb01a
    # Define page title. This value is dislayed on the browser's title
5cb01a
    # bar. Notice that we concatenated the page class default value
5cb01a
    # here.
5cb01a
    app.title += ' :: Page not found'
5cb01a
5cb01a
    # Define page header. This is the information displayed
5cb01a
    # between the page top and the page content.
5cb01a
    app.header = app.logo()
5cb01a
    app.header += app.google()
5cb01a
    app.header += app.navibar()
5cb01a
5cb01a
    # Define page body. This is the information displayed between the
5cb01a
    # page header and page footer.
5cb01a
    app.body = page_content()
5cb01a
5cb01a
    # Define page footer. This is the information displayed between
5cb01a
    # the page bottom and the page content, the last information
5cb01a
    # displayed in the page.
5cb01a
    app.footer = app.credits()
5cb01a
5cb01a
    # Define page final layout. 
5cb01a
    html = app.page()
5cb01a
5cb01a
    return html