Commit 67ac966a authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: easily allow user to see his preference list

parent 7ac09901
<!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>
......
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