<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      lang="en"
      metal:use-macro="context/main_template/macros/master"
      i18n:domain="xmldirector.plonecore">
<body>

<metal:main fill-slot="content-core">
    <metal:content-core define-macro="content-core">

        <h2 i18n:translate="">Validator Registry</h2>
        <a href="@@xmldirector-core-introspection" i18n:translate="">Back to introspection overview</a>
        <table class="listing" tal:define="entries view/get_entries" id="validator-registry">
            <thead>
                <tr>
                    <th i18n:translate="">Family</th>
                    <th i18n:translate="">Name</th>
                    <th i18n:translate="">Type</th>
                    <th i18n:translate="">Info</th>
                </tr>
            </thead>
            <tbody>                            
                <tr tal:condition="not: entries">
                    <td colspan="4" i18n:translate="">No entries</td>
                </tr>
                <tr tal:repeat="entry entries">
                    <td tal:content="entry/family"/>
                    <td>
                        <a tal:attributes="href string:@@validator-registry-view?family=${entry/family}&name=${entry/name};
                                           title entry/path" 
                           tal:content="entry/name"/>
                    </td>
                    <td tal:content="entry/type"/>
                    <td>
                        <label i18n:translate="">Size</label>: 
                        <span  tal:content="python: view.human_readable_filesize(entry['info']['st_size'])"/> 
                        <br/>
                        <label i18n:translate="">Modified</label>: 
                        <span tal:content="python: view.human_readable_datetime(entry['info']['modified_time'])"/>
                        (<span tal:content="python: entry['info']['modified_time'].isoformat()" />)
                        <br/>
                        <label i18n:translate="">Parsing time</label>: 
                        <span tal:content="python: '{:.3f}'.format(entry['duration'])"/>
                        <span i18n:translate="">seconds</span>
                    </td>
                </tr>
            </tbody>
        </table>

  </metal:content-core>
</metal:main>

</body>
</html>

