<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html metal:use-macro="container/page_macro/macros/master_page">

<span metal:fill-slot="breadcrumbs">
   &gt;  <a tal:attributes="href python:kursus.absolute_url()+'/wordmaps/wordmaps_index_html'" i18n:translate="">wordmaps</a> 
   <span tal:repeat="wmap context/getWordmapTree" tal:omit-tag="" tal:on-error="python:''"> &gt; 
     <a tal:attributes="href wmap/absolute_url" tal:content="wmap/id"></a></span>
</span>

<span tal:omit-tag="" metal:fill-slot="main_content_slot"
       tal:define="add_new context/add_new_wordmap">
       <h3 i18n:translate="" tal:condition="not:add_new">Wordmap settings</h3>
       <h3 i18n:translate="" tal:condition="add_new">Add new wordmap</h3>
       <form tal:attributes="action python:test(add_new, 'wordmaps_adding_page_handler', 'wordmaps_management_page_handler')">
           <table>
              <tr tal:define="title context/getTitle | request/title | nothing">
                 <td i18n:translate="">Title:</td>
                 <td><input type="text" name="title" tal:attributes="value title" /></td>
              </tr>
              <tr tal:define="descr context/getDescription | request/description | nothing">
                 <td i18n:translate="">Description</td>
                 <td><textarea name="description" tal:content="descr" rows="5" cols="60"></textarea></td>
              </tr>
              <tr>
                 <td i18n:translate="">Font</td>
                 <td>
                     <select name="font" tal:define="fontindex here/getFontIndex | request/font | python:0">
                        <span tal:repeat="t here/getFontNames" tal:omit-tag="">
                           <option tal:define="nr repeat/t/index" tal:attributes="value repeat/t/index; selected python:test(nr==int(fontindex), 'selected', nothing)" tal:content="t" i18n:translate=""></option>
                        </span>
                     </select>
                 </td>
              </tr>
              <tr>
                 <td i18n:translate="">Colors, default color:</td>
                 <td>
                     <table tal:define="cindex context/getWordBackgroundColorIndex | request/colorindex | python:0 ">
                        <tr tal:repeat="c here/getWordBackgroundColors">
                          <td tal:define="nr repeat/c/index" ><input type="radio" name="colorindex" tal:attributes="value repeat/c/index; checked python: test(nr==int(cindex), 'checked', nothing)" /></td>
                          <td tal:attributes="style python:'width:200px'+chr(59)+' background-color:'+c;"></td>
                          <td tal:define="nr repeat/c/index" >
                            <input type="text" name="wordcolortype" tal:condition="python: add_new and not hasattr(request, 'wordcolortype')" />
                            <input type="text" name="wordcolortype" tal:condition="python: add_new and hasattr(request, 'wordcolortype')" 
                                   tal:attributes="value python:getattr(request, 'wordcolortype')[nr]"/>
                            <input type="text" name="wordcolortype" tal:condition="not:add_new"
                               tal:attributes="value python:here.getWordColorType(nr)" />
                          </td>
                        </tr>
                     </table>
                 </td>
              </tr>
           </table><br />
           <input type="submit" tal:attributes="value python: test(add_new, 'Create', 'Save')" i18n:attributes="value"/>
       </form>
       <h3 i18n:translate="" tal:condition="not:add_new">Data export</h3>
       <ul tal:condition="not:add_new">
          <li><a href="dataList" i18n:translate="">CSV</a></li>
          <li><a href="getPicture" i18n:translate="">Picture</a></li>
          <li><a href="XTMExportWWW">XML</a></li>
       </ul><br />
       <a href="." tal:condition="not:add_new"><img src="getPlanPicture" alt="picture"  /></a><br />
</span>

</html>

