Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Website
Commits
9f4609b1
Commit
9f4609b1
authored
Mar 09, 2019
by
Matija Obreza
Browse files
Make HTML Preview public
parent
07f1c7f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/descriptorlists/ui/c/DescriptorListDisplay.tsx
View file @
9f4609b1
...
...
@@ -266,50 +266,48 @@ class DetailInfo extends React.Component<IDetailInfoProps, any> {
</
Properties
>
</
CardContent
>
{
!
review
&&
(
descriptorList
.
_permissions
.
write
||
descriptorList
.
_permissions
.
delete
)
&&
(
<
CardActions
>
{
descriptorList
.
state
===
PublishState
.
PUBLISHED
?
descriptorList
.
_permissions
.
manage
&&
!
oneDayPassed
?
<
CardActions
>
{
!
review
&&
(
<
span
>
{
descriptorList
.
state
===
PublishState
.
PUBLISHED
?
(
descriptorList
.
_permissions
.
manage
&&
!
oneDayPassed
)
?
<
Button
onClick
=
{
this
.
onUnpublish
}
type
=
"button"
>
{
t
(
'
common:action.un-publish
'
)
}
</
Button
>
:
<
Authorize
role
=
"ROLE_ADMINISTRATOR"
>
<
Button
onClick
=
{
this
.
onUnpublish
}
type
=
"button"
>
{
t
(
'
common:action.un-publish
'
)
}
</
Button
>
</
Authorize
>
:
null
:
null
}
{
descriptorList
.
state
===
PublishState
.
DRAFT
&&
descriptorList
.
_permissions
.
write
&&
{
descriptorList
.
state
===
PublishState
.
DRAFT
&&
descriptorList
.
_permissions
.
write
&&
<
Button
onClick
=
{
this
.
onPublish
}
type
=
"button"
>
{
t
(
'
common:action.publish
'
)
}
</
Button
>
}
{
descriptorList
.
state
!==
PublishState
.
PUBLISHED
&&
descriptorList
.
_permissions
.
write
&&
{
descriptorList
.
state
!==
PublishState
.
PUBLISHED
&&
descriptorList
.
_permissions
.
write
&&
<
Button
onClick
=
{
this
.
onReject
}
type
=
"button"
>
{
t
(
'
common:action.edit
'
)
}
</
Button
>
}
{
descriptorList
.
state
===
PublishState
.
REVIEWING
&&
<
Authorize
role
=
"ROLE_ADMINISTRATOR"
>
<
Button
onClick
=
{
this
.
onApprove
}
type
=
"button"
>
{
t
(
'
common:action.approve
'
)
}
</
Button
>
</
Authorize
>
<
Authorize
role
=
"ROLE_ADMINISTRATOR"
>
<
Button
onClick
=
{
this
.
onApprove
}
type
=
"button"
>
{
t
(
'
common:action.approve
'
)
}
</
Button
>
</
Authorize
>
}
{
descriptorList
.
state
!==
PublishState
.
PUBLISHED
&&
descriptorList
.
_permissions
.
delete
&&
<
Button
onClick
=
{
this
.
onDelete
}
type
=
"button"
>
{
t
(
'
common:action.delete
'
)
}
</
Button
>
{
descriptorList
.
state
!==
PublishState
.
PUBLISHED
&&
descriptorList
.
_permissions
.
delete
&&
<
Button
onClick
=
{
this
.
onDelete
}
type
=
"button"
>
{
t
(
'
common:action.delete
'
)
}
</
Button
>
}
{
descriptorList
.
_permissions
.
manage
&&
</
span
>
)
}
{
descriptorList
.
_permissions
.
manage
&&
<
Permissions
clazz
=
{
DescriptorList
.
clazz
}
id
=
{
descriptorList
.
id
}
/>
}
<
a
target
=
"_blank"
href
=
{
`/proxy/api/v1/descriptorlist/
${
descriptorList
.
uuid
}
/html`
}
>
<
Button
type
=
"button"
>
{
t
(
'
descriptorlists.public.common.html
'
)
}
</
Button
>
</
a
>
</
CardActions
>
)
}
}
<
a
target
=
"_blank"
href
=
{
`/proxy/api/v1/descriptorlist/
${
descriptorList
.
uuid
}
/html`
}
>
<
Button
type
=
"button"
>
{
t
(
'
descriptorlists.public.common.html
'
)
}
</
Button
>
</
a
>
</
CardActions
>
</
Card
>
</
Grid
>
...
...
Write
Preview
Supports
Markdown
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