Commit abd5842a authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Allow to configure default view and tab lists.

The configuration is done on the WebSite level.
No custom JS code is needed.
parent 4f3bb0c9
......@@ -483,7 +483,7 @@ is_web_mode = (context.REQUEST.get(\'current_web_section\', None) is not None) o
# is_web_mode = traversed_document.isWebMode()\n
if is_web_mode:\n
site_root = context.getWebSectionValue()\n
view_action_type = site_root.getLayoutProperty("view_action_category", default=\'object_view\')\n
view_action_type = site_root.getLayoutProperty("configuration_view_action_category", default=\'object_view\')\n
else:\n
site_root = portal\n
view_action_type = "object_view"\n
......
......@@ -124,7 +124,8 @@
.push(function (jio_gadget) {\n
return jio_gadget.createJio({\n
type: "erp5",\n
url: (new URI(gadget.props.hateoas_url)).absoluteTo(location.href).toString()\n
url: (new URI(gadget.props.hateoas_url)).absoluteTo(location.href).toString(),\n
default_view_reference: gadget.props.default_view_reference\n
});\n
/*\n
return jio_gadget.createJio({\n
......@@ -730,7 +731,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>romain</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -744,7 +745,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>941.35159.4940.27904</string> </value>
<value> <string>941.39539.39866.22681</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -762,7 +763,7 @@
</tuple>
<state>
<tuple>
<float>1425893558.44</float>
<float>1426155464.07</float>
<string>GMT</string>
</tuple>
</state>
......
......@@ -6727,6 +6727,7 @@ Query.searchTextToRegExp = searchTextToRegExp;\n
"which contains more than one character.");\n
}\n
this._url = spec.url;\n
this._default_view_reference = spec.default_view_reference;\n
}\n
\n
ERP5Storage.prototype.get = function (param) {\n
......@@ -6761,7 +6762,8 @@ Query.searchTextToRegExp = searchTextToRegExp;\n
var action = param._attachment;\n
\n
if (action === "view") {\n
return getDocumentAndHateoas(this, param, {"_view": param._attachment})\n
return getDocumentAndHateoas(this, param,\n
{"_view": this._default_view_reference})\n
.push(function (response) {\n
var result = JSON.parse(response.target.responseText);\n
result._id = param._id;\n
......@@ -8062,7 +8064,7 @@ Query.searchTextToRegExp = searchTextToRegExp;\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>941.25435.3378.34969</string> </value>
<value> <string>941.36973.18728.63624</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -8080,7 +8082,7 @@ Query.searchTextToRegExp = searchTextToRegExp;\n
</tuple>
<state>
<tuple>
<float>1426000157.13</float>
<float>1426154290.54</float>
<string>GMT</string>
</tuple>
</state>
......
......@@ -61,8 +61,8 @@ default_web_page = web_section.getDefaultDocumentValue()\n
return default_web_page.WebPage_viewAsWeb(mapping_dict={\n
"frontpage_gadget": web_section.getLayoutProperty("configuration_frontpage_gadget_url", default=""),\n
"application_title": web_section.getLayoutProperty("configuration_application_title", default="ERP5"),\n
"action_view": web_section.getLayoutProperty("configuration_action_view", default="object_view"),\n
"default_view_reference": web_section.getLayoutProperty("configuration_default_view_reference", default="view"),\n
"action_view": web_section.getLayoutProperty("configuration_view_action_category", default="object_view"),\n
"default_view_reference": web_section.getLayoutProperty("configuration_default_view_action_reference", default="view"),\n
"hateoas_url": web_section.getLayoutProperty("configuration_hateoas_url", default="hateoas/")\n
})\n
</string> </value>
......
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