<metal:block use-macro="container/macro_edit_view/macros/edit_view">

<metal:block fill-slot="edit_input">
<tal:block define="global code_objects here/get_code_objects" />

<tal:block condition="not: code_objects">
  &nbsp;No code objects (Python Scripts, Page Templates, DTML Methods) are
  available.<br /> &nbsp;They should be located in a (non-Silva) folder in
  the ZMI named <tt>code_source</tt>.
</tal:block>

<tal:block tal:condition="code_objects">
  &nbsp;Available code objects:<br />
  &nbsp;<select class="manipulator" name="path">
    <tal:block 
      define="selected_path python:node.getAttribute('path')"
      repeat="obj code_objects">
      <option 
        tal:define="
          title obj/title; 
          path obj/path;"
        tal:attributes="
          value path; 
          selected python:test(path == selected_path, 'selected', None)" 
        tal:content="string: ${title} (${path})" />
    </tal:block>
  </select>
</tal:block>
</metal:block>

<metal:block fill-slot="edit_notes">
<ul class="tips">
  <li>Select the code to be executed when document is displayed.</li>
  <li><b>Tip:</b> tab to the exit button or alt-e.</li>
</ul>
</metal:block>

</metal:block>
