Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Julien Jerphanion
Rex Dri
Commits
43debf33
Commit
43debf33
authored
Mar 09, 2019
by
Florent Chehab
Browse files
Don't show a badge if nbversion <= 1
fixed bug related to opening the moderation panel.
parent
942857c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/components/common/MyBadge.js
View file @
43debf33
...
...
@@ -10,7 +10,7 @@ import Badge from "@material-ui/core/Badge";
* @returns
*/
export
default
function
MyBadge
(
props
)
{
if
(
props
.
badgeContent
)
{
if
(
props
.
badgeContent
>
1
)
{
return
(
<
Badge
badgeContent
=
{
props
.
badgeContent
}
color
=
{
props
.
color
}
max
=
{
5
}
>
{
props
.
children
}
...
...
frontend/src/components/university/modules/common/moduleWrapperFunctions/renderFirstRow.js
View file @
43debf33
...
...
@@ -42,7 +42,7 @@ export default function renderFirstRow(userCanModerate) {
<
Tooltip
title
=
{
moderTooltip
}
placement
=
"
top
"
>
<
div
style
=
{{
display
:
"
inline-block
"
}}
>
{
/* Needed to fire events for the tooltip when below is disabled! when below is disabled!! */
}
<
MyBadge
className
=
{
classes
.
badge
}
badgeContent
=
{
nbPendingModeration
}
color
=
"
secondary
"
>
<
IconButton
aria
-
label
=
"
Modération
"
disabled
=
{
moderClass
==
"
disabled
"
||
moderClass
==
"
green
"
}
onClick
=
{()
=>
this
.
handleO
penPendingModeration
()}
className
=
{
classes
.
button
}
>
<
IconButton
aria
-
label
=
"
Modération
"
disabled
=
{
moderClass
==
"
disabled
"
||
moderClass
==
"
green
"
}
onClick
=
{()
=>
this
.
o
penPendingModeration
Panel
()}
className
=
{
classes
.
button
}
>
<
VerifiedUserIcon
className
=
{
classes
[
moderClass
]}
/
>
<
/IconButton
>
<
/MyBadge
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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