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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
320e734c
Commit
320e734c
authored
Sep 24, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP erp5_web_renderjs_ui: show tools on module list
parent
1291cc38
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
16 deletions
+32
-16
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_html.html
...em/web_page_module/rjs_gadget_erp5_pt_frontpage_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_html.xml
...tem/web_page_module/rjs_gadget_erp5_pt_frontpage_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js
+27
-12
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_html.html
View file @
320e734c
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<html>
<html>
<!--
<!--
data-i18n=Others
data-i18n=Others
data-i18n=Tools
-->
-->
<head>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_html.xml
View file @
320e734c
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
1.53539.4987.28928
</string>
</value>
<value>
<string>
98
6.51245.10858.8089
</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>
1
581602343.58
</float>
<float>
1
605547612.43
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js
View file @
320e734c
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
// Acquired methods
// Acquired methods
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
...
@@ -52,7 +52,8 @@
...
@@ -52,7 +52,8 @@
// First, get the list of modules
// First, get the list of modules
return
gadget
.
jio_allDocs
({
return
gadget
.
jio_allDocs
({
select_list
:
select_list
,
select_list
:
select_list
,
query
:
'
(parent_uid:"0" AND meta_type:"ERP5 Folder" AND id:"%_module")
'
,
// XXX XXX XXX How to search tools only when developper mode is activated?
query
:
'
(parent_uid:"0" AND (meta_type:"ERP5 Folder" AND id:"%_module") OR (id:"portal_%"))
'
,
limit
:
1000
limit
:
1000
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
...
@@ -96,19 +97,21 @@
...
@@ -96,19 +97,21 @@
url_dict_list
.
push
({
command
:
'
display
'
,
options
:
{
page
:
'
language
'
}});
url_dict_list
.
push
({
command
:
'
display
'
,
options
:
{
page
:
'
language
'
}});
return
RSVP
.
all
([
return
RSVP
.
all
([
document_list
,
document_list
,
gadget
.
translate
(
'
Others
'
),
gadget
.
getTranslationList
([
'
Others
'
,
'
Tools
'
]
),
gadget
.
getUrlForList
(
url_dict_list
)
gadget
.
getUrlForList
(
url_dict_list
)
]);
]);
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
var
document_list
=
result_list
[
0
],
var
document_list
=
result_list
[
0
],
translated_other_title
=
result_list
[
1
],
translated_other_title
=
result_list
[
1
][
0
],
translated_tool_title
=
result_list
[
1
][
1
],
url_list
=
result_list
[
2
],
url_list
=
result_list
[
2
],
len
=
document_list
.
length
,
len
=
document_list
.
length
,
i
,
i
,
card_list
=
[],
card_list
=
[],
module_list
=
[],
module_list
=
[],
other_module_list
=
[],
other_module_list
=
[],
tool_list
=
[],
current_business_application_title
=
''
;
current_business_application_title
=
''
;
function
pushNewCard
()
{
function
pushNewCard
()
{
...
@@ -128,15 +131,21 @@
...
@@ -128,15 +131,21 @@
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
// Inject the module url into the document
// Inject the module url into the document
document_list
[
i
].
link
=
url_list
[
i
];
document_list
[
i
].
link
=
url_list
[
i
];
// Create card if needed
// Tools do not have any business application
if
(
document_list
[
i
].
business_application_translated_title
!==
// Workaround this limitation
current_business_application_title
)
{
if
(
document_list
[
i
].
id
.
indexOf
(
'
portal_
'
)
===
0
)
{
pushNewCard
();
tool_list
.
push
(
document_list
[
i
]);
module_list
=
[];
}
else
{
current_business_application_title
=
// Create card if needed
document_list
[
i
].
business_application_translated_title
;
if
(
document_list
[
i
].
business_application_translated_title
!==
current_business_application_title
)
{
pushNewCard
();
module_list
=
[];
current_business_application_title
=
document_list
[
i
].
business_application_translated_title
;
}
module_list
.
push
(
document_list
[
i
]);
}
}
module_list
.
push
(
document_list
[
i
]);
}
}
pushNewCard
();
pushNewCard
();
if
(
other_module_list
.
length
)
{
if
(
other_module_list
.
length
)
{
...
@@ -145,6 +154,12 @@
...
@@ -145,6 +154,12 @@
module_list
:
other_module_list
module_list
:
other_module_list
});
});
}
}
if
(
tool_list
.
length
)
{
card_list
.
push
({
business_application_translated_title
:
translated_tool_title
,
module_list
:
tool_list
});
}
generateCardList
(
gadget
.
element
.
querySelector
(
'
ul
'
),
card_list
);
generateCardList
(
gadget
.
element
.
querySelector
(
'
ul
'
),
card_list
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml
View file @
320e734c
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
6.54125.60966.30924
</string>
</value>
<value>
<string>
98
8.1080.26744.24678
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
160
0957441.42
</float>
<float>
160
5547733.16
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
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