Commit 1b5e3c72 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: add my account page

This page gathers all informations linked to the current user: preference, person, language, logout.

Drop all other language/preference links from other gadgets.
parent d63ee187
......@@ -48,9 +48,7 @@
.push(function (result) {
var url_for_parameter_list = [
// Back url
{command: 'display'},
// Change language
{command: 'display', options: {page: 'language'}}
{command: 'display'}
],
i;
row_list = result.data.rows;
......@@ -67,11 +65,11 @@
dom_list = [],
document_dict = {};
for (i = 2; i < url_list.length; i += 1) {
document_dict[row_list[i - 2].id] = {
for (i = 1; i < url_list.length; i += 1) {
document_dict[row_list[i - 1].id] = {
href: url_list[i],
text: (row_list[i - 2].value.title || row_list[i - 2].id) +
" (" + row_list[i - 2].value.translated_portal_type + ")"
text: (row_list[i - 1].value.title || row_list[i - 1].id) +
" (" + row_list[i - 1].value.translated_portal_type + ")"
};
}
// Sort by access time
......@@ -90,8 +88,7 @@
return gadget.updateHeader({
page_title: 'History',
page_icon: 'history',
front_url: url_list[0],
language_url: url_list[1]
front_url: url_list[0]
});
});
})
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>986.54157.57326.10274</string> </value>
<value> <string>994.55592.35612.50193</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1600954453.92</float>
<float>1632124106.47</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -37,9 +37,7 @@
var query_string,
url_for_parameter_list = [
// Back URL
{command: 'display'},
// Change language URL
{command: 'display', options: {page: 'language'}}
{command: 'display'}
],
display_options,
i;
......@@ -79,13 +77,13 @@
i,
dom_list = [];
for (i = 2; i < url_list.length; i += 1) {
for (i = 1; i < url_list.length; i += 1) {
dom_list.push(domsugar('li', {class: 'ui-li-has-count'}, [
domsugar('a', {href: url_list[i]}, [
action_list[i - 2].name,
action_list[i - 1].name,
' ',
domsugar('span', {class: 'ui-li-count',
text: action_list[i - 2].count})
text: action_list[i - 1].count})
])
]));
}
......@@ -106,8 +104,7 @@
return gadget.updateHeader({
page_title: 'Worklist',
page_icon: 'tasks',
front_url: url_list[0],
language_url: url_list[1]
front_url: url_list[0]
});
});
})
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>986.32404.49746.11571</string> </value>
<value> <string>994.55590.51645.37529</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1600958231.92</float>
<float>1632126331.02</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -12,13 +12,13 @@
data-i18n=Worklists
data-i18n=History
data-i18n=Search
data-i18n=Preferences
data-i18n=Logout
data-i18n=Views
data-i18n=Workflows
data-i18n=Actions
data-i18n=Jumps
data-i18n=Global
data-i18n=My Account
-->
<!-- renderjs -->
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>989.60900.17207.44100</string> </value>
<value> <string>994.51234.65222.57241</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1612990906.08</float>
<float>1632227052.12</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -182,7 +182,7 @@
{command: 'display', options: {page: "worklist"}},
{command: 'display', options: {page: "history"}},
{command: 'display_stored_state', options: {page: "search"}},
{command: 'display', options: {page: "preference"}},
{command: 'display', options: {page: "my_account"}},
{command: 'display', options: {page: "logout"}}
]),
translation_list: gadget.getTranslationList([
......@@ -192,7 +192,7 @@
'Worklists',
'History',
'Search',
'Preferences',
'My Account',
'Logout'
]),
checkbox_gadget: gadget.getDeclaredGadget("erp5_checkbox")
......@@ -208,6 +208,7 @@
'history', 'h',
'search', 's',
'sliders', null,
// 'sliders', null,
'power-off', 'o'
];
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.51079.60050.30071</string> </value>
<value> <string>994.55137.25232.35430</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1631622266.86</float>
<float>1632227072.53</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -92,8 +92,6 @@
}
// Add global url calculation
url_dict_list.push({command: 'display'});
// Add change language url calculation
url_dict_list.push({command: 'display', options: {page: 'language'}});
return RSVP.all([
document_list,
gadget.getTranslationList(['Others', 'Tools']),
......@@ -165,8 +163,7 @@
return gadget.updateHeader({
page_title: 'Modules',
page_icon: 'puzzle-piece',
front_url: url_list[i],
language_url: url_list[i + 1]
front_url: url_list[i]
});
});
});
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>991.59254.15114.55603</string> </value>
<value> <string>994.13854.35574.25361</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1620402959.3</float>
<float>1631892657.11</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>992.824.37160.29132</string> </value>
<value> <string>992.40778.27781.1774</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1620830587.9</float>
<float>1632217686.49</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -24,34 +24,12 @@
return new RSVP.Queue(RSVP.hash({
translation: gadget.getTranslationDict([
'Confirm',
'User'
'Confirm'
]),
me: gadget.getSetting('me')
.push(function (me) {
if (me !== undefined) {
return gadget.jio_allDocs({
query: 'relative_url:"' + me + '"',
select_list: ['title']
});
}
})
.push(function (result) {
var user;
// Calculate user name
if (result === undefined) {
user = "Who are you?";
} else {
user = result.data.rows[0].value.title;
}
return user;
}),
erp5_form: gadget.getDeclaredGadget("erp5_form"),
url_dict: gadget.getUrlForDict({
// Back url
back: {command: 'history_previous'},
// Change language
change_language: {command: 'display', options: {page: 'language'}}
back: {command: 'history_previous'}
})
}))
.push(function (result_dict) {
......@@ -64,19 +42,11 @@
gadget.updateHeader({
page_title: 'Logout',
page_icon: 'power-off',
front_url: result_dict.url_dict.back,
language_url: result_dict.url_dict.change_language
front_url: result_dict.url_dict.back
}),
result_dict.erp5_form.render({
erp5_document: {"_embedded": {"_view": {
'User': {
"default": result_dict.me,
"editable": 0,
"key": "field_user",
"title": result_dict.translation.User,
"type": "StringField"
}
}},
"_links": {
"type": {
......@@ -86,10 +56,7 @@
}
},
form_definition: {
group_list: [[
"left",
[["User"]]
]]
group_list: []
}
})
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.55155.11493.60433</string> </value>
<value> <string>994.61004.52513.15291</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1631866791.5</float>
<float>1632217737.36</float>
<string>UTC</string>
</tuple>
</state>
......
<!DOCTYPE html>
<html>
<!--
data-i18n=Preferences
data-i18n=Language
data-i18n=Profile
data-i18n=Logout
data-i18n=My Account
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ERP5 PT Logoutpage</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_page.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="domsugar.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_page_my_account.js" type="text/javascript"></script>
</head>
<body>
<section class="document_list"></section>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Page" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_my_account.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_pt_my_account_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Page</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget ERP5 My Account</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1631631331.87</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.61047.58814.54169</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1632221574.49</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1631631173.28</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
/*global window, rJS, domsugar, RSVP */
/*jslint indent: 2, maxerr: 3, nomen: true, maxlen: 80 */
(function (window, rJS, domsugar, RSVP) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("getUrlForDict", "getUrlForDict")
.declareAcquiredMethod("jio_getAttachment", "jio_getAttachment")
.declareAcquiredMethod("getTranslationDict", "getTranslationDict")
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function () {
var gadget = this,
me_relative_url;
return gadget.getSetting('me')
.push(function (result) {
me_relative_url = result;
return RSVP.hash({
translation: gadget.getTranslationDict([
'Preferences',
'Language',
'Profile',
'Logout',
'My Account'
]),
me: new RSVP.Queue()
.push(function () {
if (me_relative_url !== undefined) {
return gadget.jio_allDocs({
query: 'relative_url:"' + me_relative_url + '"',
select_list: ['title'],
limit: [0, 1]
});
}
})
.push(function (result) {
var user;
// Calculate user name
if (result === undefined) {
user = null;
} else {
user = result.data.rows[0].value.title;
}
return user;
}),
url_dict: gadget.getUrlForDict({
// Back url
back: {command: 'history_previous'},
preference: {command: 'push_history',
options: {page: "preference"}},
person: {command: 'push_history',
options: {jio_key: me_relative_url}},
// Change language
change_language: {command: 'push_history',
options: {page: 'language'}},
logout: {command: 'push_history', options: {page: 'logout'}}
})
});
})
.push(function (result_dict) {
domsugar(gadget.element.querySelector('.document_list'), [
domsugar('ul', {'class': 'document-listview'}, [
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.preference,
text: result_dict.translation.Preferences})
]),
(me_relative_url === undefined) ? '' :
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.person,
text: result_dict.translation.Profile})
]),
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.change_language,
text: result_dict.translation.Language})
]),
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.logout,
text: result_dict.translation.Logout})
])
])
]);
return gadget.updateHeader({
page_title: result_dict.translation['My Account'] +
((result_dict.me === null) ? '' : (': ' + result_dict.me)),
page_icon: 'sliders',
front_url: result_dict.url_dict.back
});
});
})
.declareMethod("triggerSubmit", function () {
return;
});
}(window, rJS, domsugar, RSVP));
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_erp5_page_my_account.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>rjs_gadget_erp5_pt_my_account_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget ERP5 My Account JS</string> </value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>001</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1631631343.71</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.61067.37482.40516</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1632221584.7</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>detect_converted_file</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>converted</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1631631227.76</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -91,6 +91,8 @@ url_list = [
'gadget_erp5_page_history.js',
'gadget_erp5_page_jump.html',
'gadget_erp5_page_jump.js',
'gadget_erp5_page_my_account.html',
'gadget_erp5_page_my_account.js',
'gadget_erp5_page_language.html',
'gadget_erp5_page_language.js',
'gadget_erp5_page_logout.html',
......
......@@ -15,10 +15,14 @@
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/enable_developer_mode" />
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}">
<tal:block tal:define="click_configuration python: {'text': 'My Account'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Views'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
......
......@@ -29,10 +29,14 @@
<td>//a[text()="Business Templates" and href=contains(text(), "n.jio_key=portal_templates")]</td>
<td></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}">
<tal:block tal:define="click_configuration python: {'text': 'My Account'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'User Interface'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
......
......@@ -13,7 +13,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block tal:define="check_configuration python: {'precache_reference': '../renderjs_runner/WebSection_getPrecacheManifest',
'gadget_count': 72}">
'gadget_count': 73}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUiInterface/macros/run_app_interface_check" />
</tal:block>
......
......@@ -35,7 +35,7 @@
<td>test</td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}">
<tal:block tal:define="click_configuration python: {'text': 'My Account'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
......@@ -48,4 +48,4 @@
</tbody></table>
</body>
</html>
</html>
\ No newline at end of file
......@@ -42,7 +42,7 @@
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Preferences']</td>
<td>//div[@data-gadget-scope='panel']//a[text()='My Account']</td>
<td></td>
</tr>
......@@ -55,7 +55,7 @@
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Preferences']</td>
<td>//div[@data-gadget-scope='panel']//a[text()='My Account']</td>
<td></td>
</tr>
......
......@@ -18,6 +18,8 @@
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
......@@ -38,14 +40,14 @@
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Preferences']</td>
<td>//div[@data-gadget-scope='panel']//a[text()='My Account']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='panel']//a[text()='Preferences']</td>
<td>//div[@data-gadget-scope='panel']//a[text()='My Account']</td>
<td></td>
</tr>
......
<?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>testPageMyAccountBackLink</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 Form View Back Link</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module List main link</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/?page=my_account</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_my_account.html']</td>
<td></td>
</tr>
<!-- Header has a link to the front page -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='My Account' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='My Account' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?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>testPageMyAccountListLink</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 Form View Back Link</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Module List main link</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/?page=my_account</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_my_account.html']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Preferences' and contains(@href, '#!push_history') and contains(@href, 'n.page=preference')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Language' and contains(@href, '#!push_history') and contains(@href, 'n.page=language')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Logout' and contains(@href, '#!push_history') and contains(@href, 'n.page=logout')]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -111,7 +111,7 @@
<tr>
<td>verifyText</td>
<td>//a[@class="ui-btn-icon-left ui-icon-sliders"]</td>
<td>Preferences</td>
<td>My Account</td>
</tr>
......
......@@ -59,7 +59,7 @@
<tr>
<td>verifyText</td>
<td>//div[@data-gadget-scope='panel']//a[@class="ui-btn-icon-left ui-icon-sliders"]</td>
<td>pianai</td>
<td>wodezhanghao</td>
</tr>
......
......@@ -20,11 +20,7 @@
<td>${base_url}/web_site_module/renderjs_runner/#/?page=preference</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Active</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<!-- Search from the panel -->
<tr>
......@@ -69,14 +65,10 @@
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//a[text()='Preferences']</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//a[text()='My Account']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Active</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!-- Check the the global search link restore the search state -->
<tr>
......
......@@ -32,6 +32,7 @@ param_dict = [
{ 'message': 'User', 'translation': 'yonghu', 'language': 'wo'},
{ 'message': 'Username', 'translation': u'turu jëfandikookat', 'language': 'wo'},
{ 'message': 'Recover your Account', 'translation': u'tëjju barabu këllu jëfandikookat', 'language': 'wo'},
{ 'message': 'My Account', 'translation': 'wodezhanghao', 'language': 'wo'},
{ 'message': 'Sort Editor', 'translation': 'paixubianyiqi', 'language': 'wo'},
{ 'message': 'Home', 'translation': 'zhuye', 'language': 'wo'},
{ 'message': 'State', 'translation': 'zhuangtai', 'language': 'wo'},
......
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