Update of /cvsroot/happydoc/HappyDoc3/TestCases/TAL
In directory sc8-pr-cvs1:/tmp/cvs-serv27384/TestCases/TAL
Added Files:
header.pt testtal.pt
Log Message:
Test templates for verifying that the TAL module is working properly.
--- NEW FILE: header.pt ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head metal:define-macro="html_header"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<title metal:define-slot="title">Title from header.pt</title>
<metal:block metal:define-slot="head_slot">
This is the head_slot part of the header.
</metal:block>
</head>
<body>
<p>Contains the html_header macro.</p>
</body>
</html>
--- NEW FILE: testtal.pt ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
lang="en-US"
>
<head metal:use-macro="templates/header.pt/macros/html_header">
<title metal:fill-slot="title">Override title</title>
</head>
<body>
<div>
<table border="0" cellpadding="5" cellspacing="5">
<tr>
<td>
<a href="http://my.weather.com/weather/map/30605?name=index_large&day=1" target="_blank">
<img border=0
src="http://image.weather.com/web/radar/us_atl_closeradar_small_usen.jpg">
</a>
</td>
</tr>
<tr>
<td>
<a href="http://www.weather.com/weather/local/30605"
target="_blank">
<img border=1 width=270 height=140 SRC="http://oap.weather.com/fcgi-bin/oap/generate_magnet?loc_id=USGA0027&code=482224"></a>
</td>
</tr>
</table>
<h2>Call Me</h2>
<div tal:content="python: here.callMe()">It was not called.</div>
<div tal:define="foo string:bar">
<span tal:content="foo">Not foo</span>
</div>
<div tal:define="foo python:'bar as python string'">
<span tal:content="foo">Not foo</span>
</div>
<ul tal:define="items python:['foo', 'bar', 'blah', 'bletch']">
<li tal:repeat="item items">
<p tal:content="item">Item goes here</p>
</li>
</ul>
<span tal:condition="python: 1">Should see this.</span>
<span tal:condition="python: 0">Should not see this.</span>
<span tal:condition="nothing">Should not see this.</span>
<span tal:condition="not: python: 1">Should not see this.</span>
<span tal:condition="not: not: nothing">Should not see this.</span>
<h2>Athens, Structure</h2>
<div tal:content="structure here/Athens">Athens Weather</div>
<h2>Atlanta, Structure</h2>
<div tal:content="structure here/Atlanta">Atlanta Weather</div>
<h2>Athens, No Structure</h2>
<div tal:content="here/Athens">Athens Weather</div>
<h2>Atlanta, No Structure</h2>
<div tal:content="here/Atlanta">Atlanta Weather</div>
<span tal:content="here/name">Should show name.</span>
<span tal:content="here/foo">Should say name-foo.</span>
<span tal:content="modules/happydoclib.docset.docset_TAL.test_module/GotTest">Did you get it?</span>
<span tal:content="modules/happydoclib.docset.docset_TAL.test_module/GotTestFunc">Did you get it?</span>
<span tal:content="modules/test_module/GotTestFunc">Did you get it?</span>
</div>
</body>
</html>
|