[Erp5-report] r43880 kazuhiko - in /erp5/trunk/bt5/erp5_forum_tutorial: SkinTemplateItem/po...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 2 11:51:20 CET 2011
Author: kazuhiko
Date: Wed Mar 2 11:51:20 2011
New Revision: 43880
URL: http://svn.erp5.org?rev=43880&view=rev
Log:
add old ListBox related page templates because this tutorial is still intended to use on old ERP5 environment.
Added:
erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asSearchStyleHTML.xml
erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asStandardHTML.xml
erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asTableStyleHTML.xml
erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/page_navigation_render.xml
Modified:
erp5/trunk/bt5/erp5_forum_tutorial/bt/revision
Added: erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asSearchStyleHTML.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asSearchStyleHTML.xml?rev=43880&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asSearchStyleHTML.xml (added)
+++ erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asSearchStyleHTML.xml [utf8] Wed Mar 2 11:51:20 2011
@@ -0,0 +1,360 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <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_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+<tal:block metal:define-macro="main"\n
+ xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+ xmlns:metal="http://xml.zope.org/namespaces/metal"\n
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
+ tal:define="listbox_max_lines python: int(here.getMaxLineNumber());\n
+ total_line python: int(here.total_size);\n
+ current_page python: int(here.current_page) + 1;\n
+ current_page_max python: listbox_max_lines * current_page;\n
+ current_page_start python: (listbox_max_lines * (current_page - 1)) + 1;\n
+ current_page_stop python: (total_line < current_page_max) and total_line or current_page_max;\n
+ your_search_text python:here.getParamDict().get(\'your_search_text\', None)">\n
+\n
+ <!-- ListBox (search mode) starts here. -->\n
+ <input type="hidden" \n
+ name="list_selection_name" \n
+ value="default" \n
+ tal:attributes="value selection_name" />\n
+ <input tal:condition="md5_string" \n
+ type="hidden" \n
+ name="md5_object_uid_list" \n
+ value="checksum" \n
+ tal:attributes="value md5_string" />\n
+ <input type="hidden" name="listbox_uid" value="1"/>\n
+\n
+ <input tal:condition="python:form_id and is_gadget_mode" type="hidden" name="gadget_form_id" tal:attributes="value form_id" />\n
+ \n
+ <tal:block tal:define="expand python: 1;\n
+ date_renderer python: context.getContext().ERP5Site_viewSearchResult.listbox_modification_date.render_pdf;">\n
+ <tal:block metal:use-macro="template/macros/ListBoxContainer">\n
+ <tal:block metal:fill-slot="ListBoxBody">\n
+\n
+ <div class="search result">\n
+\n
+ <!-- Advanced Search header -->\n
+ <div class="centeredInner searchBar extendedSearchBar"\n
+ tal:define="search_default_text python:context.getContext().Base_translateString(\'Search\')"\n
+ tal:condition="python:not is_gadget_mode and show_search_line">\n
+ <input name="top_your_search_text" size="40" value="" type="text"\n
+ value="Search" tal:attributes="value your_search_text | search_default_text;\n
+ onfocus string:if (this.value==\'${search_default_text}\') this.value=\'\';"\n
+\n
+ onfocus="this.value=\'\';"\n
+ onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearch\');"/>\n
+ <input class="button" i18n:domain="ui" i18n:attributes="value"\n
+ value="Search" name="ERP5Site_processAdvancedSearch:method" type="submit" />\n
+ </div>\n
+\n
+ <!-- Result Header -->\n
+ <div class="resultList">\n
+ <div class="searchResultHeader" >\n
+\n
+ <span class="left" \n
+ tal:define="table_form_id request/current_form_id | form_id">\n
+\n
+ <a tal:condition="not:is_gadget_mode"\n
+ tal:attributes="href string:${context_url}/${table_form_id}?list_style=table">\n
+ <img id="style_toggle_icon" \n
+ tal:attributes="src string:${portal_url_string}/images/search_style_icon.png" \n
+ alt="Search Icon"\n
+ height="16"\n
+ title="Table mode"\n
+ i18n:domain="ui" i18n:attributes="title"/>\n
+ </a>\n
+\n
+ <input tal:condition="python:not is_gadget_mode and (is_domain_tree_supported or is_report_tree_supported)"\n
+ type="image" src="text_block.png" id="listbox_flat_list_mode"\n
+ title="Flat List" name="setFlatListMode:method"\n
+ value="1" alt="Flat List"\n
+ tal:attributes="src string:${portal_url_string}/images/text_block.png;\n
+ id string:${field_id}_flat_list_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ <input tal:condition="python: not is_gadget_mode and is_report_tree_supported"\n
+ type="image" src="view_tree.png" id="listbox_report_tree_mode"\n
+ title="Report Tree" name="setReportTreeMode:method"\n
+ value="1" alt="Report Tree"\n
+ tal:attributes="src string:${portal_url_string}/images/view_tree.png;\n
+ id string:${field_id}_report_tree_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ <input tal:condition="python: not is_gadget_mode and is_domain_tree_supported"\n
+ type="image" src="view_choose.png" id="listbox_domain_tree_mode"\n
+ title="Domain Tree" name="setDomainTreeMode:method"\n
+ value="1" alt="Domain Tree"\n
+ tal:attributes="src string:${portal_url_string}/images/view_choose.png;\n
+ id string:${field_id}_domain_tree_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+\n
+ <input tal:condition="python:not is_gadget_mode and (is_domain_tree_supported or is_report_tree_supported)"\n
+ type="image" src="images/showall.png" id="listbox_reset_selection"\n
+ title="Show All" name="Folder_show:method"\n
+ id="listbox_reset_selection"\n
+ value="1" alt="Flat List"\n
+ tal:attributes="src string:${portal_url_string}/images/showall.png;"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+\n
+ <!-- supporting table mode for gadget mode -->\n
+ <button tal:condition="is_gadget_mode"\n
+ tal:define = "params python: {\'list_style\':\'table\'}"\n
+ title="Table mode"\n
+ type="button"\n
+ tal:attributes="onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+table_form_id,box,box_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <img id="style_toggle_icon"\n
+ alt="Table Mode Icon"\n
+ tal:attributes="src string:${portal_url_string}/images/search_style_icon.png" \n
+ height="16"/>\n
+ </button>\n
+\n
+ <a tal:attributes="id string:${field_id}_title; href here/getListActionUrl"\n
+ tal:condition="python: here.field.get_value(\'list_action\')">\n
+ <em i18n:translate="" \n
+ i18n:domain="ui" tal:content="here/getTitle" />\n
+ </a>\n
+ <tal:block tal:condition="python: not here.field.get_value(\'list_action\')">\n
+ <em i18n:translate="" \n
+ i18n:domain="ui" tal:content="here/getTitle" />\n
+ </tal:block>\n
+\n
+ <!-- supporting domain tree mode for gadget mode (disabled)-->\n
+ <!--\n
+ <br tal:condition="is_gadget_mode"/>\n
+ <button tal:condition="python: is_gadget_mode and (is_domain_tree_supported or is_report_tree_supported)"\n
+ tal:define = "params python: {\'setFlatListMode:method\':1}"\n
+ id="listbox_flat_list_mode"\n
+ type="button"\n
+ title="Flat List"\n
+ alt="Flat List"\n
+ tal:attributes="id string:${field_id}_flat_list_mode;\n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,box_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <img src="text_block.png"\n
+ tal:attributes="src string:${portal_url_string}/images/text_block.png;"/></button>\n
+\n
+ <button tal:condition="python: is_gadget_mode and is_report_tree_supported"\n
+ tal:define = "params python: {\'setReportTreeMode:method\':1}"\n
+ style="cursor:pointer;" id="listbox_report_tree_mode"\n
+ type="button"\n
+ title="Report Tree"\n
+ alt="Report Tree"\n
+ tal:attributes="id string:${field_id}_report_tree_mode;\n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,box_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <img src="view_tree.png"\n
+ tal:attributes="src string:${portal_url_string}/images/view_tree.png;"/></button>\n
+\n
+ <button tal:condition="python: is_gadget_mode and is_domain_tree_supported"\n
+ tal:define = "params python: {\'setDomainTreeMode:method\':\'1\'}"\n
+ style="cursor:pointer;" id="listbox_domain_tree_mode"\n
+ type="button"\n
+ title="Domain Tree"\n
+ alt="Domain Tree"\n
+ tal:attributes="id string:${field_id}_domain_tree_mode;\n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,box_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <img src="view_choose.png"\n
+ tal:attributes="src string:${portal_url_string}/images/view_choose.png;"/></button>\n
+ -->\n
+ </span>\n
+\n
+ <span class="right">\n
+ <tal:block tal:condition="python: total_line > 0"\n
+ tal:replace="structure python: real_context.Base_translateString(\'Results <em>${start} - ${stop}</em> of <em>${total}</em>.\', mapping=dict(start=current_page_start, stop=current_page_stop, total=total_line))"/>\n
+\n
+ <span tal:condition="python: total_line == 0" \n
+ class="warning" \n
+ i18n:translate="" \n
+ i18n:domain="ui">No result !</span>\n
+ </span>\n
+ <div class="clear"></div>\n
+ </div>\n
+\n
+ <!-- Found results -->\n
+ <tal:block \n
+ tal:condition="is_web_mode">\n
+ <tal:block tal:define="global website python: real_context.getWebSiteValue()" />\n
+ </tal:block>\n
+ <table cellpadding="0" cellspacing="0" class="listbox search">\n
+ <tal:block tal:repeat="line line_list">\n
+ <tr tal:define="css python: test(repeat[\'line\'].index % 2, \'DataB\', \'DataA\');\n
+ obj line/getObject;\n
+ url obj/absolute_url;\n
+ portal_type obj/getPortalType;\n
+ is_document python:portal_type in\n
+ real_context.getPortalDocumentTypeList() and portal_type != \'Web Page\';\n
+ hidden_pop_dom_id string:dom_popup_${field_id}_${repeat/line/index};\n
+ details_dom_id string:${field_id}_search_details_${repeat/line/index};"\n
+ tal:attributes="id string:${field_id}_data_line_${repeat/line/index}; \n
+ class python: \'%s tbody\' % css;">\n
+\n
+ <td class="icon">\n
+ <a tal:condition="is_document"\n
+ tal:attributes="href string: ${url}/Base_download"\n
+ i18n:translate="" \n
+ i18n:domain="ui" \n
+ title="Download Document">\n
+ <img tal:attributes="src obj/getIcon"\n
+ alt="Document Icon"/>\n
+ </a>\n
+ <img tal:condition="not: is_document"\n
+ tal:attributes="src obj/getIcon"\n
+ alt="Object Icon"\n
+ />\n
+ </td>\n
+\n
+ <td>\n
+ <div class="item_nohighlight"\n
+ tal:attributes="onmouseover python: is_web_mode and \'showPopik(\\\'%s\\\', true)\' % hidden_pop_dom_id or None;\n
+ onmouseout python: is_web_mode and \'showPopik(\\\'%s\\\', false)\' % hidden_pop_dom_id or None;">\n
+\n
+ <div class="search_popup" \n
+ style="z-index:100;"\n
+ tal:condition="is_web_mode" \n
+ tal:attributes="id hidden_pop_dom_id">\n
+ <span tal:replace="structure python: obj.Document_getPopupInfo(website)"/>\n
+ </div>\n
+\n
+ <div>\n
+ <a tal:attributes="href string:${url}/view">\n
+ <span class="search_result_title" tal:content="python: obj.getTitle() or (hasattr(obj, \'getReference\') and obj.getReference()) or obj.getId()" />\n
+ <span class="search_result_portal_type" tal:condition="python:portal_type != \'Web Page\'" tal:content="obj/getTranslatedPortalType" />\n
+ </a>\n
+ </div>\n
+\n
+ <span class="searchDetails found" \n
+ tal:content="structure python: obj.Base_showFoundText(selection=selection)"/>\n
+\n
+ <div tal:condition="is_web_mode"\n
+ class="searchDetails coordinates">\n
+ <tal:block tal:condition="obj/getReference|nothing">\n
+ <a tal:attributes="href python: \'%s/view\' % website.getPermanentURL(obj)"\n
+ tal:content="obj/getReference|nothing"/> - \n
+ </tal:block>\n
+\n
+ <tal:block tal:repeat="section python: website.getWebSectionValueList(obj)">\n
+ <a href="#" \n
+ tal:content="section/getCompactTranslatedTitle"\n
+ tal:attributes="href python: \'%s/view\' %section.absolute_url()"/>\n
+ - \n
+ </tal:block>\n
+\n
+\n
+ <tal:block tal:repeat="owner obj/Base_getOwnerInfoList">\n
+ <a tal:content="owner/title" \n
+ tal:attributes="href owner/url"/>\n
+ - \n
+ </tal:block>\n
+ <a tal:content="python: date_renderer(obj.getModificationDate())" \n
+ tal:attributes="href string: ${url}/Base_viewHistory"/>\n
+ </div>\n
+ <div tal:condition="not: is_web_mode"\n
+ class="searchDetails coordinates">\n
+ <tal:block tal:condition="obj/getReference|nothing">\n
+ <a tal:attributes="href string: ${url}/view"\n
+ tal:content="obj/getReference|nothing"/> - \n
+ </tal:block>\n
+ <a tal:content="python: date_renderer(obj.getModificationDate())" \n
+ tal:attributes="href string: ${url}/Base_viewHistory"/>\n
+ </div>\n
+ </div>\n
+ </td>\n
+ </tr>\n
+ </tal:block>\n
+ <tr>\n
+ <td class="pageNavigation" colspan="2" style="white-space: nowrap; vertical-align: middle; text-align: right;">\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n
+ </td>\n
+ </tr>\n
+ </table>\n
+ </div>\n
+\n
+ <!-- Advanced Search footer -->\n
+ <div class="centeredInner searchBar extendedSearchBar" \n
+ tal:condition="python: not is_gadget_mode and show_search_line">\n
+ <input name="bottom_your_search_text" size="40" value="" type="text"\n
+ onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearchBottom\');"\n
+ tal:attributes="value your_search_text" />\n
+ <input class="button" i18n:domain="ui" i18n:attributes="value"\n
+ value="Search" name="ERP5Site_processAdvancedSearchBottom:method" type="submit" />\n
+ </div>\n
+\n
+ <!-- Advanced Search footer for gadgets -->\n
+ <div class="centeredInner searchBar extendedSearchBar" \n
+ tal:condition="python: is_gadget_mode and show_search_line">\n
+ <input tal:define ="params python: {\'ERP5Site_processAdvancedSearchBottom:method\':\'\',\'bottom_your_search_text\':\'this.value\'};"\n
+ name="bottom_your_search_text" size="25" value="" type="text"\n
+ tal:attributes=\'value your_search_text;\n
+ onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
+ </div>\n
+\n
+ </div>\n
+ </tal:block>\n
+ </tal:block>\n
+ </tal:block>\n
+ <!-- ListBox ends here. -->\n
+\n
+</tal:block>\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>content_type</string> </key>
+ <value> <string>text/html</string> </value>
+ </item>
+ <item>
+ <key> <string>expand</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ListBox_asSearchStyleHTML</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Listboxes in search engine style</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asStandardHTML.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asStandardHTML.xml?rev=43880&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asStandardHTML.xml (added)
+++ erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asStandardHTML.xml [utf8] Wed Mar 2 11:51:20 2011
@@ -0,0 +1,347 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <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_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+<tal:block metal:define-macro="main"\n
+ xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+ xmlns:metal="http://xml.zope.org/namespaces/metal"\n
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
+\n
+ <tal:block tal:define="expand python: 1">\n
+ <tal:block metal:use-macro="template/macros/ListBoxContainer">\n
+ <tal:block metal:fill-slot="ListBoxBody">\n
+ <div class="ListSummary">\n
+ <table cellpadding="0" cellspacing="0"\n
+ summary="This table contains the listbox headers">\n
+ <tr>\n
+ <td style="height: 10px">\n
+ <img src="Left.png" alt="left"\n
+ tal:attributes="src string:${portal_url_string}/images/Left.png" />\n
+ </td>\n
+ <td class="Top" colspan="2" style="height: 10px">\n
+ <img src="spacer.png" style="width: 5px; height: 10px;" alt="spacer"\n
+ tal:attributes="src string:${portal_url_string}/images/spacer.png" />\n
+ </td>\n
+ <td class="Top" colspan="3" style="height: 10px">\n
+ <img src="spacer.png" style="width: 5px; height: 10px" alt="spacer"\n
+ tal:attributes="src string:${portal_url_string}/images/spacer.png" />\n
+ </td>\n
+ </tr>\n
+ <tr id="listbox_title_line" class="listbox_title_line" \n
+ tal:attributes="id string:${field_id}_title_line">\n
+ <td class="Left" style="width: 17px">\n
+ <img src="spacer.png" style="width: 5px; height: 5px" alt="spacer"\n
+ tal:attributes="src string:${portal_url_string}/images/spacer.png" />\n
+ </td>\n
+\t <td style="white-space: nowrap; vertical-align: middle"\n
+ tal:condition="not: is_gadget_mode">\n
+ <input tal:condition="python: is_domain_tree_supported or is_report_tree_supported"\n
+ type="image" src="text_block.png" id="listbox_flat_list_mode"\n
+ class="listbox_flat_list_mode"\n
+ title="Flat List" name="setFlatListMode:method"\n
+ value="1" alt="Flat List"\n
+ tal:attributes="src string:${portal_url_string}/images/text_block.png;\n
+ id string:${field_id}_flat_list_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ <input tal:condition="is_report_tree_supported"\n
+ type="image" src="view_tree.png" id="listbox_report_tree_mode"\n
+ title="Report Tree" name="setReportTreeMode:method"\n
+ value="1" alt="Report Tree" class="listbox_report_tree_mode"\n
+ tal:attributes="src string:${portal_url_string}/images/view_tree.png;\n
+ id string:${field_id}_report_tree_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ <input tal:condition="is_domain_tree_supported"\n
+ type="image" src="view_choose.png" id="listbox_domain_tree_mode"\n
+ title="Domain Tree" name="setDomainTreeMode:method"\n
+ value="1" alt="Domain Tree" class="listbox_domain_tree_mode"\n
+ tal:attributes="src string:${portal_url_string}/images/view_choose.png;\n
+ id string:${field_id}_domain_tree_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ </td>\n
+ <td style="width: 100%; vertical-align: middle">\n
+ \n
+ <a class="listbox_title"\n
+ tal:attributes="id string:${field_id}_title; href here/getListActionUrl"\n
+ tal:condition="python: here.field.get_value(\'list_action\')">\n
+ <tal:block i18n:translate="" \n
+ i18n:domain="ui" tal:content="here/getTitle" />:\n
+ </a>\n
+ <tal:block tal:condition="python: not here.field.get_value(\'list_action\')">\n
+ <span class="listbox_title" i18n:translate="" \n
+ i18n:domain="ui" tal:content="here/getTitle" />:\n
+ </tal:block>\n
+ <span id="listbox_record_number" class="listbox_record_number"\n
+ tal:attributes="id string:${field_id}_record_number"\n
+ i18n:translate="" i18n:domain="ui"><tal:block tal:replace="here/total_size" i18n:name="number">0</tal:block> records</span>\n
+ <span id="listbox_item_number" class="listbox_item_number"\n
+ tal:attributes="id string:${field_id}_item_number"\n
+ tal:condition="show_select_column"\n
+ i18n:translate="" i18n:domain="ui"> - <tal:block tal:replace="python: len(here.getCheckedUidList())" i18n:name="number">0</tal:block> items selected</span>\n
+ </td>\n
+\n
+ <td class="pageNavigation" style="white-space: nowrap; vertical-align: middle; text-align: center;">\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n
+ </td>\n
+ </tr>\n
+ </table>\n
+ </div>\n
+ <div class="listbox">\n
+ <table cellpadding="0" cellspacing="0"\n
+ summary="This table contains the listbox content">\n
+ <tr id="listbox_label_line" class="listbox_label_line"\n
+ tal:attributes="id string:${field_id}_label_line">\n
+ <td tal:condition="is_report_tree_mode"\n
+ class="Data" style="width: 50px; text-align: left; vertical-align: middle">\n
+ <select name="report_root_url"\n
+ tal:attributes="onChange string:submitAction(this.form, \'${context_url}/setReportRoot\')">\n
+ <tal:block tal:repeat="c here/getReportRootList">\n
+ <option value="base_domain"\n
+ tal:define="path python: c[0]; title python: c[1]"\n
+ tal:attributes="selected python: path == here.getSelectedReportPath(); value path"\n
+ tal:content="title" i18n:domain="ui" i18n:translate="">Domain</option>\n
+ </tal:block>\n
+ </select>\n
+ </td>\n
+ <td class="AnchorColumn Data" tal:condition="show_anchor_column"> </td>\n
+ <td tal:condition="show_select_column"\n
+ class="Data" style="width: 50px; text-align: center; vertical-align: middle">\n
+ <input id="listbox_check_all" type="image"\n
+ name="checkAll:method" value="1"\n
+ src="checkall.png" alt="Check All" title="Check All"\n
+ class="listbox_check_all"\n
+ tal:attributes="id string:${field_id}_check_all;\n
+ name string:${field_id}_checkAll:method;\n
+ src string:${portal_url_string}/images/checkall.png"\n
+ i18n:domain="ui" i18n:attributes="title" /> <input id="listbox_uncheck_all" type="image" name="uncheckAll:method" value="1"\n
+ src="%(portal_url_string)s/images/decheckall.png" style="border: 0" alt="Uncheck All" title="Uncheck All" class="listbox_uncheck_all"\n
+ tal:attributes="id string:${field_id}_uncheck_all;\n
+ name string:${field_id}_uncheckAll:method;\n
+ src string:${portal_url_string}/images/decheckall.png"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ </td>\n
+ <tal:block tal:repeat="value here/getLabelValueList">\n
+ <tal:block tal:define="sql python: value[0];\n
+ title python: value[1];\n
+ sort_order python: value[2]">\n
+ <td tal:condition="sql" class="Data">\n
+ <button type="submit" class="sort_button"\n
+ tal:condition="not: is_gadget_mode"\n
+ name="setSelectionQuickSortOrder:method"\n
+ tal:attributes="title string:${title}; \n
+ value string:${field_id}.${sql}"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span tal:content="title" i18n:domain="ui" i18n:translate="">ID</span>\n
+ </button>\n
+ <button tal:condition="is_gadget_mode" \n
+ tal:define ="params python: {\'setSelectionQuickSortOrder:method\':field_id+\'.\'+sql};"\n
+ type="button" class="sort_button"\n
+ tal:attributes="title string:${title}; \n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box_relative_url,box_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span tal:content="title" i18n:domain="ui" i18n:translate="">ID</span>\n
+ </button>\n
+ <img tal:condition="python: sort_order == \'ascending\'"\n
+ src="1bottomarrow.png" alt="Ascending Display" title="Ascending Display"\n
+ tal:attributes="src string:${portal_url_string}/images/1bottomarrow.png"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ <img tal:condition="python: sort_order == \'descending\'"\n
+ src="1toparrow.png" alt="Descending Display" title="Descending Display"\n
+ tal:attributes="src string:${portal_url_string}/images/1toparrow.png"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ </td>\n
+ <td tal:condition="not: sql" class="Data" tal:content="title"\n
+ i18n:domain="ui" i18n:translate="">\n
+ ID\n
+ </td>\n
+ </tal:block>\n
+ </tal:block>\n
+ </tr>\n
+\n
+ <tr tal:condition="python: show_search_line or is_report_tree_mode"\n
+ id="listbox_search_line" class="listbox_search_line"\n
+ tal:attributes="id python: show_search_line and (\'%s_search_line\' % field_id) or (\'%s_report_depth_line\' % field_id)">\n
+ <tal:block tal:condition="is_report_tree_mode">\n
+ <td class="Data" style="width: 50px; text-align: left; vertical-align: middle" colspan="1"\n
+ tal:attributes="colspan python: show_search_line and 1 or (len(here.getSelectedColumnList()) + show_select_column + show_anchor_column + 1)"\n
+ tal:define="selection_index here/getSelectionIndex;\n
+ index python: selection_index is not None and \'&selection_index=%s\' % selection_index or \'\';\n
+ is_report_opened python: int(not here.getSelection().isReportOpened());\n
+ requested_selection_name here/getRequestedSelectionName;\n
+ url here/getUrl"><tal:block tal:repeat="i python: range(0, 6)"> <a href="?selection_name=default&selection_index=0&report_depth:int=0"\n
+ tal:attributes="href string:${url}?selection_name=${requested_selection_name}${index}&report_depth:int=${i}"\n
+ tal:content="i">0</a></tal:block> - <a href="?selection_name=default&selection_index=0&is_report_opened:int=0"\n
+ tal:attributes="href string:${url}?selection_name=${requested_selection_name}${index}&is_report_opened:int=${is_report_opened}"\n
+ tal:content="python: is_report_opened and \'Show\' or \'Hide\'"\n
+ i18n:domain="ui" i18n:translate="">Show</a>\n
+ </td>\n
+ </tal:block>\n
+ <td class="AnchorColumn" tal:condition="show_anchor_column"> </td>\n
+ <td tal:condition="python: show_select_column and show_search_line"\n
+ class="Data" style="width: 50px; text-align: center; vertical-align: middle">\n
+ <input id="listbox_select" type="image" src="exec16.png"\n
+ title="Action" alt="Action" name="Base_doSelect:method"\n
+ class="listbox_select"\n
+ tal:attributes="id string:${field_id}_select;\n
+ src string:${portal_url_string}/images/exec16.png"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ </td>\n
+ <tal:block tal:condition="show_search_line"\n
+ tal:repeat="value here/getSearchValueList">\n
+ <td class="DataB" style="padding-right: 5px"\n
+ tal:define="alias python: value[0];\n
+ param python: value[1];\n
+ search_field python: value[2]">\n
+ <span tal:condition="alias" style="font-size: -3">\n
+ <tal:block tal:condition="python: search_field is not None"\n
+ tal:replace="structure python: search_field.render(value = param, key = alias)" />\n
+ <tal:block tal:condition="python: search_field is None">\n
+ <input tal:condition="not: is_gadget_mode" name="id" size="8" value=""\n
+ tal:attributes="name alias; value param" style="width: 100%"\n
+ onkeypress="submitFormOnEnter(event, this.form, \'Base_doSelect\');" />\n
+ <input tal:condition="is_gadget_mode" \n
+ tal:define ="params python: {alias:\'this.value\'};"\n
+ size="8" type="textarea" \n
+ tal:attributes=\'value python: selection.getParams().get(alias,"");\n
+ onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box_relative_url,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
+ </tal:block>\n
+ </span>\n
+ </td>\n
+ </tal:block>\n
+ </tr>\n
+ <tal:block tal:repeat="line line_list" tal:define="checked_uid_set here/getCheckedUidSet">\n
+\n
+ <tr id="listbox_data_line_0" class="DataA"\n
+ tal:define="css python: line.getRowCSSClassName() or test(repeat[\'line\'].index % 2, \'DataB\', \'DataA\');\n
+ render_result line/render;"\n
+ tal:attributes="id string:${field_id}_data_line_${repeat/line/index}; class css">\n
+ <td tal:condition="is_report_tree_mode" class="DataA" align="left" valign="middle"\n
+ tal:attributes="class css"\n
+ tal:define="section_name python: line.getDomainTitle()">\n
+ <a tal:condition="section_name"\n
+ tal:define="method_id python: line.isOpen() and \'foldReport\' or \'unfoldReport\'"\n
+ tal:attributes="href string:${method_id}?report_url=${line/getDomainUrl}&form_id=${form_id}&list_selection_name=${selection_name};\n
+ class python:test(line.isOpen(), \'tree_open\', \'tree_closed\');\n
+ style python:\'white-space: nowrap;; margin-left: %spx\' % (line.getDepth() * 15)"\n
+ tal:content="section_name"/>\n
+ </td>\n
+ <td class="AnchorColumn Data" tal:condition="python:show_anchor_column and len(render_result)" style="width: 20px;">\n
+ <a href="#" tal:attributes="href python:render_result[0][4]"><img src="document_icon.gif" alt="document" tal:attributes="src string:${portal_url_string}/images/line_clickable.png" /></a>\n
+ </td>\n
+ <td tal:condition="show_select_column"\n
+ class="DataA" style="width: 50px; text-align: center; vertical-align: middle"\n
+ tal:attributes="class css">\n
+ <input tal:condition="python: not line.isSummary() and line.getObject() is not None"\n
+ type="checkbox" value="checked" name="uids:list"\n
+ tal:attributes="checked python: line.getUid() in checked_uid_set;\n
+ value line/getUid;" />\n
+ <tal:block tal:condition="python: line.isSummary() or line.getObject() is None"></tal:block>\n
+ </td>\n
+ <tal:block tal:repeat="value render_result">\n
+ <td tal:define="html python: value[0];\n
+ original_value python: value[1];\n
+ error python: value[2]"\n
+ class="DataA" align="left"\n
+ tal:attributes="class python: error and (css + \'Error\') or css;\n
+ align python: isinstance(original_value, (float, int, long)) and \'right\' or \'left\'">\n
+ <input tal:condition="not: repeat/value/index"\n
+ type="hidden" value="1" name="listbox_uid:list"\n
+ tal:attributes="value python: line.getUid() or \'\';\n
+ name string:${field_id}_uid:list" />\n
+ <span tal:replace="structure html">value</span>\n
+ </td>\n
+ </tal:block>\n
+ </tr>\n
+ </tal:block>\n
+\n
+ <tr tal:condition="hide_rows_on_no_search_criterion"\n
+ class="listbox_missing_search_criterion">\n
+ <td tal:attributes="colspan python: len(here.getSearchValueList()) + 1">\n
+ <span i18n:translate="" \n
+ i18n:domain="ui">\n
+ To display actual content, please fill in one or more search criterion.\n
+ </span>\n
+ </td>\n
+ </tr>\n
+\n
+ <tr tal:condition="python:here.showStat() and not hide_rows_on_no_search_criterion" id="listbox_stat_line"\n
+ class="listbox_stat_line"\n
+ tal:attributes="id string:${field_id}_stat_line">\n
+ <td tal:condition="is_report_tree_mode" class="Data"> </td>\n
+ <td class="AnchorColumn Data" tal:condition="show_anchor_column"> </td>\n
+ <td tal:condition="show_select_column" class="Data"> </td>\n
+ <tal:block tal:repeat="value here/getStatValueList">\n
+ <td class="Data" align="left"\n
+ tal:define="original_value python: value[0]; processed_value python: value[1]"\n
+ tal:attributes="align python: isinstance(original_value, (float, int, long)) and \'right\' or \'left\'"\n
+ tal:content="structure processed_value" />\n
+ </tal:block>\n
+ </tr>\n
+\n
+ </table>\n
+ </div>\n
+ </tal:block>\n
+ </tal:block>\n
+ </tal:block>\n
+ <!-- ListBox ends here. -->\n
+</tal:block>\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>content_type</string> </key>
+ <value> <string>text/html</string> </value>
+ </item>
+ <item>
+ <key> <string>expand</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ListBox_asStandardHTML</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asTableStyleHTML.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asTableStyleHTML.xml?rev=43880&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asTableStyleHTML.xml (added)
+++ erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/ListBox_asTableStyleHTML.xml [utf8] Wed Mar 2 11:51:20 2011
@@ -0,0 +1,366 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <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_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+<tal:block metal:define-macro="main"\n
+ xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+ xmlns:metal="http://xml.zope.org/namespaces/metal"\n
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
+\n
+ <!-- ListBox (table mode) starts here -->\n
+\n
+ <input tal:replace="nothing" type="hidden" name="form_id" tal:attributes="value form_id" tal:condition="form_id"/>\n
+\n
+ <!--<input type="hidden" name="selection_name" tal:attributes="value selection_name" tal:condition="selection_name"/>\n
+ <input type="hidden" name="selection_index" tal:attributes="value selection_index" tal:condition="selection_index"/>-->\n
+ \n
+ <!--<input type="hidden" name="listbox_uid:list" value="" tal:attributes="name string:${field_id}_uid:list"/>\n
+ <input type="hidden" name="total_size" value="" tal:attributes="value here/total_size"/> -->\n
+ <input id="listbox_select" tal:attributes="id string:${field_id}_select"\n
+ title="Filter" alt="Filter" name="Base_doSelect:method"\n
+ type="submit" style="display: none"/>\n
+\n
+ <tal:block tal:define="expand python: 1;\n
+ table_form_id request/current_form_id | form_id;\n
+ your_search_text python:here.getParamDict().get(\'your_search_text\', None)">\n
+ <tal:block metal:use-macro="template/macros/ListBoxContainer">\n
+ <tal:block metal:fill-slot="ListBoxBody">\n
+\n
+ <input tal:condition="python:is_gadget_mode" type="hidden" name="dom_id" tal:attributes="value dom_id" />\n
+\n
+ <table class="listbox table">\n
+ \n
+ <caption>\n
+ <span class="left">\n
+\n
+ <a tal:condition="not:is_gadget_mode" tal:attributes="href string:${context_url}/${table_form_id}?list_style=search">\n
+ <img id="style_toggle_icon"\n
+ tal:attributes="src string:${context_url}/images/table_style_icon.png"\n
+ height="16"\n
+ title="Search mode"\n
+ alt="Search mode"\n
+ i18n:domain="ui" i18n:attributes="title"/>\n
+ </a>\n
+\n
+ <input tal:condition="python:not is_gadget_mode and (is_domain_tree_supported or is_report_tree_supported)"\n
+ type="image" src="text_block.png" id="listbox_flat_list_mode"\n
+ title="Flat List" name="setFlatListMode:method"\n
+ value="1" alt="Flat List"\n
+ tal:attributes="src string:${portal_url_string}/images/text_block.png;\n
+ id string:${field_id}_flat_list_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ <input tal:condition="python: not is_gadget_mode and is_report_tree_supported"\n
+ type="image" src="view_tree.png" id="listbox_report_tree_mode"\n
+ title="Report Tree" name="setReportTreeMode:method"\n
+ value="1" alt="Report Tree"\n
+ tal:attributes="src string:${portal_url_string}/images/view_tree.png;\n
+ id string:${field_id}_report_tree_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ <input tal:condition="python: not is_gadget_mode and is_domain_tree_supported"\n
+ type="image" src="view_choose.png" id="listbox_domain_tree_mode"\n
+ title="Domain Tree" name="setDomainTreeMode:method"\n
+ value="1" alt="Domain Tree"\n
+ tal:attributes="src string:${portal_url_string}/images/view_choose.png;\n
+ id string:${field_id}_domain_tree_mode"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ \n
+ <input tal:condition="python:not is_gadget_mode and (is_domain_tree_supported or is_report_tree_supported)"\n
+ type="image" id="listbox_reset_selection"\n
+ title="Show All" name="Folder_show:method"\n
+ id="listbox_reset_selection"\n
+ value="1" alt="Flat List"\n
+ tal:attributes="src string:${portal_url_string}/images/showall.png;"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+\n
+ <!-- supporting search mode for gadget mode -->\n
+\n
+ <button tal:condition="is_gadget_mode"\n
+ tal:define = "params python: {\'list_style\':\'search\'}"\n
+ type="button"\n
+ title="Search mode"\n
+ tal:attributes="onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <img id="style_toggle_icon"\n
+ alt="Search mode"\n
+ tal:attributes="src string:${context_url}/images/table_style_icon.png"\n
+ height="16"/></button>\n
+ <a tal:attributes="id string:${field_id}_title; href here/getListActionUrl"\n
+ tal:condition="python: here.field.get_value(\'list_action\')">\n
+ <em i18n:translate="" \n
+ i18n:domain="ui" tal:content="here/getTitle" />\n
+ </a>\n
+ <tal:block tal:condition="python: not here.field.get_value(\'list_action\')">\n
+ <em i18n:translate="" \n
+ i18n:domain="ui" tal:content="here/getTitle" />\n
+ </tal:block>\n
+ <!-- supporting domain tree mode for gadget mode (disabled)-->\n
+ <!--\n
+ <br tal:condition="is_gadget_mode"/>\n
+ <button tal:condition="python: is_gadget_mode and (is_domain_tree_supported or is_report_tree_supported)"\n
+ tal:define = "params python: {\'setFlatListMode:method\':1}"\n
+ id="listbox_flat_list_mode"\n
+ type="button"\n
+ title="Flat List"\n
+ alt="Flat List"\n
+ tal:attributes="id string:${field_id}_flat_list_mode;\n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <img tal:attributes="src string:${portal_url_string}/images/text_block.png;"/></button>\n
+\n
+ <button tal:condition="python: is_gadget_mode and is_report_tree_supported"\n
+ tal:define = "params python: {\'setReportTreeMode:method\':1}"\n
+ style="cursor:pointer;" id="listbox_report_tree_mode"\n
+ type="button"\n
+ title="Report Tree"\n
+ alt="Report Tree"\n
+ tal:attributes="id string:${field_id}_report_tree_mode;\n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <img src="view_tree.png"\n
+ tal:attributes="src string:${portal_url_string}/images/view_tree.png;"/></button>\n
+\n
+ <button tal:condition="python: is_gadget_mode and is_domain_tree_supported"\n
+ tal:define = "params python: {\'setDomainTreeMode:method\':\'1\'}"\n
+ style="cursor:pointer;" id="listbox_domain_tree_mode"\n
+ type="button"\n
+ title="Domain Tree"\n
+ alt="Domain Tree"\n
+ tal:attributes="id string:${field_id}_domain_tree_mode;\n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <img tal:attributes="src string:${portal_url_string}/images/view_choose.png;"/></button>\n
+ -->\n
+ </span>\n
+\n
+ <span class="right"\n
+ tal:define="listbox_max_lines python: int(here.getMaxLineNumber());\n
+ total_line python: int(here.total_size);\n
+ current_page python: int(here.current_page) + 1;\n
+ current_page_max python: listbox_max_lines * current_page;\n
+ current_page_start python: (listbox_max_lines * (current_page - 1)) + 1;\n
+ current_page_stop python: (total_line < current_page_max) and total_line or current_page_max;">\n
+ <tal:block condition="python: total_line > 0"\n
+ tal:replace="structure python: real_context.Base_translateString(\'Results <em>${start} - ${stop}</em> of <em>${total}</em>.\', mapping=dict(start=current_page_start, stop=current_page_stop, total=total_line))"/>\n
+ <span tal:condition="python: total_line == 0" class="warning" i18n:translate="" i18n:domain="ui">No result !</span>\n
+ </span>\n
+ </caption>\n
+\n
+ <tr class ="thead listbox_search_line">\n
+ <td tal:condition="python:not is_gadget_mode and show_select_column"\n
+ class="Data" style="width: 50px; text-align: center; vertical-align: middle; white-space: nowrap;">\n
+ <input id="listbox_check_all" type="image"\n
+ name="checkAll:method" value="1"\n
+ alt="Check All" title="Check All"\n
+ tal:attributes="id string:${field_id}_check_all;\n
+ name string:${field_id}_checkAll:method;\n
+ src string:${portal_url_string}/images/checkall.png"\n
+ i18n:domain="ui" i18n:attributes="title" /> <input id="listbox_uncheck_all"\n
+ type="image" name="uncheckAll:method" value="1"\n
+ style="border: 0" alt="Uncheck All" title="Uncheck All"\n
+ tal:attributes="id string:${field_id}_uncheck_all;\n
+ src string:${portal_url_string}/images/decheckall.png;\n
+ name string:${field_id}_uncheckAll:method;"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+ </td>\n
+\n
+ <tal:block tal:repeat="value here/getLabelValueList">\n
+ <tal:block tal:define="sql python: value[0];\n
+ title python: value[1];\n
+ sort_order python: value[2]">\n
+ <th tal:condition="sql">\n
+\n
+ <button tal:condition="not:is_gadget_mode" type="submit" class="sort_button"\n
+ name="setSelectionQuickSortOrder:method"\n
+ tal:attributes="title string:${title}; \n
+ value string:${field_id}.${sql}"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span tal:content="title" i18n:domain="ui" i18n:translate="">ID</span>\n
+ </button>\n
+ \n
+ <!-- Sort for gadget mode -->\n
+ <button tal:condition="is_gadget_mode" \n
+ tal:define ="params python: {\'setSelectionQuickSortOrder:method\':field_id+\'.\'+sql};"\n
+ type="button" \n
+ class="sort_button"\n
+ tal:attributes="title string:${title}; \n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span tal:content="title" i18n:domain="ui" i18n:translate="">ID</span>\n
+ </button>\n
+\n
+ <img tal:condition="python: sort_order == \'ascending\'"\n
+ alt="Ascending Display" title="Ascending Display"\n
+ tal:attributes="src string:${portal_url_string}/images/1bottomarrow.png"\n
+ style="float:left"\n
+ i18n:domain="ui" i18n:attributes="title"/>\n
+ <img tal:condition="python: sort_order == \'descending\'"\n
+ alt="Descending Display" title="Descending Display"\n
+ tal:attributes="src string:${portal_url_string}/images/1toparrow.png"\n
+ style="float:left"\n
+ i18n:domain="ui" i18n:attributes="title"/>\n
+ </th>\n
+ <th tal:condition="not: sql" tal:content="title" i18n:domain="ui" i18n:translate=""/>\n
+ </tal:block>\n
+ </tal:block>\n
+ </tr>\n
+ <tr class="thead listbox_search_line" tal:condition="show_search_line">\n
+ <td tal:condition="python: show_select_column and show_search_line and not is_gadget_mode"\n
+ class="Data" style="width: 50px; text-align: center; vertical-align: middle">\n
+ <input id="listbox_select" type="image"\n
+ title="Action" alt="Action" name="Base_doSelect:method"\n
+ tal:attributes="id string:${field_id}_select;\n
+ src string:${portal_url_string}/images/exec16.png"\n
+ i18n:domain="ui" i18n:attributes="title" />\n
+\n
+ </td>\n
+ <td tal:repeat="value here/getSearchValueList">\n
+ <tal:block tal:define="alias python: value[0];\n
+ param python: value[1];\n
+ search_field python: value[2]"\n
+ tal:condition="alias">\n
+ <tal:block\n
+ tal:condition="python: search_field is not None"\n
+ tal:replace="structure python: search_field.render(value=param, key=alias)"/>\n
+ \n
+ <input tal:condition="python: not is_gadget_mode and search_field is None" \n
+ name="id" size="5" value=""\n
+ type="text" tal:attributes="name alias; value param"/>\n
+\n
+ <!-- Search for gadget mode -->\n
+ <input tal:condition="python: is_gadget_mode and search_field is None" \n
+ tal:define ="params python: {alias:\'this.value\'};"\n
+ size="8"\n
+ type="textarea" \n
+ tal:attributes=\'value python: selection.getParams().get(alias,"");\n
+ onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,dom_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
+\n
+ </tal:block>\n
+ </td>\n
+ </tr>\n
+\n
+ <tal:replace tal:content="nothing">\n
+ TODO: Move pagination pre-calcultion higher in that code.\n
+ </tal:replace>\n
+ <tr class="tbody" tal:condition="line_list"\n
+ tal:repeat="line line_list" tal:define="checked_uid_set here/getCheckedUidSet">\n
+ <td tal:condition="python: show_select_column and not is_gadget_mode"\n
+ class="DataA" style="width: 50px; text-align: center; vertical-align: middle"\n
+ >\n
+ <input tal:condition="python: not line.isSummary() and line.getObject() is not None"\n
+ type="checkbox" value="checked" id="listbox_cb_1" name="uids:list"\n
+ tal:attributes="checked python: line.getUid() in checked_uid_set;\n
+ value line/getUid;\n
+ id string:${field_id}_cb_${line/getUid}" />\n
+ <tal:block tal:condition="python: line.isSummary() or line.getObject() is None"></tal:block>\n
+ </td>\n
+ \n
+ <tal:block tal:repeat="value line/render">\n
+ <td tal:define="html python: value[0];\n
+ original_value python: value[1];\n
+ error python: value[2];\n
+ editable_field python: value[3];\n
+ editable_field_css python: editable_field != None and editable_field.get_value(\'css_class\')">\n
+ <input tal:condition="not: repeat/value/index"\n
+ type="hidden" value="1" name="listbox_uid:list"\n
+ tal:attributes="value python: line.getUid() or \'\';\n
+ name string:${field_id}_uid:list" />\n
+ <tal:block tal:replace="structure html">value</tal:block>\n
+ </td>\n
+ </tal:block>\n
+ </tr>\n
+ <tr tal:condition="python: int(here.total_size) > int(here.getMaxLineNumber())"\n
+ class="tfoot">\n
+ <td class="pageNavigation" style="white-space: nowrap; vertical-align: middle; text-align: right;"\n
+ tal:attributes="colspan python: len(here.getSelectedColumnList()) + bool(show_select_column)">\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/page_navigation" />\n
+ </td>\n
+ </tr>\n
+\n
+ <tr tal:condition="hide_rows_on_no_search_criterion"\n
+ class="listbox_missing_search_criterion">\n
+ <td tal:attributes="colspan python: len(here.getSearchValueList()) + 1">\n
+ <span i18n:translate="" \n
+ i18n:domain="ui">\n
+ To display actual content, please fill in one or more search criterion.\n
+ </span>\n
+ </td>\n
+ </tr>\n
+\n
+ </table>\n
+\n
+ <!-- Advanced Search footer -->\n
+ <div class="centeredInner extendedSearchBar"\n
+ tal:condition="python:not is_gadget_mode and show_search_line and your_search_text is not None">\n
+ <input name="bottom_your_search_text" size="40" value=""\n
+ type="text" tal:attributes="value your_search_text"\n
+ onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearchBottom\');"/>\n
+ <input class="button" value="Search" name="ERP5Site_processAdvancedSearchBottom:method" type="submit" />\n
+ </div>\n
+ \n
+ </tal:block>\n
+ </tal:block>\n
+ </tal:block>\n
+ <!-- ListBox ends here -->\n
+\n
+</tal:block>\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>content_type</string> </key>
+ <value> <string>text/html</string> </value>
+ </item>
+ <item>
+ <key> <string>expand</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ListBox_asTableStyleHTML</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Listbox as tables renderer</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/page_navigation_render.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/page_navigation_render.xml?rev=43880&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/page_navigation_render.xml (added)
+++ erp5/trunk/bt5/erp5_forum_tutorial/SkinTemplateItem/portal_skins/erp5_forum/page_navigation_render.xml [utf8] Wed Mar 2 11:51:20 2011
@@ -0,0 +1,284 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <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_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+<tal:block tal:replace="nothing"\n
+ xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+ xmlns:metal="http://xml.zope.org/namespaces/metal"\n
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
+ \n
+\n
+ <!-- First & Previous button navigation --> \n
+ <tal:block metal:define-macro="first_previous_page_navigation">\n
+\n
+ <tal:block tal:condition="python: here.current_page > 0">\n
+ <button type="image" src="2leftarrowv.png"\n
+ title="First Page" name="firstPage:method"\n
+ class="listbox_first_page"\n
+ tal:attributes="name string:${field_id}_firstPage:method;\n
+ src string:${portal_url_string}/images/2leftarrowv.png;\n
+ class python: test(is_default_listbox_field, \'listbox_first_page\', \'listbox_first_page %s_first_page\' %field_id)"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span class="image"/>\n
+ </button>\n
+ <button type="image" src="1leftarrowv.png"\n
+ title="Previous Page" name="previousPage:method"\n
+ class="listbox_previous_page"\n
+ tal:attributes="name string:${field_id}_previousPage:method;\n
+ src string:${portal_url_string}/images/1leftarrowv.png;\n
+ class python: test(is_default_listbox_field, \'listbox_previous_page\', \'listbox_previous_page %s_previous_page\' %field_id)"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span class="image"/>\n
+ </button>\n
+\n
+ </tal:block>\n
+\n
+ </tal:block>\n
+\n
+ <!-- Next & Last button navigation --> \n
+ <tal:block metal:define-macro="next_last_page_navigation">\n
+\n
+ <tal:block tal:condition="python: here.current_page < here.total_pages - 1">\n
+ <button type="image" src="1rightarrowv.png"\n
+ title="Next Page" name="nextPage:method" class="listbox_next_page"\n
+ tal:attributes="name string:${field_id}_nextPage:method;\n
+ src string:${portal_url_string}/images/1rightarrowv.png;\n
+ class python: test(is_default_listbox_field, \'listbox_next_page\', \'listbox_next_page %s_next_page\' %field_id)"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span class="image"/>\n
+ </button>\n
+ <button type="image" src="2rightarrowv.png"\n
+ title="Last Page" name="lastPage:method" class="listbox_last_page"\n
+ tal:attributes="name string:${field_id}_lastPage:method;\n
+ src string:${portal_url_string}/images/2rightarrowv.png;\n
+ class python: test(is_default_listbox_field, \'listbox_last_page\', \'listbox_last_page %s_last_page\' %field_id)"\n
+ i18n:domain="ui" i18n:attributes="title" >\n
+ <span class="image"/>\n
+ </button>\n
+\n
+ </tal:block>\n
+\n
+ </tal:block>\n
+\n
+ <!-- First & Previous button navigation (asynchronous mode) --> \n
+ <tal:block metal:define-macro="first_previous_page_navigation_asynchronous">\n
+\n
+ <tal:block tal:condition="python: here.current_page > 0">\n
+ <button tal:define ="params python: {field_id+\'_firstPage:method\':\'\', \'list_style\':list_style}"\n
+ title="First Page" \n
+ name="firstPage"\n
+ type = "button" \n
+ class = "listbox_first_page"\n
+ tal:attributes="value string:|<;\n
+ onclick python:\n
+ real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
+ class python: test(is_default_listbox_field, \'listbox_first_page\', \'listbox_first_page %s_first_page\' %field_id)"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span class="image"/>\n
+ </button>\n
+ <button tal:define ="params python: {field_id+\'_previousPage:method\':\'\',\'page_start\':here.current_page+1,\'list_style\':list_style}"\n
+ title="Previous Page"\n
+ name="previousPage"\n
+ type="button"\n
+ class="listbox_previous_page"\n
+ tal:attributes="value string:<<;\n
+ onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
+ class python: test(is_default_listbox_field, \'listbox_previous_page\', \'listbox_previous_page %s_previous_page\' %field_id)"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span class="image"/>\n
+ </button>\n
+ </tal:block>\n
+ \n
+ </tal:block>\n
+\n
+ <!-- Next & Last button navigation (asynchronous mode) --> \n
+ <tal:block metal:define-macro="next_last_page_navigation_asynchronous">\n
+\n
+ <tal:block tal:condition="python: current_page < total_page">\n
+ <button tal:define ="params python: {field_id+\'_nextPage:method\':\'\',\'page_start\':here.current_page+1,\'list_style\':list_style}"\n
+ title="Next Page"\n
+ name="nextPage"\n
+ type="button"\n
+ class="listbox_next_page"\n
+ tal:attributes="onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
+ class python: test(is_default_listbox_field, \'listbox_next_page\', \'listbox_next_page %s_next_page\' %field_id)"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span class="image"/>\n
+ </button>\n
+ <button tal:define ="params python: {field_id+\'_lastPage:method\':\'\',\'total_size\':int(here.total_size), \'list_style\':list_style}"\n
+ title="Last Page"\n
+ name="lastPage"\n
+ type="button"\n
+ class="listbox_last_page"\n
+ tal:attributes="onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
+ class python: test(is_default_listbox_field, \'listbox_last_page\', \'listbox_last_page %s_last_page\' %field_id)"\n
+ i18n:domain="ui" i18n:attributes="title">\n
+ <span class="image"/>\n
+ </button>\n
+ </tal:block>\n
+\n
+ </tal:block>\n
+\n
+ <!-- Type in listbox navigation --> \n
+ <tal:block metal:define-macro="type_in_page_navigation">\n
+ <input class="listbox_set_page" \n
+ name="page_start" onblur="this.value=this.defaultValue"\n
+ tal:attributes="name string:${field_id}_page_start;\n
+ class python: test(is_default_listbox_field, \'listbox_set_page\', \'listbox_set_page %s_set_page\' %field_id);\n
+ value python:here.current_page + 1;\n
+ size python:len(str(here.total_pages));\n
+ onkeypress string:submitFormOnEnter(event, this.form, \'${field_id}_setPage\')" />\n
+ / <tal:block content="here/total_pages" />\n
+ </tal:block>\n
+\n
+ <!-- Type in listbox page number navigation (asyncronous) --> \n
+ <tal:block metal:define-macro="type_in_page_navigation_asynchronous">\n
+\n
+ <input class="listbox_set_page" \n
+ name="page_start" onblur="this.value=this.defaultValue"\n
+ tal:define="params python: {field_id+\'_setPage:method\':\'\',field_id+\'_page_start\':\'this.value\',\'list_style\':list_style}"\n
+ tal:attributes=\'name string:${field_id}_page_start;\n
+ class python: test(is_default_listbox_field, "listbox_set_page", "listbox_set_page %s_set_page" %field_id);\n
+ value python:here.current_page + 1;\n
+ size python:len(str(here.total_pages));\n
+ onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,dom_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
+ / <tal:block content="here/total_pages" />\n
+ </tal:block>\n
+\n
+ <!-- Show list of direct listbox page selection -->\n
+ <tal:block metal:define-macro="text_link_page_navigation">\n
+ <tal:block tal:repeat="page_index page_index_list ">\n
+ <a tal:attributes="href python: \'%s_setPage?%s_page_start=%s&list_selection_name=%s&listbox_uid:list=[]\' %(field_id, field_id, page_index, selection_name);\n
+ class python: test(page_index==current_page, \'selected\', \'\');\n
+ title string:Page ${page_index}"\n
+ tal:content="page_index"/>\n
+ </tal:block>\n
+ </tal:block>\n
+\n
+ <!-- Show list of direct listbox page selection (asynchronous) -->\n
+ <tal:block metal:define-macro="text_link_page_navigation_asynchronous">\n
+ <tal:block tal:repeat="page_index page_index_list ">\n
+ <a tal:define="params python: {field_id+\'_setPage:method\':\'\',field_id+\'_page_start\':page_index,\'list_style\':list_style, \'list_selection_name\':selection_name, \'listbox_uid\':[]}"\n
+ tal:attributes="onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
+ class python: test(page_index==current_page, \'selected\', \'\');\n
+ title string:Page ${page_index}"\n
+ tal:content="page_index"/>\n
+ </tal:block>\n
+ </tal:block>\n
+\n
+\n
+ <!-- Text navigation (i.e. 1 2 3 4 .. n links)-->\n
+ <tal:block metal:define-macro="text_navigation"\n
+ tal:define="offset python: 7;\n
+ all_page_index_list python: range(1, here.total_pages + 1);\n
+ page_index_list python: all_page_index_list[max(current_page-offset, 1)-1: min(current_page+offset, len(all_page_index_list))];\n
+ is_default_listbox_field python: field_id==\'listbox\';">\n
+\n
+ <!-- Non gadget mode -->\n
+ <tal:block tal:condition="not: is_gadget_mode">\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/first_previous_page_navigation" />\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/text_link_page_navigation" />\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/next_last_page_navigation" />\n
+ </tal:block>\n
+\n
+ <!-- Gadget mode -->\n
+ <tal:block tal:condition="is_gadget_mode"\n
+ tal:define="max_lines python: here.getMaxLineNumber();\n
+ total_page python: here.total_pages;\n
+ page_id python: here.current_page;\n
+ current_page python: page_id + 1;\n
+ previous_page python: current_page - 1;\n
+ next_page python: current_page + 1;">\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/first_previous_page_navigation_asynchronous" />\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/text_link_page_navigation_asynchronous" />\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/next_last_page_navigation_asynchronous" />\n
+ </tal:block>\n
+\n
+ </tal:block>\n
+\n
+ <!-- Slider navigation with input (i.e. first, previous, next, last links)-->\n
+ <tal:block metal:define-macro="page_navigation"\n
+ tal:define="is_default_listbox_field python: field_id==\'listbox\';">\n
+ <tal:block tal:condition="python: here.total_pages > 1">\n
+\n
+ <!-- Non gadget mode -->\n
+ <tal:block tal:condition="not: is_gadget_mode">\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/first_previous_page_navigation" />\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/type_in_page_navigation" />\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/next_last_page_navigation" />\n
+ </tal:block>\n
+\n
+ <!-- Gadget mode -->\n
+ <tal:block tal:condition="is_gadget_mode"\n
+ tal:define="max_lines python: here.getMaxLineNumber();\n
+ total_page python: here.total_pages;\n
+ page_id python: here.current_page;\n
+ current_page python: page_id + 1;\n
+ previous_page python: current_page - 1;\n
+ next_page python: current_page + 1;">\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/first_previous_page_navigation_asynchronous" />\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/type_in_page_navigation_asynchronous" />\n
+ <tal:block metal:use-macro="real_context/page_navigation_render/macros/next_last_page_navigation_asynchronous" />\n
+ </tal:block>\n
+ </tal:block>\n
+ </tal:block>\n
+\n
+</tal:block>\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>content_type</string> </key>
+ <value> <string>text/html</string> </value>
+ </item>
+ <item>
+ <key> <string>expand</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>page_navigation_render</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_forum_tutorial/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forum_tutorial/bt/revision?rev=43880&r1=43879&r2=43880&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forum_tutorial/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_forum_tutorial/bt/revision [utf8] Wed Mar 2 11:51:20 2011
@@ -1 +1 @@
-1
\ No newline at end of file
+2
\ No newline at end of file
More information about the Erp5-report
mailing list