Commit 819e3e4d authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web: Make top bar configurable from web site properties.

parent 8985fc74
......@@ -85,6 +85,7 @@
<string>my_layout_sale_order_notification_reference</string>
<string>my_layout_login_password_notification_reference</string>
<string>my_layout_opentrade_deliver_notification_reference</string>
<string>my_layout_top_bar_widget_reference</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_layout_top_bar_widget_reference</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Subscription Contract Reference</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -6,6 +6,7 @@
current_web_site python:request.get('current_web_site', here);
logout_form_id python:current_web_site.getLayoutProperty('layout_logout_form_id','WebSite_logout');
login_form_id python:current_web_site.getLayoutProperty('layout_login_form_id','login_form');
top_bar_widget_reference python:current_web_site.getLayoutProperty('layout_top_bar_widget_reference','slapos-Top.Bar.Widget.Links');
language_list current_web_site/Localizer/get_languages_map;
dummy python: language_list.sort(key=lambda x: x['selected'], reverse=True);
available_language_list current_web_site/getAvailableLanguageList;">
......@@ -48,9 +49,9 @@
</div>
<div id="menu">
<tal:block tal:define="message python:here.getDocumentValue('slapos-Top.Bar.Widget.Links').asStrippedHTML()"
<tal:block tal:define="message python:here.getDocumentValue(top_bar_widget_reference).asStrippedHTML()"
tal:content="structure message"
tal:condition="python:here.getDocumentValue('slapos-Top.Bar.Widget.Links')">
tal:condition="python:here.getDocumentValue(top_bar_widget_reference)">
</tal:block>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment