Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
f7336671
Commit
f7336671
authored
May 06, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Plain Diff
Fix text pagination for anonymous
See merge request !1114
parents
25a70167
008033f1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
4 deletions
+140
-4
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testTextPagination.xml
...ateItem/portal_tests/listbox_zuite/testTextPagination.xml
+58
-0
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testTextPagination.zpt
...ateItem/portal_tests/listbox_zuite/testTextPagination.zpt
+64
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTMLLibrary.zpt
...m/portal_skins/erp5_xhtml_style/ListBox_asHTMLLibrary.zpt
+1
-1
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_viewTextPageNavigationRenderer.xml
...p5_xhtml_style/ListBox_viewTextPageNavigationRenderer.xml
+12
-0
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_viewTextPageNavigationRenderer.zpt
...p5_xhtml_style/ListBox_viewTextPageNavigationRenderer.zpt
+5
-3
No files found.
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testTextPagination.xml
0 → 100644
View file @
f7336671
<?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>
bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testTextPagination.zpt
0 → 100644
View file @
f7336671
<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
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTMLLibrary.zpt
View file @
f7336671
...
...
@@ -294,7 +294,7 @@
<!-- Show list of direct listbox page selection -->
<tal:block metal:define-macro="text_link_page_navigation">
<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', '');
title string:Page ${page_index}"
tal:content="page_index"/>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_viewTextPageNavigationRenderer.xml
View file @
f7336671
...
...
@@ -32,6 +32,14 @@
</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>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ListBox_viewTextPageNavigationRenderer
</string>
</value>
...
...
@@ -40,6 +48,10 @@
<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>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_viewTextPageNavigationRenderer.zpt
View file @
f7336671
...
...
@@ -6,10 +6,12 @@
<!-- Non 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/text_link_page_navigation" />
<tal:block metal:use-macro="real_context/ListBox_asHTMLLibrary/macros/next_last_page_navigation" />
</tal:block>
</tal:block>
<!-- Gadget mode -->
<tal:block tal:condition="is_gadget_mode"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment