Commit f7336671 authored by Xiaowu Zhang's avatar Xiaowu Zhang

Fix text pagination for anonymous

See merge request !1114
parents 25a70167 008033f1
Pipeline #9281 failed with stage
in 0 seconds
<?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>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>testTextPagination</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test Text Pagination</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Text Pagination</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Created Successfully.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_page_navigation_template=ListBox_viewTextPageNavigationRenderer</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Set Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/view</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="listbox-header-box"]//a[@class="selected" and @title="Page 1"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//div[@class="listbox-header-box"]//a[@title="Page 2"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="listbox-header-box"]//a[@class="selected" and @title="Page 1"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="listbox-header-box"]//a[@class="selected" and @title="Page 2"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
...@@ -294,7 +294,7 @@ ...@@ -294,7 +294,7 @@
<!-- Show list of direct listbox page selection --> <!-- Show list of direct listbox page selection -->
<tal:block metal:define-macro="text_link_page_navigation"> <tal:block metal:define-macro="text_link_page_navigation">
<tal:block tal:repeat="page_index page_index_list "> <tal:block tal:repeat="page_index page_index_list ">
<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); <a tal:attributes="href python: '%s_setPage?%s_page_start=%s&list_selection_name=%s&listbox_uid:list=[]&selection_key=%s' %(field_id, field_id, page_index, selection_name, selection_key);
class python: test(page_index==current_page, 'selected', ''); class python: test(page_index==current_page, 'selected', '');
title string:Page ${page_index}" title string:Page ${page_index}"
tal:content="page_index"/> tal:content="page_index"/>
......
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
</object> </object>
</value> </value>
</item> </item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>ListBox_viewTextPageNavigationRenderer</string> </value> <value> <string>ListBox_viewTextPageNavigationRenderer</string> </value>
...@@ -40,6 +48,10 @@ ...@@ -40,6 +48,10 @@
<key> <string>output_encoding</string> </key> <key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value> <value> <string>utf-8</string> </value>
</item> </item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -6,10 +6,12 @@ ...@@ -6,10 +6,12 @@
<!-- Non gadget mode --> <!-- Non gadget mode -->
<tal:block tal:condition="not: is_gadget_mode"> <tal:block tal:condition="not: is_gadget_mode">
<tal:block tal:define="selection_key here/getSelectionKey;">
<tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/first_previous_page_navigation" /> <tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/first_previous_page_navigation" />
<tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/text_link_page_navigation" /> <tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/text_link_page_navigation" />
<tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/next_last_page_navigation" /> <tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/next_last_page_navigation" />
</tal:block> </tal:block>
</tal:block>
<!-- Gadget mode --> <!-- Gadget mode -->
<tal:block tal:condition="is_gadget_mode" <tal:block tal:condition="is_gadget_mode"
......
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