src/pyams_portal/zmi/templates/template-properties.pt
changeset 177 27cf196f066c
child 178 a1cd70c6496f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_portal/zmi/templates/template-properties.pt	Tue Sep 04 17:31:38 2018 +0200
@@ -0,0 +1,92 @@
+<div class="ams-widget" i18n:domain="pyams_portal">
+	<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:form_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 class="padding-x-20"
+						  tal:define="content view.getContent()">
+					<div class="widgets-prefix"
+						 tal:omit-tag="getattr(view, 'hide_widgets_prefix_div', False)"
+						 tal:define="prefix provider:widgets_prefix"
+						 tal:condition="prefix"
+						 tal:content="structure prefix">Widgets prefix</div>
+					<div class="clearfix"></div>
+					<div tal:condition="content.can_inherit">
+						<div class="form-group no-margin">
+							<label class="radio">
+								<input type="radio"
+									   value="inherit"
+									   id="inherit_template_mode"
+									   name="template_mode"
+									   checked="${'checked' if content.inherit_parent else None}" />
+								<i></i><span i18n:translate="">${view.inherit_legend}</span>
+							</label>
+						</div>
+					</div>
+					<div class="form-group no-margin">
+						<label class="radio">
+							<input type="radio"
+								   value="shared"
+								   id="shared_template_mode"
+								   name="template_mode"
+								   checked="${'checked' if content.use_shared_template else None}" />
+							<i></i><span i18n:translate="">Use shared template</span>
+						</label>
+					</div>
+					<div class="form-group">
+						<div class="required-field">
+							<div class="control-label col-md-2">
+								<span i18n:translate="">Selected template</span>
+							</div>
+							<div class="col-md-8">
+								<div class="input">${structure:view.widgets['shared_template'].render()}</div>
+							</div>
+						</div>
+					</div>
+					<div class="form-group no-margin">
+						<label class="radio">
+							<input type="radio"
+								   value="local"
+								   id="local_template_mode"
+								   name="template_mode"
+								   checked="${'checked' if content.use_local_template else None}" />
+							<i></i><span i18n:translate="">Use custom local template</span>
+						</label>
+					</div>
+				</fieldset>
+			</div>
+			<footer tal:condition="view.actions and (view.is_dialog or (view.mode == 'input'))">
+				<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>