Skip to content

Commit

Permalink
user is not an author - fixed [#144832653]
Browse files Browse the repository at this point in the history
  • Loading branch information
jannakha committed Aug 10, 2017
1 parent e30bc0a commit 0ee092f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions src/modules/ClaimPublication/components/ClaimPublication.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,26 @@ export default class ClaimPublication extends React.Component {
];
return (
<StandardPage title={txt.title}>
<ConfirmDialogBox onRef={ref => (this.hideAllConfirmationBox = ref)}
onAction={this._hideAllPublications}
locale={txt.hideAllPublicationsConfirmation} />

<ConfirmDialogBox onRef={ref => (this.hideConfirmationBox = ref)}
onAction={this._hidePublication}
locale={txt.hidePublicationConfirmation} />

{
(this.props.loadingSearch || !this.props.possibleCounts) &&
this.props.publicationsList.length > 0 &&
<section>
<ConfirmDialogBox onRef={ref => (this.hideAllConfirmationBox = ref)}
onAction={this._hideAllPublications}
locale={txt.hideAllPublicationsConfirmation} />

<ConfirmDialogBox onRef={ref => (this.hideConfirmationBox = ref)}
onAction={this._hidePublication}
locale={txt.hidePublicationConfirmation} />
</section>
}
{
this.props.author && (this.props.loadingSearch || !this.props.possibleCounts) &&
<div className="is-centered">
<InlineLoader message={txt.loadingMessage} />
</div>
}
{
!this.props.loadingSearch && this.props.publicationsList.length === 0 &&
(!this.props.author || (!this.props.loadingSearch && this.props.publicationsList.length === 0)) &&
<StandardCard {...txt.noResultsFound}>
{txt.noResultsFound.text}
</StandardCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const mapStateToProps = (state) => {
formValues: getFormValues(FORM_NAME)(state) || Immutable.Map({}),
initialValues: {
publication: state.get('claimPublicationReducer').publicationToClaim,
author: state.get('currentAuthorReducer').currentAuthor
author: state.get('accountReducer').author
}
};
};
Expand Down

0 comments on commit 0ee092f

Please sign in to comment.