source: MILK/trunk/milk_server/milk_server/templates/layout.html @ 5201

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MILK/trunk/milk_server/milk_server/templates/layout.html@5201
Revision 5201, 3.0 KB checked in by cbyrom, 11 years ago (diff)

Add functionality to allow vocab term searches to be done via an
ajax enabled, autocomplete text input. Add new controller and template
packages for this as well as javascript and style sheets. Also update
routing and add (commented out) example of usage in layout + add
documentation on how to use.

Line 
1<html lang="en" xmlns="http://www.w3.org/1999/xhtml" 
2        xmlns:py="http://genshi.edgewall.org/"
3        xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="">
4<xi:include href="ndgPage.html" />
5<!--  to see the vocab server autocomplete working, uncomment this line and the line further down
6<xi:include href="vocabsearch/vocabsearch.html" />
7-->
8<?python from milk_server.controllers.atom_editor.editorconstants import *?>
9
10  <py:match path="head" once="true">
11    <head py:attrs="select('@*')">
12      <title py:with="title = list(select('title/text()'))">
13        <py:if test="title">${title}</py:if>
14      </title>
15                ${Markup(h.javascript_include_tag(builtins=True))}
16                <script type="text/javascript" src="$g.server/js/yui/build/yui/yui-min.js" />
17            <script type="text/javascript" src="$g.server/js/toggleDiv.js"/>
18        <script type="text/javascript" src="$g.server/js/ndgJavascript.js"/>
19        <link media="all, screen" href="$g.server/layout/style/ndg2.css" 
20                type="text/css" rel="stylesheet"/>
21
22                <!--! Include anything else specified in the parent template header -->
23            ${select('*[local-name()!="title"]')}
24    </head>
25  </py:match>
26
27  <py:match path="body" once="true">
28    <body py:attrs="select('@*')" onUnload="Div_hide('loading');">
29    <div id="entirepage">
30      <div py:replace="header()"/>
31      ${Markup(c.tbinfo)}
32      <div py:if="g.discoveryEnabled">
33                  <span py:with="panelTab = select('panelTab/text()')" py:strip="">
34                    <py:if test="panelTab">
35                      <div py:replace="PageTabs(panelTab)"/>
36                    </py:if>
37                  </span>
38              <div py:replace="searchOneLine()"/>
39          </div>
40      <div py:if="g.browseEnabled or g.atomEditorEnabled">
41            <div py:replace="localTextSearch()"/>
42          </div>
43<!--  to see the vocab server autocomplete working, uncomment this line and the line further up
44          <div py:replace="vocabSearchAutoComplete()" />
45-->
46      <div id="content">
47                <table py:if="g.atomEditorEnabled and c.title != ATOM_HOME_TITLE" class="homeHelpBar">
48                        <tr><td align="left">
49                            <a href="${h.url_for('atomHome')}">Home</a>
50                            </td><td align="right"><a py:if="c.title != HELP_PAGE_TITLE" href="${h.url_for('help')}">Help</a>
51                            </td></tr>
52                    </table>
53                        <div class="javascriptWarning"><script type="text/javascript"><!--
54                        document.write("<div style='display:none' id='moreinfo'>");
55                        //-->
56                        </script>WARNING: You currently have javascript disabled.  For these pages to work correctly, please enable javascript.<script type="text/javascript"><!--
57                        document.write("</div>");
58                        //--></script></div>
59                <div id="loading" class='hidden'><img src="$g.loadingIcon" alt="Loading" />Please wait...</div>
60                    ${select('*[local-name()!="panelTab" and local-name()!="includeCorrectionLink"]')}
61      </div>
62          <span py:with="corrLink = list(select('includeCorrectionLink/text()'))" py:strip="">
63            <py:if test="corrLink">
64              <div py:replace="corrections()"/>
65            </py:if>
66          </span>
67      <div py:replace="footer()"/>
68    </div>
69    </body>
70  </py:match>
71</html>
Note: See TracBrowser for help on using the repository browser.