<h1 tal:content="here/title_or_id">Nadpis</h1> <h2>Váš košík</h2> <form action="deleteItems" tal:define="global format_money nocall:modules/Products/PythonScripts/standard/dollars_and_cents; global current_items here/currentItems" tal:condition="current_items"> <table cellpadding="8" cellspacing="0" border="0"> <tr align="left" class="normal"> <th></th> <th>Položka</th> <th>Cena</th> <th>Množství</th> </tr> <tr valign="top" class="small" tal:repeat="item current_items"> <td><input type="checkbox" name="ids:list" value="id" tal:attributes="value item/id"></td> <td tal:content="item/title">Položka</td> <td tal:define="price item/price" tal:content="python:format_money(price)">10.00 Kč</td> <td tal:content="item/quantity">2</td> </tr> <tr> <td colspan="4"><input type="submit" value="Smazat položky"></td> </tr> <tr align="left" class="normal"> <td colspan="2"></td> <th colspan="2"> Součet<br><span tal:define="total here/getTotal" tal:replace="python:format_money(total)">25.00 Kč</span> </th> </tr> </table> </form> <p tal:condition="not:current_items"><b>Košík je prázdný.</b></p> <h2>Přidat položky</h2> <form action="addItems"> <table cellpadding="8" cellspacing="0" border="0"> <tr align="left" class="normal"> <th>Položka</th> <th>Popis</th> <th>Cena</th> <th>Množství</th> </tr> <tr valign="top" class="small" tal:repeat="item here/getItem"> <td tal:content="item/title">Položka</td> <td tal:content="item/description">Popis</td> <td tal:define="price item/price" tal:content="python:format_money(price)">10.00 Kč</td> <td><input type="hidden" name="orders.id:records" value="id" tal:attributes="value item/id"> <input type="text" name="orders.quantity:records" value="0" size="3"></td> </tr> <tr> <td colspan="2"></td> <td colspan="2"><input type="submit" value="Přidat položky"></td> </tr> </table> </form>