Commit 9f4609b1 authored by Matija Obreza's avatar Matija Obreza
Browse files

Make HTML Preview public

parent 07f1c7f4
......@@ -266,10 +266,10 @@ 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 ?
{ !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">
......@@ -277,14 +277,12 @@ class DetailInfo extends React.Component<IDetailInfoProps, any> {
</Authorize>
: 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>
......@@ -296,12 +294,13 @@ class DetailInfo extends React.Component<IDetailInfoProps, any> {
</Button>
</Authorize>
}
{ descriptorList.state !== PublishState.PUBLISHED &&
descriptorList._permissions.delete &&
{ descriptorList.state !== PublishState.PUBLISHED && descriptorList._permissions.delete &&
<Button onClick={ this.onDelete } type="button">
{ t('common:action.delete') }
</Button>
}
</span>
) }
{ descriptorList._permissions.manage &&
<Permissions clazz={ DescriptorList.clazz } id={ descriptorList.id }/>
}
......@@ -309,7 +308,6 @@ class DetailInfo extends React.Component<IDetailInfoProps, any> {
<Button type="button">{ t('descriptorlists.public.common.html') }</Button>
</a>
</CardActions>
) }
</Card>
</Grid>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment