Adjust style of the tournament information view

This commit is contained in:
Jonny 2019-05-03 01:07:50 +02:00 committed by JP1998
parent 9fc909e257
commit a38624fd5b
1 changed files with 29 additions and 39 deletions

View File

@ -6,7 +6,8 @@ import {
Col, Col,
Container, Container,
ListGroup, ListGroup,
ListGroupItem ListGroupItem,
Row
} from 'reactstrap'; } from 'reactstrap';
@ -17,22 +18,27 @@ class PrivateTournamentInformationView extends React.Component {
return ( return (
<Container> <Container>
<Row>
<ButtonsBadge <Col xs="6">
id={tournament.id} <ButtonsBadge
ownerName={tournament.owner_username} id={tournament.id}
isSignedIn={isSignedIn} ownerName={tournament.owner_username}
username={username} isSignedIn={isSignedIn}
currentpage={currentpage}/> username={username}
currentpage={currentpage}
<p>{tournament.description}</p> className="pb-3"/>
<ListGroup> <p>{tournament.description}</p>
<ListGroupItem> </Col>
{tournament.isPublic ? 'Das Turnier ist öffentlich.' : 'Das Turnier ist privat.'} <Col xs="6">
</ListGroupItem> <ListGroup>
<ListGroupItem>Turnier-Code: <b>{tournament.code}</b></ListGroupItem> <ListGroupItem>
<ListGroupItem>von <b>{tournament.owner_username}</b></ListGroupItem> {tournament.isPublic ? 'Das Turnier ist öffentlich.' : 'Das Turnier ist privat.'}
</ListGroup> </ListGroupItem>
<ListGroupItem>Turnier-Code: <b>{tournament.code}</b></ListGroupItem>
<ListGroupItem>von <b>{tournament.owner_username}</b></ListGroupItem>
</ListGroup>
</Col>
</Row>
</Container> </Container>
); );
} }
@ -53,21 +59,21 @@ function ButtonsBadge(props) {
switch(currentpage) { switch(currentpage) {
case 'statistics': case 'statistics':
return ( return (
<ButtonGroup> <ButtonGroup className={props.className}>
<EditButton id={id} ownerName={ownerName} isSignedIn={isSignedIn} username={username}/> <EditButton id={id} ownerName={ownerName} isSignedIn={isSignedIn} username={username}/>
<TournamentButton id={id}/> <TournamentButton id={id}/>
</ButtonGroup> </ButtonGroup>
); );
case 'tournament': case 'tournament':
return ( return (
<ButtonGroup> <ButtonGroup className={props.className}>
<EditButton id={id} ownerName={ownerName} isSignedIn={isSignedIn} username={username}/> <EditButton id={id} ownerName={ownerName} isSignedIn={isSignedIn} username={username}/>
<StatisticsButton id={id}/> <StatisticsButton id={id}/>
</ButtonGroup> </ButtonGroup>
); );
case 'edit': case 'edit':
return ( return (
<ButtonGroup> <ButtonGroup className={props.className}>
<StatisticsButton id={id}/> <StatisticsButton id={id}/>
<TournamentButton id={id}/> <TournamentButton id={id}/>
</ButtonGroup> </ButtonGroup>
@ -78,7 +84,7 @@ function ButtonsBadge(props) {
function TournamentButton(props) { function TournamentButton(props) {
const { id } = props; const { id } = props;
return <Button href={'/t/' + id} color='secondary'>Zum Turnier</Button>; return <Button href={'/t/' + id} color='success'>Zum Turnier</Button>;
} }
function EditButton(props) { function EditButton(props) {
@ -86,7 +92,7 @@ function EditButton(props) {
if(isSignedIn && ownerName === username) { if(isSignedIn && ownerName === username) {
return ( return (
<Button href={'/t/' + id + '/edit'} color='secondary'>Turnier bearbeiten</Button> <Button href={'/t/' + id + '/edit'} color='success'>Turnier bearbeiten</Button>
); );
} else { } else {
return null; return null;
@ -95,22 +101,6 @@ function EditButton(props) {
function StatisticsButton(props) { function StatisticsButton(props) {
const { id } = props; const { id } = props;
return <Button href={'/t/' + id + '/statistics'} color='secondary'>Statistiken zum Turnier</Button>; return <Button href={'/t/' + id + '/statistics'} color='success'>Statistiken zum Turnier</Button>;
} }
/*
<Container>
<ButtonsBadge id={id} ownerName={ownerUsername} isSignedIn={isSignedIn} username={username}/>
<p>{description}</p>
<ListGroup>
<ListGroupItem>
{isPublic ? 'Das Turnier ist öffentlich.' : 'Das Turnier ist privat.'}
</ListGroupItem>
<ListGroupItem>Turnier-Code: <b>{code}</b></ListGroupItem>
<ListGroupItem>von <b>{ownerUsername}</b></ListGroupItem>
</ListGroup>
</Container>
*/