Commit 9b624450 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: easily allow user to see his preference list

parent f6407fdb
<!DOCTYPE html>
<html>
<!--
data-i18n=Active Preference
data-i18n=Preferences
data-i18n=Language
data-i18n=Profile
......
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.61047.58814.54169</string> </value>
<value> <string>994.62318.46378.10649</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1632221574.49</float>
<float>1716899361.99</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -29,6 +29,7 @@
return RSVP.hash({
translation: gadget.getTranslationDict([
'Active Preference',
'Preferences',
'Language',
'Profile',
......@@ -50,8 +51,6 @@
// Calculate user name
if (result === undefined) {
user = null;
} else if (result.data.rows.length === 0) {
user = null;
} else {
user = result.data.rows[0].value.title;
}
......@@ -60,8 +59,10 @@
url_dict: gadget.getUrlForDict({
// Back url
back: {command: 'history_previous'},
preference: {command: 'push_history',
options: {page: "preference"}},
my_preference: {command: 'push_history',
options: {page: "preference"}},
portal_preference: {command: 'push_history',
options: {jio_key: "portal_preferences"}},
person: {command: 'push_history',
options: {jio_key: me_relative_url}},
// Change language
......@@ -75,7 +76,11 @@
domsugar(gadget.element.querySelector('.document_list'), [
domsugar('ul', {'class': 'document-listview'}, [
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})
]),
(me_relative_url === undefined) ? '' :
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>998.18207.59213.64375</string> </value>
<value> <string>1014.4857.18905.5273</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1667992189.61</float>
<float>1716899348.27</float>
<string>UTC</string>
</tuple>
</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