Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
119 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* @flow | ||
* Copyright (C) 2019 MetaBrainz Foundation | ||
* | ||
* This file is part of MusicBrainz, the open internet music database, | ||
* and is licensed under the GPL version 2, or (at your option) any | ||
* later version: http://www.gnu.org/licenses/gpl-2.0.txt | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import Relationships from '../components/Relationships'; | ||
import RelationshipsTable from '../components/RelationshipsTable'; | ||
import EntityLink from '../static/scripts/common/components/EntityLink'; | ||
|
||
import ArtistLayout from './ArtistLayout'; | ||
|
||
const ArtistRelationships = ({artist}: {artist: ArtistT}) => ( | ||
<ArtistLayout entity={artist} page="relationships" title={l('Relationships')}> | ||
{artist.relationships && artist.relationships.length > 0 ? ( | ||
<Relationships source={artist} /> | ||
) : ( | ||
<> | ||
<h2 className="relationships">{l('Relationships')}</h2> | ||
<p>{exp.l('{link} has no relationships.', {link: <EntityLink entity={artist} />})}</p> | ||
</> | ||
)} | ||
<RelationshipsTable entity={artist} heading={l('Appearances')} showCredits /> | ||
</ArtistLayout> | ||
); | ||
|
||
export default ArtistRelationships; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* @flow | ||
* Copyright (C) 2019 MetaBrainz Foundation | ||
* | ||
* This file is part of MusicBrainz, the open internet music database, | ||
* and is licensed under the GPL version 2, or (at your option) any | ||
* later version: http://www.gnu.org/licenses/gpl-2.0.txt | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import {withCatalystContext} from '../context'; | ||
import WorkList from '../components/list/WorkList'; | ||
import PaginatedResults from '../components/PaginatedResults'; | ||
|
||
import ArtistLayout from './ArtistLayout'; | ||
|
||
type Props = {| | ||
+$c: CatalystContextT, | ||
+artist: ArtistT, | ||
+pager: PagerT, | ||
+works: $ReadOnlyArray<WorkT>, | ||
|}; | ||
|
||
const ArtistWorks = ({ | ||
$c, | ||
artist, | ||
pager, | ||
works, | ||
}: Props) => ( | ||
<ArtistLayout entity={artist} page="works" title={l('Works')}> | ||
<h2>{l('Works')}</h2> | ||
|
||
{works && works.length > 0 ? ( | ||
<form action="/work/merge_queue" method="post"> | ||
<PaginatedResults pager={pager}> | ||
<WorkList | ||
checkboxes="add-to-merge" | ||
showRatings | ||
works={works} | ||
/> | ||
</PaginatedResults> | ||
{$c.user_exists ? ( | ||
<div className="row"> | ||
<span className="buttons"> | ||
<button type="submit"> | ||
{l('Add selected works for merging')} | ||
</button> | ||
</span> | ||
</div> | ||
) : null} | ||
</form> | ||
) : ( | ||
<p> | ||
{l('This artist is not currently associated with any works.')} | ||
</p> | ||
)} | ||
</ArtistLayout> | ||
); | ||
|
||
export default withCatalystContext(ArtistWorks); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters