Commit 28b94db7 authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise multiple calls in deveopper mode buttons rendering.

Put the variables containing function results in navigation_box.
Make developper mode images paths absolute.
Rename documentation_view to documentation_template, as in xhtml_style.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10546 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5e73d7e4
......@@ -124,7 +124,9 @@ along with this program; if not, write to the Free Software\n
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n
</tal:block>\n
<html>\n
<html tal:define="global preferred_html_style_developper_mode here/portal_preferences/getPreferredHtmlStyleDevelopperMode;\n
global preferred_html_style_translator_mode here/portal_preferences/getPreferredHtmlStyleTranslatorMode;\n
global portal_path here/portal_url/getPortalPath;">\n
<head>\n
<title></title>\n
<style type="text/css">\n
......@@ -335,30 +337,30 @@ div.listbox_dataline:hover {\n
</div>\n
<tal:block tal:define="field_names python: (\'my_static_property_list\',);\n
structured_text_field_names python: (\'title\',);">\n
<tal:block metal:use-macro="here/documentation_view/macros/render_listbox"/>\n
<tal:block metal:use-macro="here/documentation_template/macros/render_listbox"/>\n
</tal:block>\n
<tal:block tal:define="field_names python: (\'my_dynamic_property_list\',);\n
structured_text_field_names python: (\'title\',);">\n
<tal:block metal:use-macro="here/documentation_view/macros/render_listbox"/>\n
<tal:block metal:use-macro="here/documentation_template/macros/render_listbox"/>\n
</tal:block>\n
<tal:block tal:define="field_names python: (\'my_dynamic_category_list\',)">\n
<tal:block metal:use-macro="here/documentation_view/macros/render_listbox"/>\n
<tal:block metal:use-macro="here/documentation_template/macros/render_listbox"/>\n
</tal:block>\n
<tal:block tal:define="field_names python: (\'my_static_method_list\',);\n
structured_text_field_names python: (\'title\',);\n
zope_structured_text_field_names python: (\'description\',);\n
toggleable_field_name python: \'source_code\';">\n
<tal:block metal:use-macro="here/documentation_view/macros/render_listbox"/>\n
<tal:block metal:use-macro="here/documentation_template/macros/render_listbox"/>\n
</tal:block>\n
<tal:block tal:define="field_names python: (\'my_dynamic_method_list\',);\n
structured_text_field_names python: (\'title\',);\n
zope_structured_text_field_names python: (\'description\',);">\n
<tal:block metal:use-macro="here/documentation_view/macros/render_listbox"/>\n
<tal:block metal:use-macro="here/documentation_template/macros/render_listbox"/>\n
</tal:block>\n
<tal:block tal:define="field_names python: (\'my_dynamic_accessor_list\',);\n
structured_text_field_names python: (\'accessors\',);\n
toggleable_field_name python: \'accessors\';">\n
<tal:block metal:use-macro="here/documentation_view/macros/render_listbox"/>\n
<tal:block metal:use-macro="here/documentation_template/macros/render_listbox"/>\n
</tal:block>\n
</tal:block>\n
</body>\n
......@@ -376,7 +378,7 @@ div.listbox_dataline:hover {\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>documentation_view</string> </value>
<value> <string>documentation_template</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -55,16 +55,18 @@
<value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="edit_link">\n
<a tal:condition="python: hasattr(object, \'meta_type\') and object.Base_getSourceVisibility()"\n
<a tal:condition="python: preferred_html_style_developper_mode and hasattr(object, \'meta_type\')"\n
tal:attributes="href python: \'%s/%s\' % (\'/\'.join(object.getPhysicalPath()[len(object.getPortalObject().getPhysicalPath()):]), manage) # XXX: quick hack to get path;\n
title info;"><img tal:attributes="src python: \'images/%s\' % (image, );\n
title info;"><img tal:attributes="src python: \'%s/images/%s\' % (portal_path, image);\n
alt info;"/></a>\n
</tal:block>\n
<tal:block metal:define-macro="translate_link" tal:define="image image | python: \'translate.png\'">\n
<a tal:condition="python: context.Base_getTranslationVisibility()"\n
tal:attributes="href python: \'%s/manage_messages?regex=^%s%%24&amp;lang=%s\' % (\'/\'.join(context.Localizer.erp5_ui.getPhysicalPath()[len(context.Localizer.erp5_ui.getPortalObject().getPhysicalPath()):]), message, context.Localizer.get_selected_language());\n
title info;"><img tal:attributes="src python: \'images/%s\' % (image, );\n
alt info;"/></a>\n
<tal:block metal:define-macro="translate_link">\n
<tal:block tal:condition="preferred_html_style_translator_mode">\n
<a tal:define="image image | python: \'translate.png\'"\n
tal:attributes="href python: \'%s/manage_messages?regex=^%s%%24&amp;lang=%s\' % (\'/\'.join(context.Localizer.erp5_ui.getPhysicalPath()[len(context.Localizer.erp5_ui.getPortalObject().getPhysicalPath()):]), message, context.Localizer.get_selected_language());\n
title info;"><img tal:attributes="src python: \'%s/images/%s\' % (portal_path, image);\n
alt info;"/></a>\n
</tal:block>\n
</tal:block>\n
<tal:block metal:define-macro="form">\n
<tal:block tal:define="image python: \'editform.png\';\n
......@@ -92,14 +94,11 @@
image python: \'translate.png\'">\n
<tal:block metal:use-macro="context/form_developper_buttons/macros/translate_link"/>\n
</tal:block>\n
<tal:block tal:define="desc python: context.Base_getFieldDescription(field)">\n
<tal:block tal:condition="python: desc not in (None, \'\')">\n
<tal:block tal:define="info python: \'Translate this field description\';\n
message desc;\n
image python: \'translate_tooltip.png\'">\n
<tal:block metal:use-macro="context/form_developper_buttons/macros/translate_link"/>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:define="message python: context.Base_getFieldDescription(field);\n
info python: \'Translate this field description\';\n
image python: \'translate_tooltip.png\'"\n
tal:condition="python: message not in (None, \'\')">\n
<tal:block metal:use-macro="context/form_developper_buttons/macros/translate_link"/>\n
</tal:block>\n
</tal:block>
......
......@@ -93,6 +93,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
\n
<body>\n
<table width="100%" metal:define-macro="navigation_box">\n
<tal:block tal:define="global preferred_html_style_developper_mode here/portal_preferences/getPreferredHtmlStyleDevelopperMode;\n
global preferred_html_style_translator_mode here/portal_preferences/getPreferredHtmlStyleTranslatorMode;\n
global portal_path here/portal_url/getPortalPath;"/>\n
<tr>\n
<td valign="middle" align="center" nowrap="nowrap">\n
<!-- Hidden button as explained in http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html -->\n
......
13
\ No newline at end of file
18
\ 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