Commit ccf2c29d authored by Ivan Tyagov's avatar Ivan Tyagov

If a tab is rendered inline make a simple check and show a message to user if...

If a tab is rendered inline make a simple check and show a message to user if tab can not be rendered.
This is especially nasty when for example user tries to open a tab, it fails (then tabs' Id cookie is saved in user browser). Next page view will brake whole ERP5 front page (then this failing tab is loaded inlined).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32783 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent df9ac783
......@@ -44,13 +44,19 @@
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
tal:define="tab here/ERP5Site_getSelectedTab;\n
preferred_access_tab python:here.portal_preferences.getPreferredHtmlStyleAccessTab()">\n
<tal:block tal:condition="python:tab is not None and preferred_access_tab">\n
<tal:block tal:condition="python:tab is not None and preferred_access_tab"\n
tal:define="tab_renderer_form_object python: getattr(here, tab[\'renderer\'], None)">\n
<metal:block use-macro="here/erp5_site_main_template/macros/master">\n
<metal:block fill-slot="tabs">\n
<tal:block tal:replace="structure python:here.ERP5Site_renderTabList(selected_tab=tab[\'id\'])" />\n
</metal:block>\n
<metal:block fill-slot="content">\n
<tal:block tal:replace="structure python:getattr(here, tab[\'renderer\'])()" />\n
<tal:block tal:condition="tab_renderer_form_object"\n
tal:replace="structure python: tab_renderer_form_object()" />\n
<tal:block tal:condition="not: tab_renderer_form_object">\n
Server side error.\n
</tal:block>\n
\n
</metal:block>\n
</metal:block>\n
</tal:block>\n
......
898
\ No newline at end of file
899
\ No newline at end of file
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