Source

chempound / chempound-webapp / src / main / resources / net / chempound / templates / search-form.ftl

Full commit
<@layout.page
    title="Search"
>

<h1>Search Data</h1>

<div id="tabs">

    <ul>
<#list providers as provider>
        <li><a href="#tabs-${provider_index}">${provider.name}</a></li>
</#list>
    </ul>

    <#list providers as provider>
    <div id="tabs-${provider_index}" class="search search-${provider.id}">
        <h2>${provider.name}</h2>
        <form action="${URI_BASE}/search/" method="get">
            <input name="search_provider" type="hidden" value="${provider.id}" />

            <#list provider.fields as field>
                <p>
                    <label>${field.label}</label>
                    <input name="${field.id}" type="text" />
                    <#if field.type.name() == 'NUMBER'>
                    <select name="${field.id}_op">
                        <option>gt</option>
                        <option>lt</option>
                        <option>eq</option>
                    </select>
                    </#if>
                </p>
            </#list>

            <br/>
            <input type="submit" name="submit" value="search"/> <#--<input type="submit" name="submit" value="pivot" />-->
        </form>

        <hr />
    </div>
    </#list>

</div>

<script type="text/javascript">
    $(function() {
		$("#tabs").tabs();
	});
</script>

</@layout.page>