Commit e92e7964 authored by Sebastien Robin's avatar Sebastien Robin

first submission


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1454 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7c8d9e63
<!-- mci boxes macros -->
<!-- $Id$ -->
<!-- ============================================================ -->
<metal:block define-macro="basebox_header">
<div metal:use-macro="here/global_definition/macros/global_definition" />
<!-- Navigation Box Goes Here -->
<form tal:attributes="action here/absolute_url" method="POST">
<div class="NavigationBox">
<div metal:use-macro="here/navigation_box/macros/navigation_box">
Navigation Box
</div>
</div>
</form>
</metal:block>
##parameters=category=None
# $Id$
"""Return available box types."""
"""
{'category': 'basebox',
'title': 'portal_type_BaseBox_title',
'desc': 'portal_type_BaseBox_description',
'types': [
{'provider': 'nuxeo',
'id': 'hr_separator',
'desc': 'description_nuxeo_basebox_hr_separator',
'config': {'title': 'hr_sep'},
} ,
{'provider': 'nuxeo',
'id': 'br_separator',
'desc': 'description_nuxeo_basebox_br_separator',
'config': {'title': 'br_sep'},
} ,
{'provider': 'nuxeo',
'id': 'search',
'desc': 'description_nuxeo_basebox_search'},
{'provider': 'nuxeo',
'id': 'menu',
'desc': 'Onglets affichant la racine des espaces de travails,
celle des sections et les sections de premier niveau.'},
{'provider': 'nuxeo',
'id': 'l10n_select',
'desc': 'description_nuxeo_basebox_l10n_select'},
{'provider': 'nuxeo',
'id': 'folder_header',
'desc': 'description_nuxeo_basebox_folder_header'},
]
},
"""
items = [
{'category': 'textbox',
'title': 'portal_type_TextBox_title',
'desc': 'portal_type_TextBox_description',
'types': [{'provider': 'nuxeo',
'id': 'default',
'desc': 'description_nuxeo_textbox_default'},
]
},
{'category': 'treebox',
'title': 'portal_type_TreeBox_title',
'desc': 'portal_type_TreeBox_description',
'types': [{'provider': 'nuxeo',
'id': 'default',
'desc': 'description_nuxeo_treebox_default'},
{'provider': 'nuxeo',
'id': 'center',
'desc': 'description_nuxeo_treebox_center',
'config': {'contextual': 1,
'children_only': 1,
'depth': 2,
'root': '',
'authorized_only': 1,
'display_managers': 0,
'show_root': 1}
},
{'provider': 'nuxeo',
'id': 'sitemap',
'desc': 'description_nuxeo_treebox_sitemap',
'config': {'authorized_only': 1,
},
},
{'provider': 'nuxeo',
'id': 'sitemap_adv',
'desc': 'description_nuxeo_treebox_sitemap_adv',
}
]
},
{'category': 'contentbox',
'title': 'portal_type_ContentBox_title',
'desc': 'portal_type_ContentBox_description',
'types': [{'provider': 'nuxeo',
'id': 'default',
'desc': 'description_nuxeo_contentbox_default'},
{'provider': 'nuxeo',
'id': 'simple',
'desc': 'description_nuxeo_contentbox_simple'},
{'provider': 'nuxeo',
'id': 'last_modified',
'desc': 'description_nuxeo_contentbox_last_modified',
'config': {'sort_by': 'date',
'direction': 'desc',
'query_status': 'published'}
},
{'provider': 'nuxeo',
'id': 'pending',
'desc': 'description_nuxeo_contentbox_pending',
'config': {'sort_by': 'date',
'direction': 'asc',
'query_status': 'pending'}
},
]
},
{'category': 'actionbox',
'title': 'portal_type_ActionBox_title',
'desc': 'portal_type_ActionBox_description',
'types': [{'provider': 'nuxeo',
'id': 'default',
'desc': 'description_nuxeo_actionbox_default'},
{'provider': 'nuxeo',
'id': 'user',
'desc': 'description_nuxeo_actionbox_user'},
{'provider': 'nuxeo',
'id': 'menu',
'desc': 'description_nuxeo_actionbox_menu'},
{'provider': 'nuxeo',
'id': 'header',
'desc': 'description_nuxeo_actionbox_header'},
]
},
{'category': 'imagebox',
'title': 'portal_type_ImageBox_title',
'desc': 'portal_type_ImageBox_description',
'types': [{'provider': 'nuxeo',
'id': 'default',
'desc': 'description_nuxeo_imagebox_default'},
]
},
{'category': 'flashbox',
'title': 'portal_type_FlashBox_title',
'desc': 'portal_type_FlashBox_description',
'types': [{'provider': 'nuxeo',
'id': 'default',
'desc': 'description_nuxeo_flashbox_default'},
]
},
{'category': 'eventcalendarbox',
'title': 'portal_type_EventCalendarBox_title',
'desc': 'portal_type_EventCalendarBox_description',
'types': [{'provider': 'nuxeo',
'id': 'default',
'desc': 'description_nuxeo_basebox_calendar'},
]
},
]
citems = context.getCustomBoxTypes()
for citem in citems:
found = 0
for item in items:
if item['category'] == citem['category']:
item['types'].extend(citem['types'])
found = 1
break
if not found:
items.append(citem)
if category:
for item in items:
if item['category'] == category:
return item
return items
## Script (Python) "getCustomBoxTypes"
##parameters=
# $Id$
"""Return custom box types."""
items = [
{'category': 'basebox',
'title': 'portal_type_BaseBox_title',
'desc': 'portal_type_BaseBox_description',
'types': [{'provider': 'erp5cps',
'id': 'header',
'desc': 'Entte ERP5'},
,
]
},
]
return items
<!-- html head macro -->
<!-- $Id$ -->
<!-- ============================================================ -->
<metal:block define-macro="header" tal:define="charset string:ISO-8859-15">
<tal:block define="dummy python:request.RESPONSE.setHeader('Content-Type',
'text/html;; charset=%s' % charset)" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
<meta name="generator" content="Nuxeo CPS" />
<title tal:content="expanded_title|here/expanded_title">CPS Default</title>
<metal:block define-slot="base"></metal:block>
<link rel="Stylesheet" type="text/css" href=""
tal:attributes="href string:${base_url}nuxeo_css1.css" />
<link rel="Stylesheet" type="text/css" href=""
tal:attributes="href string:${base_url}erp5cps.css" />
<style type="text/css" media="all"
tal:content="string:@import url(${base_url}nuxeo_css2.css);"></style>
<link rel="stylesheet" type="text/css" media="print"
tal:attributes="href string:${base_url}nuxeo_print_css.css" />
<link rel="icon" href="" type="image/png" tal:attributes="href
string:${base_url}favicon.png" />
<meta http-equiv="imagetoolbar" content="no" />
<metal:block define-slot="head_slot"></metal:block>
<metal:block define-slot="css_slot"></metal:block>
<style type="text/css" media="all"
tal:condition="exists: here/custom.css"
tal:content="string:@import url(${base_url}custom.css);"></style>
<style type="text/css" media="all"
tal:define="custom_css here/getCPSCustomCSS|nothing"
tal:condition="custom_css"
tal:content="string:@import url(${base_url}${custom_css});"></style>
<metal:block define-slot="javascript_head_slot"></metal:block>
<script type="text/javascript"
tal:attributes="src string:${base_url}functions.js"></script>
</metal:block>
<dtml-with erp5_stylesheet_properties>
/*______________ CSS ERP5-CORAMY _________________ */
/* _________________ Navigation Box _________________ */
.NavigationBox{
color: &dtml-alternate_font_color;;
background-color: &dtml-navigation_background_color;;
vertical-align: middle;
}
.NavigationBox select{
color: &dtml-alternate_font_color;;
vertical-align: middle;
font-family: &dtml-default_font_family;;
}
.input_image{
border:none;
background-color:transparent;
color:transparent;
}
</dtml-with>
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