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
144
Merge Requests
144
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
4ef46401
Commit
4ef46401
authored
Mar 17, 2020
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_project_ui: forum link and limit dates
parent
8ad3b73e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
25 deletions
+21
-25
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_front_page_js.js
..._page_module/project_gadget_page_project_front_page_js.js
+17
-21
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_front_page_js.xml
...page_module/project_gadget_page_project_front_page_js.xml
+2
-2
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_page_js.xml
...m/web_page_module/project_gadget_page_project_page_js.xml
+2
-2
No files found.
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_front_page_js.js
View file @
4ef46401
...
...
@@ -19,16 +19,18 @@
TEST_RESULT_PORTAL_TYPE
=
"
Test Result
"
,
QUERY_LIMIT
=
100000
,
SUPERVISOR_FIELD_TITLE
=
"
Supervisor
"
,
//XXX hardcoded
one year old date to define outdated elements
//
Where to define/get the limit date? by portal_type or the same for all documents
?
//XXX hardcoded
limit dates (3 months for milestones, 3 weeks for documents)
//
define dates in System Preference Project tab
?
//date ISO string format: "yyyy-mm-ddThh:mm:ss.mmmm"
//JIO query date format: "yyyy-mm-dd hh:mm:ss"
//FOR DEMO
/*LIMIT_DATE = new Date(new Date().setFullYear(new Date().getFullYear() - 1))
/*MILESTONE_LIMIT_DATE = new Date(new Date().setDate(new Date().getDate() - 90))
.toISOString().substring(0, new Date().toISOString().length - 5).replace("T", " "),
DOCUMENT_LIMIT_DATE = new Date(new Date().setDate(new Date().getDate() - 21))
.toISOString().substring(0, new Date().toISOString().length - 5).replace("T", " "),*/
LIMIT_DATE
=
new
Date
(
2019
,
11
,
19
,
10
,
33
,
30
,
0
)
//FOR DEMO
MILESTONE_LIMIT_DATE
=
new
Date
(
2019
,
11
,
19
,
10
,
33
,
30
,
0
)
.
toISOString
().
substring
(
0
,
new
Date
().
toISOString
().
length
-
5
).
replace
(
"
T
"
,
"
"
),
NOW_DATE
=
new
Date
().
toISOString
().
substring
(
0
,
new
Date
().
toISOString
().
length
-
5
).
replace
(
"
T
"
,
"
"
)
,
DOCUMENT_LIMIT_DATE
=
MILESTONE_LIMIT_DATE
,
//XXX hardcoded portal_types, states and titles dict
PORTAL_TITLE_DICT
=
{
"
Task
"
:
"
Tasks
"
,
"
Test Result
"
:
"
Test Results
"
,
...
...
@@ -79,7 +81,7 @@
if
(
query_dict
.
hasOwnProperty
(
key
))
{
query_list
.
push
(
new
SimpleQuery
({
key
:
key
,
operator
:
"
=
"
,
operator
:
""
,
type
:
"
simple
"
,
value
:
query_dict
[
key
]
}));
...
...
@@ -227,8 +229,7 @@
return
gadget
.
jio_allDocs
({
query
:
project_query
,
limit
:
QUERY_LIMIT
,
select_list
:
[
'
title
'
,
'
source_decision_title
'
,
'
source_decision_relative_url
'
,
'
forum_link
'
],
select_list
:
[
'
title
'
,
'
source_decision_title
'
,
'
source_decision_relative_url
'
],
sort_on
:
[[
"
title
"
,
"
ascending
"
]]
})
.
push
(
function
(
result
)
{
...
...
@@ -548,7 +549,7 @@
.
push
(
function
()
{
//run the rest of queries and render async
gadget
.
renderMilestoneInfo
();
gadget
.
renderOtdatedMilestoneInfo
();
gadget
.
renderO
u
tdatedMilestoneInfo
();
gadget
.
renderProjectDocumentInfo
();
gadget
.
renderOutdatedDocumentInfo
();
gadget
.
renderTestResultInfo
();
...
...
@@ -560,8 +561,8 @@
return
renderMilestoneLines
(
this
);
})
.
declareJob
(
"
renderOtdatedMilestoneInfo
"
,
function
()
{
return
renderMilestoneLines
(
this
,
LIMIT_DATE
);
.
declareJob
(
"
renderO
u
tdatedMilestoneInfo
"
,
function
()
{
return
renderMilestoneLines
(
this
,
MILESTONE_
LIMIT_DATE
);
})
.
declareJob
(
"
renderProjectDocumentInfo
"
,
function
()
{
...
...
@@ -569,7 +570,7 @@
})
.
declareJob
(
"
renderOutdatedDocumentInfo
"
,
function
()
{
return
renderProjectDocumentLines
(
this
,
LIMIT_DATE
);
return
renderProjectDocumentLines
(
this
,
DOCUMENT_
LIMIT_DATE
);
})
.
declareJob
(
"
renderTestResultInfo
"
,
function
()
{
...
...
@@ -602,16 +603,14 @@
forum_link_list
,
link_query
=
getComplexQuery
({
"
portal_type
"
:
"
Link
"
,
"
validation_state
"
:
"
reachable
"
,
"
parent__validation_state
"
:
"
validated
"
},
"
relative_url
"
:
"
project_module/%/forum_link
"
},
"
AND
"
);
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
jio_allDocs
({
query
:
Query
.
objectToSearchText
(
link_query
),
limit
:
QUERY_LIMIT
,
// TODO FIX not found column url_string when group by parent
select_list
:
[
'
title
'
,
'
portal_type
'
],
//, 'url_string'],
group_by
:
[
'
parent_uid
'
],
select_list
:
[
'
url_string
'
],
sort_on
:
[[
"
modification_date
"
,
"
descending
"
]]
});
})
...
...
@@ -624,10 +623,7 @@
FORUM_LINK_ID_SUFFIX
,
true
)
);
if
(
forum_link_html
)
{
//forum_link_html.href = forum_link_list[i].value.url_string;
//forum_link_html.innerHTML = forum_link_list[i].value.title;
//HARDCODED FOR DEMO
forum_link_html
.
href
=
"
https://www.erp5.com/group_section/forum
"
;
forum_link_html
.
href
=
forum_link_list
[
i
].
value
.
url_string
;
forum_link_html
.
innerHTML
=
"
Project Forum
"
;
forum_link_html
.
classList
.
remove
(
"
ui-hidden
"
);
}
...
...
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_front_page_js.xml
View file @
4ef46401
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.3
6776.5986.55278
</string>
</value>
<value>
<string>
982.3
8309.20229.23722
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1584
355853.33
</float>
<float>
1584
447692.07
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_project_ui/PathTemplateItem/web_page_module/project_gadget_page_project_page_js.xml
View file @
4ef46401
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.
29566.64593.53282
</string>
</value>
<value>
<string>
982.
36846.48545.18193
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>
158
3923160.91
</float>
<float>
158
4360005.19
</float>
<string>
UTC
</string>
</tuple>
</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