This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
pfwbged.folder/src/pfwbged/folder/templates/folder_view.pt

45 lines
1.4 KiB
XML

<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="plone.app.dexterity">
<body>
<metal:main fill-slot="main">
<h1 class="documentFirstHeading" tal:content="context/Title" />
<div tal:replace="structure provider:plone.belowcontenttitle" />
<input type="hidden" name="folder_intid" tal:attributes="value context/intid"/>
<div id="searchresults"/>
<script>
$.querywidget.updateSearch = function () {
var context_url = (function() {
var baseUrl, pieces;
baseUrl = $('base').attr('href');
if (!baseUrl) {
pieces = window.location.href.split('/');
pieces.pop();
baseUrl = pieces.join('/');
}
return baseUrl;
})();
var query = context_url + "/@@querybuilder_html_results?";
query += "query.i:records=object_folders&query.o:records=plone.app.querystring.operation.int.is&query.v:records:list=";
query += $("input[name='folder_intid']").val();
query += '&sort_on=sortable_title';
$.querywidget.runQuery(query);
};
$(function() {
$.querywidget.updateSearch();
});
</script>
</metal:main>
</body>
</html>