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
147
Merge Requests
147
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
fdf52fb0
Commit
fdf52fb0
authored
Feb 26, 2020
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_project_ui: front page supervisor info
parent
b462a5be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
30 deletions
+55
-30
bt5/erp5_web_project_ui/SkinTemplateItem/portal_skins/erp5_web_project/gadget_front_page_info.js.js
...ortal_skins/erp5_web_project/gadget_front_page_info.js.js
+18
-5
bt5/erp5_web_project_ui/SkinTemplateItem/portal_skins/erp5_web_project/gadget_project_info.css.css
...portal_skins/erp5_web_project/gadget_project_info.css.css
+37
-25
No files found.
bt5/erp5_web_project_ui/SkinTemplateItem/portal_skins/erp5_web_project/gadget_front_page_info.js.js
View file @
fdf52fb0
...
...
@@ -12,6 +12,7 @@
const
TOTAL_SPAN
=
"
total
"
;
const
OUTDATED_SPAN
=
"
outdated
"
;
const
QUERY_LIMIT
=
100000
;
const
SUPERVISOR_FIELD_TITLE
=
"
Supervisor
"
;
//XXX hardcoded portal_types, states and titles dict (build a template?)
const
PORTAL_TITLE_DICT
=
{
"
Task
"
:
"
Tasks
"
,
"
Test Result
"
:
"
Test Results
"
,
...
...
@@ -82,7 +83,7 @@
});
}
function
getProject
Element
List
(
gadget
)
{
function
getProjectList
(
gadget
)
{
var
project_query
=
Query
.
objectToSearchText
(
getComplexQuery
({
"
portal_type
"
:
"
Project
"
,
"
validation_state
"
:
"
validated
"
},
...
...
@@ -90,7 +91,7 @@
return
gadget
.
jio_allDocs
({
query
:
project_query
,
limit
:
QUERY_LIMIT
,
select_list
:
[
'
title
'
],
select_list
:
[
'
title
'
,
'
source_decision_title
'
],
sort_on
:
[[
"
modification_date
"
,
"
ascending
"
]]
})
.
push
(
function
(
result
)
{
...
...
@@ -126,7 +127,7 @@
project_dict
,
outdated
;
function
createProjectHtmlElement
(
project_id
,
project_title
,
project_url
)
{
function
createProjectHtmlElement
(
project_id
,
project_title
,
project_url
,
supervisor
)
{
var
project_element
=
document
.
createElement
(
'
li
'
),
box_div
=
document
.
createElement
(
'
div
'
),
title_div
=
document
.
createElement
(
'
div
'
),
...
...
@@ -134,8 +135,19 @@
left_info_div
=
document
.
createElement
(
'
div
'
),
right_div
=
document
.
createElement
(
'
div
'
),
right_line_div
=
document
.
createElement
(
'
div
'
),
supervisor_line_div
=
document
.
createElement
(
'
div
'
),
project_link
=
document
.
createElement
(
'
a
'
),
forum_link
=
document
.
createElement
(
'
a
'
);
if
(
supervisor
)
{
var
supervisor_field_label
=
document
.
createElement
(
'
label
'
),
supervisor_value_span
=
document
.
createElement
(
'
span
'
);
supervisor_line_div
.
classList
.
add
(
"
field
"
,
"
project-line
"
);
supervisor_field_label
.
innerHTML
=
SUPERVISOR_FIELD_TITLE
;
supervisor_value_span
.
innerHTML
=
supervisor
;
supervisor_line_div
.
appendChild
(
supervisor_field_label
);
supervisor_line_div
.
appendChild
(
supervisor_value_span
);
right_div
.
appendChild
(
supervisor_line_div
);
}
box_div
.
classList
.
add
(
"
project-box
"
);
title_div
.
classList
.
add
(
"
project-title
"
);
project_link
.
href
=
project_url
;
...
...
@@ -209,7 +221,8 @@
.
push
(
function
(
url_list
)
{
spinner
.
classList
.
add
(
"
ui-hidden
"
);
for
(
i
=
0
;
i
<
project_list
.
length
;
i
+=
1
)
{
project_html_element_list
=
createProjectHtmlElement
(
project_list
[
i
].
id
,
project_list
[
i
].
value
.
title
,
url_list
[
i
]);
project_html_element_list
=
createProjectHtmlElement
(
project_list
[
i
].
id
,
project_list
[
i
].
value
.
title
,
url_list
[
i
],
project_list
[
i
].
value
.
source_decision_title
);
project_html
=
project_html_element_list
[
0
];
left_div_html
=
project_html_element_list
[
1
];
...
...
@@ -240,7 +253,7 @@
.
onStateChange
(
function
()
{
var
gadget
=
this
;
return
getProject
Element
List
(
gadget
)
return
getProjectList
(
gadget
)
.
push
(
function
(
project_list
)
{
return
renderProjectList
(
gadget
,
project_list
);
})
...
...
bt5/erp5_web_project_ui/SkinTemplateItem/portal_skins/erp5_web_project/gadget_project_info.css.css
View file @
fdf52fb0
/* FRONT PAGE */
.loader
{
position
:
fixed
;
left
:
50%
;
top
:
50%
;
font-size
:
300%
;
animation-name
:
fadein
;
animation-duration
:
0.2s
;
animation-delay
:
0.3s
;
animation-fill-mode
:
both
;
animation-timing-function
:
ease-in
;
}
.ui-icon-spinner
{
opacity
:
1
;
}
.ui-icon-spinner
::before
{
content
:
"\f110"
;
animation
:
spin
0.5s
infinite
linear
;
}
.ui-icon-spinner.ui-hidden
{
visibility
:
hidden
;
}
div
[
data-gadget-url
$
=
"gadget_front_page_info.html"
]
.front-project-list
{
margin-top
:
10px
;
}
...
...
@@ -60,6 +35,18 @@ div[data-gadget-url$="gadget_front_page_info.html"] .front-project-list .project
letter-spacing
:
-.003em
;
}
div
[
data-gadget-url
$
=
"gadget_front_page_info.html"
]
.front-project-list
.project-box
.project-line.field
{
display
:
flex
;
}
div
[
data-gadget-url
$
=
"gadget_front_page_info.html"
]
.front-project-list
.project-box
.project-line.field
label
{
color
:
#767676
;
}
div
[
data-gadget-url
$
=
"gadget_front_page_info.html"
]
.front-project-list
.project-box
.project-line.field
span
{
margin-left
:
15px
;
}
div
[
data-gadget-url
$
=
"gadget_front_page_info.html"
]
.front-project-list
.project-box
.project-title
{
color
:
#19535F
;
font-weight
:
normal
;
...
...
@@ -93,6 +80,31 @@ div[data-gadget-url$="gadget_front_page_info.html"] .front-project-list .project
background
:
#00b80c
!important
;
}
.loader
{
position
:
fixed
;
left
:
50%
;
top
:
50%
;
font-size
:
300%
;
animation-name
:
fadein
;
animation-duration
:
0.2s
;
animation-delay
:
0.3s
;
animation-fill-mode
:
both
;
animation-timing-function
:
ease-in
;
}
.ui-icon-spinner
{
opacity
:
1
;
}
.ui-icon-spinner
::before
{
content
:
"\f110"
;
animation
:
spin
0.5s
infinite
linear
;
}
.ui-icon-spinner.ui-hidden
{
visibility
:
hidden
;
}
/* PROJECT PAGE */
...
...
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