src/pyams_content_es/root/zmi/templates/advanced-search.pt
changeset 164 e48a3850c17a
child 178 7040403e9c95
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content_es/root/zmi/templates/advanced-search.pt	Sun Jul 19 02:11:57 2020 +0200
@@ -0,0 +1,246 @@
+<div class="ams-widget" i18n:domain="pyams_content_es">
+	<header>
+		<span tal:condition="view.widget_icon_class | nothing"
+			  class="widget-icon"><i tal:attributes="class view.widget_icon_class"></i>
+		</span>
+		<h2 tal:content="view.legend"></h2>
+		<tal:var content="structure provider:pyams.widget_title" />
+		<tal:var content="structure provider:pyams.toolbar" />
+	</header>
+	<div class="widget-body no-padding">
+		<div tal:define="prefix provider:form_prefix"
+			 tal:replace="structure prefix">Form prefix</div>
+		<tal:var content="structure provider:content_help" />
+		<form method="post"
+			  data-async
+			  tal:attributes="id view.id;
+							  name view.name;
+							  action view.get_form_action();
+							  method view.method;
+							  enctype view.enctype;
+							  acceptCharset view.acceptCharset;
+							  accept view.accept;
+							  autocomplete view.autocomplete;
+							  class view.css_class;
+							  data-ams-data tales:object_data(view);
+							  data-ams-form-handler view.get_ajax_handler() | nothing;
+							  data-ams-form-options view.get_form_options() | nothing;
+							  data-ams-form-submit-target view.form_target | nothing;
+							  data-ams-form-download-target view.download_target | nothing;
+							  data-ams-warn-on-change view.warn_on_change;">
+			<div class="modal-viewport">
+				<fieldset>
+					<div class="widgets-prefix"
+						 tal:define="prefix provider:widgets_prefix"
+						 tal:condition="prefix"
+						 tal:content="structure prefix">Widgets prefix</div>
+					<tal:loop repeat="group view.groups">
+						<fieldset tal:define="legend group.legend"
+								  tal:omit-tag="not:legend"
+								  tal:attributes="class 'bordered' if group.bordered else None">
+							<tal:if condition="group.checkbox_switch">
+								<legend data-ams-checker-value="selected"
+										tal:condition="legend"
+										tal:attributes="class group.css_class;
+														data-ams-checker-fieldname '{0}:list'.format(group.checkbox_widget.name);
+														data-ams-checker-readonly 'readonly' if group.checkbox_widget.mode == 'display' else None;
+														data-ams-checker-marker '{0}-empty-marker'.format(group.checkbox_widget.name);
+														data-ams-checker-state group.checker_state;">
+									<label tal:content="legend">Legend</label>
+								</legend>
+							</tal:if>
+							<tal:if condition="not:group.checkbox_switch">
+								<legend tal:condition="legend"
+										tal:content="legend"
+										tal:attributes="class group.css_class;
+														data-ams-switcher-state group.switcher_state;">Legend</legend>
+							</tal:if>
+							<tal:var define="help group.help" condition="help">
+								<div class=""
+									 tal:define="html import:pyams_utils.text.text_to_html;
+												 i18n_help html(request.localizer.translate(help));"
+									 tal:content="structure i18n_help"></div>
+							</tal:var>
+							<div class="form-group" tal:define="widget view.widgets['query']">
+								<label class="control-label col-md-3">
+									<span>
+										<tal:var content="widget.label" />
+										<i class="fa fa-question-circle hint" title="Input hint"
+										   tal:define="description widget.field.description"
+										   tal:condition="description"
+										   tal:attributes="title description;
+														   data-ams-hint-html '<' in description;"></i>
+									</span>
+								</label>
+								<div class="col-md-9">
+									<div class="input"
+										 tal:attributes="class widget.widget_css_class | default;
+														 data-ams-data tales:object_data(widget);
+														 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
+										<input tal:replace="structure widget.render()" />
+									</div>
+									<div class="input padding-10"
+										 tal:define="fulltext view.widgets['fulltext']"
+										 tal:attributes="class fulltext.widget_css_class | default;
+														 data-ams-data tales:object_data(widget);
+														 data-ams-form-validator view.get_widget_callback(fulltext.field.getName())">
+										<input tal:replace="structure fulltext.render()" />
+									</div>
+								</div>
+							</div>
+							<div class="form-group">
+								<tal:var define="widget view.widgets['owner']">
+									<label class="control-label col-md-3">
+										<span>
+											<tal:var content="widget.label" />
+											<i class="fa fa-question-circle hint" title="Input hint"
+											   tal:define="description widget.field.description"
+											   tal:condition="description"
+											   tal:attributes="title description;
+															   data-ams-hint-html '<' in description;"></i>
+										</span>
+									</label>
+									<div class="col-md-4">
+										<div class="input"
+											 tal:attributes="class widget.widget_css_class | default;
+															 data-ams-data tales:object_data(widget);
+															 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
+											<input tal:replace="structure widget.render()" />
+										</div>
+									</div>
+								</tal:var>
+							</div>
+							<div class="form-group">
+								<tal:var define="widget view.widgets['content_type']">
+									<label class="control-label col-md-3">
+										<span>
+											<tal:var content="widget.label" />
+											<i class="fa fa-question-circle hint" title="Input hint"
+											   tal:define="description widget.field.description"
+											   tal:condition="description"
+											   tal:attributes="title description;
+															   data-ams-hint-html '<' in description;"></i>
+										</span>
+									</label>
+									<div class="col-md-4">
+										<div class="input"
+											 tal:attributes="class widget.widget_css_class | default;
+															 data-ams-data tales:object_data(widget);
+															 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
+											<input tal:replace="structure widget.render()" />
+										</div>
+									</div>
+								</tal:var>
+							</div>
+							<div class="form-group">
+								<label class="control-label col-md-3">
+									<span i18n:translate="">Created between</span>
+								</label>
+								<div class="col-md-4">
+									<div class="input"
+										 tal:define="widget view.widgets['created_after']"
+										 tal:attributes="class widget.widget_css_class | default;
+														 data-ams-data tales:object_data(widget);
+														 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
+										<input tal:replace="structure widget.render()" />
+									</div>
+								</div>
+								<div class="control-label col-md-1 text-align-center">
+									<i18n:var translate=""> and </i18n:var>
+								</div>
+								<div class="col-md-4">
+									<div class="input"
+										 tal:define="widget view.widgets['created_before']"
+										 tal:attributes="class widget.widget_css_class | default;
+														 data-ams-data tales:object_data(widget);
+														 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
+										<input tal:replace="structure widget.render()" />
+									</div>
+								</div>
+							</div>
+							<div class="form-group">
+								<label class="control-label col-md-3">
+									<span i18n:translate="">Modified between</span>
+								</label>
+								<div class="col-md-4">
+									<div class="input"
+										 tal:define="widget view.widgets['modified_after']"
+										 tal:attributes="class widget.widget_css_class | default;
+														 data-ams-data tales:object_data(widget);
+														 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
+										<input tal:replace="structure widget.render()" />
+									</div>
+								</div>
+								<div class="control-label col-md-1 text-align-center">
+									<i18n:var translate=""> and </i18n:var>
+								</div>
+								<div class="col-md-4">
+									<div class="input"
+										 tal:define="widget view.widgets['modified_before']"
+										 tal:attributes="class widget.widget_css_class | default;
+														 data-ams-data tales:object_data(widget);
+														 data-ams-form-validator view.get_widget_callback(widget.field.getName())">
+										<input tal:replace="structure widget.render()" />
+									</div>
+								</div>
+							</div>
+							<fieldset tal:condition="'tags' in view.widgets">
+								<legend class="switcher" i18n:translate="">Tags</legend>
+								<div class="input"
+									 tal:define="widget view.widgets['tags']">
+									<input tal:replace="structure widget.render()" />
+								</div>
+							</fieldset>
+							<fieldset tal:condition="'collections' in view.widgets">
+								<legend class="switcher" i18n:translate="">Collections</legend>
+								<div class="input"
+									 tal:define="widget view.widgets['collections']">
+									<input tal:replace="structure widget.render()" />
+								</div>
+							</fieldset>
+						</fieldset>
+					</tal:loop>
+					<div class="widgets-suffix"
+						 tal:define="suffix provider:widgets_suffix"
+						 tal:condition="suffix"
+						 tal:content="structure suffix">Widgets suffix</div>
+					<div class="subforms"
+						 tal:condition="view.subforms">
+						<fieldset tal:define="title view.subforms_legend"
+								  tal:omit-tag="not:title">
+							<legend tal:condition="title" tal:content="title" i18n:translate="">Title</legend>
+							<tal:loop repeat="subform view.subforms">
+								<tal:var replace="structure subform.render()" />
+							</tal:loop>
+						</fieldset>
+					</div>
+					<div class="tabforms"
+						 tal:condition="view.tabforms">
+						<ul class="nav nav-tabs">
+							<li tal:repeat="tabform view.tabforms"
+								tal:attributes="class 'small {active} {errors}'.format(active='active' if repeat['tabform'].start() else '',
+																					   errors='state-error' if tabform.widgets.errors else '')">
+								<a data-toggle="tab"
+								   tal:attributes="href string:#${tabform.id}"
+								   tal:content="tabform.tab_label" i18n:translate="">Tab label</a>
+							</li>
+						</ul>
+						<div class="tab-content">
+							<div class="tab-pane fade in"
+								 tal:repeat="tabform view.tabforms"
+								 tal:attributes="id tabform.id;
+												 class 'tab-pane {active} fade in'.format(active='active' if repeat['tabform'].start() else '');"
+								 tal:content="structure tabform.render()"></div>
+						</div>
+					</div>
+				</fieldset>
+			</div>
+			<footer>
+				<button tal:repeat="action view.actions.values()"
+						tal:replace="structure action.render()">Action</button>
+			</footer>
+		</form>
+		<div tal:define="prefix provider:form_suffix"
+			 tal:replace="structure prefix">Form suffix</div>
+	</div>
+</div>