Commit 10681c93 authored by Ayush Tiwari's avatar Ayush Tiwari
Browse files

bt5_config: Move erp5_xhtml_style to BM5 format

parent 8bc6d650

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="AcceleratedHTTPCacheManager" module="Products.StandardCacheManagers.AcceleratedHTTPCacheManager"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_AcceleratedHTTPCacheManager__cacheid</string> </key>
<value> <string>140293738026600_1232739699.222134</string> </value>
</item>
<item>
<key> <string>_settings</string> </key>
<value>
<dictionary>
<item>
<key> <string>anonymous_only</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>interval</string> </key>
<value> <int>3600</int> </value>
</item>
<item>
<key> <string>notify_urls</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>public</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>stale_if_error_interval</string> </key>
<value> <int>360000</int> </value>
</item>
<item>
<key> <string>stale_while_revalidate_interval</string> </key>
<value> <int>360000</int> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>anonymous_http_cache</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="AcceleratedHTTPCacheManager" module="Products.StandardCacheManagers.AcceleratedHTTPCacheManager"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_AcceleratedHTTPCacheManager__cacheid</string> </key>
<value> <string>140293585282304_1232739770.351467</string> </value>
</item>
<item>
<key> <string>_settings</string> </key>
<value>
<dictionary>
<item>
<key> <string>anonymous_only</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>interval</string> </key>
<value> <int>3600</int> </value>
</item>
<item>
<key> <string>notify_urls</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>public</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>stale_if_error_interval</string> </key>
<value> <int>360000</int> </value>
</item>
<item>
<key> <string>stale_while_revalidate_interval</string> </key>
<value> <int>360000</int> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="RAMCacheManager" module="Products.StandardCacheManagers.RAMCacheManager"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_RAMCacheManager__cacheid</string> </key>
<value> <string>140571995811424_1232605080.630355</string> </value>
</item>
<item>
<key> <string>_settings</string> </key>
<value>
<dictionary>
<item>
<key> <string>cleanup_interval</string> </key>
<value> <int>300</int> </value>
</item>
<item>
<key> <string>max_age</string> </key>
<value> <int>3600</int> </value>
</item>
<item>
<key> <string>request_vars</string> </key>
<value>
<tuple>
<string>AUTHENTICATED_USER</string>
<string>LOCALIZER_LANGUAGE</string>
<string>current_web_site_url</string>
</tuple>
</value>
</item>
<item>
<key> <string>threshold</string> </key>
<value> <int>1000</int> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>user_ram_cache</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>erp5_html_compatibility</skin_folder>
<skin_selection>View</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_xhtml_style</skin_folder>
<skin_selection>View</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_access_tab</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
if search_section_path is not None:
section_value = context.getPortalObject().restrictedTraverse(search_section_path)
return section_value.countResults(**kw)
return context.portal_catalog.countResults(**kw)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_section_path=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_countAdvancedSearchResultList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
if search_section_path is not None:
section_value = context.getPortalObject().restrictedTraverse(search_section_path)
return section_value.searchResults(**kw)
return context.portal_catalog(**kw)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>search_section_path=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getAdvancedSearchResultList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ERP5Type.Cache import CachingMethod
def getModuleActionInformationDict(**kw):
Base_translateString = context.Base_translateString
result_dict = {}
# If the user is not allowed to get the category, return immediately.
portal = context.getPortalObject()
business_application = portal.restrictedTraverse('portal_categories/business_application',
None)
if business_application is None:
return result_dict
renderCustomLink = portal.ERP5Site_renderCustomLink
listFilteredActionsFor = portal.portal_actions.listFilteredActionsFor
cancel_url = portal.absolute_url()
# Use searchFolder, because security checks are required, and sorting
# is not supported by listFolderContents.
for o in business_application.searchFolder(sort_on='int_index'):
module_category = o.getObject()
module_list = module_category.getBusinessApplicationRelatedValueList(
checked_permission='View',
portal_type=portal.getPortalModuleTypeList())
# It is necessary to sort the modules by translated titles for convenience.
titled_module_list = [(module.getTranslatedTitle(), module) for module in module_list]
titled_module_list.sort(key=lambda x: x[0])
view_list = []
add_list = []
search_list = []
exchange_list = []
report_list = []
print_list = []
for translated_title, module in titled_module_list:
module_url = module.absolute_url()
action_dict = module.Base_filterDuplicateActions(listFilteredActionsFor(module))
# Obtain a form id and a selection name from the view.
# XXX Is it useful ?
form_id = 'view'
selection_name = 'default_selection'
for ai in action_dict['object_view']:
if ai['id'] == 'view':
form_id = ai['url'].rsplit('/', 1)[-1]
form = getattr(portal, form_id, None)
if form is not None:
listbox = form.Form_getListbox()
if listbox is not None:
selection_name = listbox.get_value('selection_name')
break
# Collect view actions.
module_view_list = [(None, '%s/view' % module_url)]
view_list.append((translated_title, module_view_list))
# Collect add actions.
module_add_list = []
for content_type in module.getVisibleAllowedContentTypeList():
action = 'add %s' % content_type
url = renderCustomLink('%s/Base_doAction' % module_url,
dict(cancel_url=cancel_url,
form_id=form_id,
selection_name=selection_name,
select_action=action))
module_add_list.append((Base_translateString(content_type), url))
for template in module.getDocumentTemplateList():
action = 'template %s' % template.getRelativeUrl()
url = renderCustomLink('%s/Base_doAction' % module_url,
dict(cancel_url=cancel_url,
form_id=form_id,
selection_name=selection_name,
select_action=action))
template_name = Base_translateString('${template_title} (Template)',
mapping=dict(template_title=template.getTitle()))
module_add_list.append((template_name, url))
if module_add_list:
add_list.append((translated_title, module_add_list))
# Collect search actions.
module_search_list = []
for search_action in action_dict.get('object_search', ()):
url = renderCustomLink(search_action['url'],
dict(cancel_url=cancel_url,
form_id=form_id,
selection_name=selection_name,
dialog_category='object_search')).strip()
module_search_list.append((Base_translateString(search_action['name']), url))
if module_search_list:
search_list.append((translated_title, module_search_list))
# Collect exchange actions.
module_exchange_list = []
for exchange_action in action_dict.get('object_exchange', ()):
url = renderCustomLink(exchange_action['url'],
dict(cancel_url=cancel_url,
form_id=form_id,
selection_name=selection_name,
dialog_category='object_exchange')).strip()
module_exchange_list.append((Base_translateString(exchange_action['name']), url))
if module_exchange_list:
exchange_list.append((translated_title, module_exchange_list))
# Collect report actions.
module_report_list = []
for report_action in action_dict.get('object_report', ()):
url = renderCustomLink(report_action['url'],
dict(cancel_url=cancel_url,
form_id=form_id,
selection_name=selection_name,
dialog_category='object_report')).strip()
module_report_list.append((Base_translateString(report_action['name']), url))
if module_report_list:
report_list.append((translated_title, module_report_list))
# Collect print actions.
module_print_list = []
for print_action in action_dict.get('object_print', ()):
url = renderCustomLink(print_action['url'],
dict(cancel_url=cancel_url,
form_id=form_id,
selection_name=selection_name,
dialog_category='object_print')).strip()
module_print_list.append((Base_translateString(print_action['name']), url))
if module_print_list:
print_list.append((translated_title, module_print_list))
# Add the actions, only if they are not empty.
action_list_dict = {}
for k, v in (('add', add_list), ('search', search_list),
('exchange', exchange_list), ('report', report_list),
('print', print_list), ('view', view_list)):
if v:
result_dict.setdefault(k, []).append((module_category.getTitle(), v))
return result_dict
getModuleActionInformationDict = CachingMethod(getModuleActionInformationDict,
id='ERP5Site_getModuleActionInformationDict',
cache_factory='erp5_ui_long')
# those parameters are only used for the caching key
return getModuleActionInformationDict(
user = context.portal_membership.getAuthenticatedMember().getId(),
server_url = context.REQUEST.SERVER_URL,
language = context.Localizer.get_selected_language())
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getCategorizedModuleActionInformationDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ERP5Type.Cache import CachingMethod
portal = context.getPortalObject()
def getConfiguredStatusDict():
# Probe known skins to determine whether erp5_base and erp5_dms are installed.
basic_mode = (getattr(context, 'Currency_view', None) is not None)
dms_mode = (getattr(context, 'DocumentModule_viewDocumentList', None) is not None)
express_pref_dict = context.ERP5Site_getExpressPreferenceDict()
subscription_status = express_pref_dict.get('subscription_status')
configuration_status = express_pref_dict.get('configuration_status')
user_id = express_pref_dict.get('user_id')
SUPPORT_ENABLED = 'support_enabled'
SUPPORT_DISABLED = 'support_disabled'
ADVERTISEMENT_ENABLED = 'advertisement_enabled'
if getattr(portal, 'portal_wizard', None) is None:
express_mode = SUPPORT_DISABLED
elif subscription_status:
if user_id:
express_mode = SUPPORT_ENABLED
else:
express_mode = SUPPORT_DISABLED
else:
express_mode = ADVERTISEMENT_ENABLED
return basic_mode, dms_mode, express_mode
getConfiguredStatusDict = CachingMethod(getConfiguredStatusDict, \
id = 'ERP5Site_getConfiguredStatusDict', \
cache_factory = 'erp5_ui_long')
basic_mode, dms_mode, express_mode = getConfiguredStatusDict()
# One more test for express
# If a user uses an account for configurator, only express tab will be displayed.
member = portal.portal_membership.getAuthenticatedMember()
role_list = list(member.getRoles())
role_list.sort()
group_list = ()
getGroups = getattr(member, 'getGroups', None)
if role_list == ['Authenticated', 'Member'] and not getGroups():
basic_mode = False
dms_mode = False
return {'basic_mode': basic_mode,
'dms_mode': dms_mode,
'express_mode': express_mode,}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getConfiguredStatusDict</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ProxyRole(Manager)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
tool = context.portal_preferences
subscription_status = tool.getPreference('preferred_express_subscription_status')
configuration_status = tool.getPreference('preferred_express_configuration_status')
user_id = tool.getPreference('preferred_express_user_id')
return {'subscription_status':subscription_status,
'configuration_status':configuration_status,
'user_id':user_id,
}
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getExpressPreferenceDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
language = context.Localizer.get_selected_language()
SUPPORT_ENABLED = 'support_enabled'
SUPPORT_DISABLED = 'support_disabled'
ADVERTISEMENT_ENABLED = 'advertisement_enabled'
if express_mode==SUPPORT_ENABLED:
# For Express users.
proxy_path = 'web_site_module/express_frame/WebSite_viewExpressCustomerSupportMenu'
elif express_mode==SUPPORT_DISABLED:
return ''
else:
# Advertisement
# XXXX FIX THIS URL!!!
proxy_path = 'web_site_module/express_frame/WebSite_viewDummyAdvertisement'
# XXX we need to think about https
traverse_subpath = proxy_path.split('/')
context.REQUEST.set('traverse_subpath', traverse_subpath)
return context.portal_wizard.proxy()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>express_mode</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getExpressSupportHTML</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
tab_list = context.ERP5Site_getTabList()
if tab_list:
# Obtain the selected tab from the request. This is typically a cookie.
selected_tab = context.REQUEST.get('erp5_site_selected_tab', None)
for tab in tab_list:
if tab['id'] == selected_tab:
break
else:
# If not matched, use the first one.
tab = tab_list[0]
else:
tab = None
# Renew a cookie, if possible.
if tab is not None:
context.REQUEST.RESPONSE.setCookie('erp5_site_selected_tab', tab['id'])
return tab
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_getSelectedTab</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from Products.ERP5Type.Cache import CachingMethod
def getTabList(status_dict, info_dict, add_all_tabs):
tab_list = []
basic_mode = status_dict.get('basic_mode', 1)
dms_mode = status_dict.get('dms_mode', 1)
express_mode = status_dict.get('express_mode', 1)
if dms_mode or add_all_tabs:
tab_list.append({'id': 'quick_search_tab',
'icon': 'tab_icon/access_search.png',
'renderer': 'ERP5Site_renderQuickSearchDialog',
'title': 'Quick Search'})
tab_list.append({'id': 'contribution_tab',
'icon': 'tab_icon/share.png',
'renderer': 'ERP5Site_renderContributionDialog',
'title': 'Contribute'})
if basic_mode or add_all_tabs:
if info_dict.get('view') or add_all_tabs:
tab_list.append({'id': 'browse_tab',
'icon': 'tab_icon/list.png',
'renderer': 'ERP5Site_renderViewActionList',
'title': 'Browse'})
if info_dict.get('add') or add_all_tabs:
tab_list.append({'id': 'document_creation_tab',
'icon': 'tab_icon/filenew.png',
'renderer': 'ERP5Site_renderDocumentCreationActionList',
'title': 'New'})
if info_dict.get('search') or add_all_tabs:
tab_list.append({'id': 'document_search_tab',
'icon': 'tab_icon/filefind.png',
'renderer': 'ERP5Site_renderDocumentSearchActionList',
'title': 'Dig'})
if info_dict.get('report') or add_all_tabs:
tab_list.append({'id': 'report_tab',
'icon': 'tab_icon/webexport.png',
'renderer': 'ERP5Site_renderReportActionList',
'title': 'Reports'})
if info_dict.get('print') or add_all_tabs:
tab_list.append({'id': 'printout_tab',
'icon': 'tab_icon/ps.png',
'renderer': 'ERP5Site_renderPrintActionList',
'title': 'Printouts'})
if info_dict.get('exchange') or add_all_tabs:
tab_list.append({'id': 'exchange_tab',
'icon': 'tab_icon/imp-exp.png',
'renderer': 'ERP5Site_renderExchangeActionList',
'title': 'Exchange'})
if express_mode in ('support_enabled', 'advertisement_enabled') or add_all_tabs:
tab_list.append({'id': 'express_support_tab',
'icon': 'tab_icon/support.png',
'renderer': 'ERP5Site_renderExpressSupport',
'title': 'Express Support'})
return tab_list
status_dict = {}
info_dict = {}
if not add_all_tabs:
# we have to calculate possible tabs
status_dict = context.ERP5Site_getConfiguredStatusDict()
info_dict = context.ERP5Site_getCategorizedModuleActionInformationDict()
getTabList = CachingMethod(getTabList, \
id = 'ERP5Site_getTabListInternal', \
cache_factory = 'erp5_ui_long')
return getTabList(status_dict = status_dict, \
info_dict = info_dict, \
add_all_tabs = add_all_tabs)
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