Commit 767bad4b authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: easily allow user to see his preference list

parent e012a040
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!-- <!--
data-i18n=Active Preference
data-i18n=Preferences data-i18n=Preferences
data-i18n=Language data-i18n=Language
data-i18n=Profile data-i18n=Profile
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.61047.58814.54169</string> </value> <value> <string>994.62318.46378.10649</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1632221574.49</float> <float>1716899361.99</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
return RSVP.hash({ return RSVP.hash({
translation: gadget.getTranslationDict([ translation: gadget.getTranslationDict([
'Active Preference',
'Preferences', 'Preferences',
'Language', 'Language',
'Profile', 'Profile',
...@@ -50,8 +51,6 @@ ...@@ -50,8 +51,6 @@
// Calculate user name // Calculate user name
if (result === undefined) { if (result === undefined) {
user = null; user = null;
} else if (result.data.rows.length === 0) {
user = null;
} else { } else {
user = result.data.rows[0].value.title; user = result.data.rows[0].value.title;
} }
...@@ -60,8 +59,10 @@ ...@@ -60,8 +59,10 @@
url_dict: gadget.getUrlForDict({ url_dict: gadget.getUrlForDict({
// Back url // Back url
back: {command: 'history_previous'}, back: {command: 'history_previous'},
preference: {command: 'push_history', my_preference: {command: 'push_history',
options: {page: "preference"}}, options: {page: "preference"}},
portal_preference: {command: 'push_history',
options: {jio_key: "portal_preferences"}},
person: {command: 'push_history', person: {command: 'push_history',
options: {jio_key: me_relative_url}}, options: {jio_key: me_relative_url}},
// Change language // Change language
...@@ -75,7 +76,11 @@ ...@@ -75,7 +76,11 @@
domsugar(gadget.element.querySelector('.document_list'), [ domsugar(gadget.element.querySelector('.document_list'), [
domsugar('ul', {'class': 'document-listview'}, [ domsugar('ul', {'class': 'document-listview'}, [
domsugar('li', [ domsugar('li', [
domsugar('a', {href: result_dict.url_dict.preference, domsugar('a', {href: result_dict.url_dict.my_preference,
text: result_dict.translation['Active Preference']})
]),
domsugar('li', [
domsugar('a', {href: result_dict.url_dict.portal_preference,
text: result_dict.translation.Preferences}) text: result_dict.translation.Preferences})
]), ]),
(me_relative_url === undefined) ? '' : (me_relative_url === undefined) ? '' :
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>998.18207.59213.64375</string> </value> <value> <string>1014.4857.18905.5273</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1667992189.61</float> <float>1716899348.27</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}"> <tal:block tal:define="click_configuration python: {'text': 'Active Preference'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//ul[@class="ui-list-grid"]/li[2]/h2[text()="Tools"]</td> <td>//ul[@class="ui-list-grid"]//li/h2[text()="Tools"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Preferences'}"> <tal:block tal:define="click_configuration python: {'text': 'Active Preference'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr> <tr>
<td>assertElementNotPresent</td> <td>assertElementNotPresent</td>
<td>//ul[@class="ui-list-grid"]/li[2]/h2[text()="Tools"]</td> <td>//ul[@class="ui-list-grid"]//li/h2[text()="Tools"]</td>
<td></td> <td></td>
</tr> </tr>
</tbody></table> </tbody></table>
......
...@@ -27,7 +27,13 @@ ...@@ -27,7 +27,13 @@
<tr> <tr>
<td>assertElementPresent</td> <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>//div[@data-gadget-scope='m']//a[text()='Active Preference' 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()='Preferences' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=portal_preferences')]</td>
<td></td> <td></td>
</tr> </tr>
......
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