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

Make HTML Preview public

parent 07f1c7f4
......@@ -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>
......
Markdown is supported
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