~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to src/dispatch/__init__.py

  • Committer: mattgiuca
  • Date: 2007-12-12 06:06:35 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:46
dispatch/html: Now prints apps list in the HTML header (common to all apps).

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
    # Have Apache output its own HTML code if non-200 status codes were found
83
83
    return req.status
84
84
 
85
 
def print_apps_list(file):
86
 
    """Prints all app tabs, as a UL. Prints a list item for each app that has
87
 
    a tab.
88
 
 
89
 
    file: Object with a "write" method - ie. the request object.
90
 
    Reads from: conf
91
 
    """
92
 
    file.write('<ul class="apptabs">\n')
93
 
 
94
 
    for urlname in conf.apps.apps_in_tabs:
95
 
        app = conf.apps.app_url[urlname]
96
 
        file.write('  <li><a href="')
97
 
        file.write(util.make_path(app.dir))
98
 
        file.write('">')
99
 
        file.write(app.name)
100
 
        file.write('</a></li>\n')
101
 
 
102
 
    file.write('</ul>\n')