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

« back to all changes in this revision

Viewing changes to ivle/webapp/base/ivle-headings.html

  • Committer: mattgiuca
  • Date: 2008-01-24 23:31:45 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:291
tutorial: Added code to handle top-level menu and subject menu (reads dir
    listing, XML files, and presents a list of links).
    Added code to handle a worksheet page. Presents the page as HTML,
    observing <problem> elements and reading in their XML files.
    Currently does not handle problems; just prints out their source files.
Added media/tutorial/tutorial.css (very minimal currently).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html xmlns="http://www.w3.org/1999/xhtml"       
2
 
      xmlns:py="http://genshi.edgewall.org/"
3
 
      xmlns:xi="http://www.w3.org/2001/XInclude"
4
 
      py:strip="">
5
 
  <py:match path="head[@status!='done']" once="true">
6
 
    <head>
7
 
      <title py:with="title = list(select('title/text()'))">
8
 
        <py:if test="title">${title} - </py:if>IVLE
9
 
      </title>
10
 
 
11
 
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
12
 
 
13
 
      <script py:if="not publicmode and write_javascript_settings" type="text/javascript">
14
 
        root_dir = "${root_dir}";
15
 
        public_host = "${public_host}";
16
 
        svn_base = "${svn_base}";
17
 
        username = "${login}";
18
 
      </script>
19
 
 
20
 
      <link py:if="favicon" rel="shortcut icon" href="${favicon}" />
21
 
 
22
 
      <py:for each="style in styles">
23
 
        <link rel="stylesheet" type="text/css" href="${style}" />
24
 
      </py:for>
25
 
 
26
 
      <py:for each="script in scripts">
27
 
        <script type="text/javascript" src="${script}"></script>
28
 
      </py:for>
29
 
 
30
 
      <!-- Plugin JavaScript to be run on page load -->
31
 
      <script type="text/javascript">
32
 
        <py:for each="init_script in scripts_init">
33
 
          $(document).ready(${init_script});
34
 
        </py:for>
35
 
      </script>
36
 
      ${select('*[local-name()!="title"]')}
37
 
    </head>
38
 
  </py:match>    
39
 
  <py:match path="body[@status!='done']" once="true">
40
 
    <body>
41
 
      <div id="ivleheader">
42
 
        <ul id="ivle_breadcrumbs">
43
 
          <li class="breadcrumb">
44
 
            <a href="/">
45
 
              <img src="${title_img}" alt="Informatics Virtual Learning Environment" />
46
 
            </a>
47
 
            <ul py:if="logged_in">
48
 
              <li py:for="app in apps_in_tabs">
49
 
                <a py:attrs="{'style': 'background: url(%s) no-repeat; padding-left: 30px' % app['icon_url']} if app['has_icon'] else {}" href="${app['path']}" title="${app['desc']}">${app['name']}</a>
50
 
              </li>
51
 
            </ul>
52
 
          </li>
53
 
          <py:for each="ancestor in ancestry" py:with="thiscrumb=crumb(ancestor)">
54
 
          <li py:if="thiscrumb">
55
 
            <py:choose test="getattr(thiscrumb, 'url', None)">
56
 
              <py:when test="None">
57
 
                <span>${thiscrumb.text}</span>
58
 
              </py:when>
59
 
              <py:otherwise>
60
 
                <a href="${thiscrumb.url}">
61
 
                  ${thiscrumb.text}
62
 
                </a>
63
 
              </py:otherwise>
64
 
            </py:choose>
65
 
            <ul py:if="hasattr(thiscrumb, 'menu')">
66
 
              <li py:for="item in thiscrumb.menu"><a href="${thiscrumb.menu[item]}">${item}</a></li>
67
 
            </ul>
68
 
          </li>
69
 
          </py:for>
70
 
          <li py:for="thiscrumb in extra_breadcrumbs">
71
 
            <py:choose test="getattr(thiscrumb, 'url', None)">
72
 
              <py:when test="None">
73
 
                <span>${thiscrumb.text}</span>
74
 
              </py:when>
75
 
              <py:otherwise>
76
 
                <a href="${thiscrumb.url}">
77
 
                  ${thiscrumb.text}
78
 
                </a>
79
 
              </py:otherwise>
80
 
            </py:choose>
81
 
            <ul py:if="hasattr(thiscrumb, 'menu')">
82
 
              <li py:for="item in thiscrumb.menu"><a href="${thiscrumb.menu[item]}">${item}</a></li>
83
 
            </ul>
84
 
          </li>
85
 
        </ul>
86
 
        <div id="ivleheader_text">
87
 
          <py:choose>
88
 
            <p py:when="publicmode" class="userhello">Running in public mode.</p>
89
 
            <p py:when="logged_in" class="userhello">
90
 
              <span id="usernick">${nick}</span>
91
 
              (<span class="username">${login}</span>) |
92
 
              <a href="/~${login}/+settings">Settings</a> |
93
 
              <py:choose>
94
 
                <a py:when="defined('help_path')" href="/+help/${help_path}">Help</a>
95
 
                <a py:otherwise="" href="/+help/">Help</a>
96
 
              |</py:choose>
97
 
              <a href="/+logout">Log out</a>
98
 
            </p>
99
 
            <p py:otherwise="" class="userhello">Not logged in.</p>
100
 
          </py:choose>
101
 
        </div>
102
 
      </div>
103
 
      <div id="ivlebody">
104
 
        <div id="ivleview">
105
 
          ${select('*')}
106
 
        </div>
107
 
        <div id="ivleoverlays">
108
 
          <py:for each="overlay in overlays">
109
 
            ${overlay}
110
 
          </py:for>
111
 
        </div>     
112
 
      </div>
113
 
    </body>
114
 
  </py:match>
115
 
  ${app_template}
116
 
</html>