1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
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=""> |
|
1099.1.15
by Nick Chadwick
Fixed a small backwards-compatibility issue in the main genshi template. |
5 |
<py:match path="head[@status!='done']" once="true"> |
1099.1.73
by Nick Chadwick
Fixed a small issue in the template, removing some extraneous tags |
6 |
<head>
|
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
7 |
<title py:with="title = list(select('title/text()'))"> |
1099.1.14
by William Grant
ivle.webapp.base.views#XHTMLView: Include req.write_javascript_settings in |
8 |
<py:if test="title">${title} - </py:if>IVLE |
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
9 |
</title> |
1099.1.14
by William Grant
ivle.webapp.base.views#XHTMLView: Include req.write_javascript_settings in |
10 |
|
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
11 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
1099.1.14
by William Grant
ivle.webapp.base.views#XHTMLView: Include req.write_javascript_settings in |
12 |
|
1099.1.206
by William Grant
Only display tabs and overlays when we are logged in, and JavaScript settings |
13 |
<script py:if="not publicmode and write_javascript_settings" type="text/javascript"> |
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
14 |
root_dir = "${root_dir}"; |
15 |
public_host = "${public_host}"; |
|
1165.1.32
by William Grant
Expose the IVLE SVN base URL to JS. |
16 |
svn_base = "${svn_base}"; |
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
17 |
username = "${login}"; |
18 |
</script> |
|
1099.1.14
by William Grant
ivle.webapp.base.views#XHTMLView: Include req.write_javascript_settings in |
19 |
|
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
20 |
<link py:if="favicon" rel="shortcut icon" href="${favicon}" /> |
1099.1.14
by William Grant
ivle.webapp.base.views#XHTMLView: Include req.write_javascript_settings in |
21 |
|
1092.1.24
by William Grant
Convince the main XHTML template to use versioned styles/scripts, and move the |
22 |
<py:for each="style in styles"> |
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
23 |
<link rel="stylesheet" type="text/css" href="${style}" /> |
24 |
</py:for> |
|
1099.1.14
by William Grant
ivle.webapp.base.views#XHTMLView: Include req.write_javascript_settings in |
25 |
|
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
26 |
<py:for each="script in scripts"> |
27 |
<script type="text/javascript" src="${script}"></script> |
|
28 |
</py:for> |
|
1099.1.14
by William Grant
ivle.webapp.base.views#XHTMLView: Include req.write_javascript_settings in |
29 |
|
30 |
<!-- Plugin JavaScript to be run on page load -->
|
|
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
31 |
<script type="text/javascript"> |
32 |
<py:for each="init_script in scripts_init"> |
|
1166
by William Grant
Replace all non-external addEventListeners with equivalent jQuery calls. |
33 |
$(document).ready(${init_script}); |
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
34 |
</py:for> |
35 |
</script> |
|
36 |
${select('*[local-name()!="title"]')} |
|
37 |
</head> |
|
38 |
</py:match> |
|
1099.1.15
by Nick Chadwick
Fixed a small backwards-compatibility issue in the main genshi template. |
39 |
<py:match path="body[@status!='done']" once="true"> |
1099.1.73
by Nick Chadwick
Fixed a small issue in the template, removing some extraneous tags |
40 |
<body>
|
1100.1.9
by Matt Giuca
The IVLE logo is now an <img> element, rather than a CSS background. |
41 |
<div id="ivleheader"> |
1294.2.82
by William Grant
Replace the div>span breadcrumbs with ul>li, and style the text. |
42 |
<ul id="ivle_breadcrumbs"> |
1294.2.125
by William Grant
Only display the dropdown arrow on the IVLE breadcrumb when there is actually a menu. |
43 |
<li py:attrs="{'class': 'breadcrumb crumbmenu' if logged_in else 'breadcrumb'}"> |
1294.2.76
by William Grant
Shrink the top bar, and start breadcrumerisation. |
44 |
<a href="/"> |
45 |
<img src="${title_img}" alt="Informatics Virtual Learning Environment" /> |
|
46 |
</a> |
|
1294.2.106
by William Grant
Only show the tabs in the IVLE crumb's menu if logged in. |
47 |
<ul py:if="logged_in"> |
1294.2.90
by William Grant
Produce breadcrumb menus. |
48 |
<li py:for="app in apps_in_tabs"> |
1294.2.91
by William Grant
Enlarge the IVLE menu's items, and use CSS for the icons, not <img>s. |
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> |
1294.2.90
by William Grant
Produce breadcrumb menus. |
50 |
</li> |
51 |
</ul> |
|
1294.2.82
by William Grant
Replace the div>span breadcrumbs with ul>li, and style the text. |
52 |
</li> |
1294.2.128
by William Grant
Show the dropdown arrow again. |
53 |
<li py:for="thiscrumb in [crumb(ancestor) for ancestor in ancestry] + extra_breadcrumbs" |
54 |
py:if="thiscrumb" |
|
55 |
py:attrs="{True:{'class':'crumbmenu'}, False: None}[hasattr(thiscrumb, 'menu')]"> |
|
1294.2.101
by William Grant
Allow views to specify extra breadcrumbs. |
56 |
<py:choose test="getattr(thiscrumb, 'url', None)"> |
57 |
<py:when test="None"> |
|
58 |
<span>${thiscrumb.text}</span> |
|
59 |
</py:when> |
|
60 |
<py:otherwise>
|
|
61 |
<a href="${thiscrumb.url}"> |
|
62 |
${thiscrumb.text} |
|
63 |
</a> |
|
64 |
</py:otherwise> |
|
65 |
</py:choose> |
|
66 |
<ul py:if="hasattr(thiscrumb, 'menu')"> |
|
67 |
<li py:for="item in thiscrumb.menu"><a href="${thiscrumb.menu[item]}">${item}</a></li> |
|
68 |
</ul> |
|
69 |
</li> |
|
1294.2.82
by William Grant
Replace the div>span breadcrumbs with ul>li, and style the text. |
70 |
</ul> |
1100.1.31
by Matt Giuca
Ivle header: Put ivleheader_text inside ivleheader, simplifying the CSS a lot. |
71 |
<div id="ivleheader_text"> |
72 |
<py:choose>
|
|
73 |
<p py:when="publicmode" class="userhello">Running in public mode.</p> |
|
74 |
<p py:when="logged_in" class="userhello"> |
|
75 |
<span id="usernick">${nick}</span> |
|
76 |
(<span class="username">${login}</span>) | |
|
1294.1.6
by William Grant
Link to +edit, not +settings, in the header. |
77 |
<a href="/~${login}/+edit">Settings</a> | |
1100.1.31
by Matt Giuca
Ivle header: Put ivleheader_text inside ivleheader, simplifying the CSS a lot. |
78 |
<py:choose>
|
79 |
<a py:when="defined('help_path')" href="/+help/${help_path}">Help</a> |
|
80 |
<a py:otherwise="" href="/+help/">Help</a> |
|
81 |
|</py:choose> |
|
82 |
<a href="/+logout">Log out</a> |
|
83 |
</p> |
|
84 |
<p py:otherwise="" class="userhello">Not logged in.</p> |
|
85 |
</py:choose> |
|
86 |
</div> |
|
1100.1.9
by Matt Giuca
The IVLE logo is now an <img> element, rather than a CSS background. |
87 |
</div> |
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
88 |
<div id="ivlebody"> |
1099.1.111
by William Grant
Throw the view content into a new ivleview div (inside ivlebody) of the main |
89 |
<div id="ivleview"> |
90 |
${select('*')} |
|
91 |
</div> |
|
92 |
<div id="ivleoverlays"> |
|
93 |
<py:for each="overlay in overlays"> |
|
94 |
${overlay} |
|
95 |
</py:for> |
|
96 |
</div> |
|
1099.1.9
by chadnickbok at gmail
Created a new XHTMLView, which uses a Genshi template for rendering |
97 |
</div> |
98 |
</body> |
|
99 |
</py:match> |
|
100 |
${app_template} |
|
101 |
</html> |