Skip to content

Instantly share code, notes, and snippets.

@MonkeyDo
Last active February 12, 2019 21:01
Show Gist options
  • Select an option

  • Save MonkeyDo/09a9aa6a29f4208ffaeb8a99750ae7fb to your computer and use it in GitHub Desktop.

Select an option

Save MonkeyDo/09a9aa6a29f4208ffaeb8a99750ae7fb to your computer and use it in GitHub Desktop.

Revisions

  1. MonkeyDo revised this gist Feb 12, 2019. 1 changed file with 54 additions and 19 deletions.
    73 changes: 54 additions & 19 deletions missing works
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,54 @@
    <span className="margin-right-3 pull-left">
    <Button
    bsStyle="success"
    href={`/work/create?${
    entity.type.toLowerCase()}=${entity.bbid}`}
    >
    <Icon className="margin-bottom-d4 margin-top-d4" name="pen-nib" size="2x"/>
    <br/>
    Add Work
    </Button>
    </span>
    <span>
    <h3>There are no Works yet!</h3>
    <p>
    Help us complete BookBrainz
    <br/>
    <br/><small>Not sure what to do? Visit the <a href="/help">help page</a> to get started.</small>
    </p>
    </span>
    <div>
    <h2>Works</h2>
    {
    entity.works.length ?
    <React.Fragment>
    <Table striped>
    <thead>
    <tr>
    <th>Name</th>
    <th>Type</th>
    </tr>
    </thead>
    <tbody>
    {
    entity.works.map((work) => (
    <WorkTableRow
    key={work.bbid}
    work={work}
    />
    ))}
    </tbody>
    </Table>
    <Button
    bsStyle="success"
    className="margin-top-d15"
    href={`/work/create?${
    entity.type.toLowerCase()}=${entity.bbid}`}
    >
    <Icon className="margin-right-0-5" name="plus"/>Add Work
    </Button>
    </React.Fragment> :
    <React.Fragment>
    <span className="margin-right-2 pull-left">
    <Button
    bsStyle="success"
    href={`/work/create?${
    entity.type.toLowerCase()}=${entity.bbid}`}
    >
    <Icon name="pen-nib" size="2x"/>
    <br/>
    Add Work
    </Button>
    </span>
    <span>
    <h4>There are no Works yet!</h4>
    <p>
    Help us complete BookBrainz
    <br/>
    </p>
    <br/><small>Not sure what to do? Visit the <a href="/help">help page</a> to get started.</small>
    </span>
    </React.Fragment>
    }
    </div>
  2. MonkeyDo revised this gist Feb 12, 2019. 1 changed file with 14 additions and 8 deletions.
    22 changes: 14 additions & 8 deletions missing works
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,19 @@
    <h3>There are no Works yet!</h3>
    <p>
    Help us complete BookBrainz
    <Button
    <span className="margin-right-3 pull-left">
    <Button
    bsStyle="success"
    className="margin-top-d15"
    href={`/work/create?${
    entity.type.toLowerCase()}=${entity.bbid}`}
    >
    <Icon className="margin-right-0-5" name="plus"/>Add Work
    <Icon className="margin-bottom-d4 margin-top-d4" name="pen-nib" size="2x"/>
    <br/>
    Add Work
    </Button>
    <br/><small>Not sure what to do? Visit the <a href="/help">help page</a> to get started.</small>
    </p>
    </span>
    <span>
    <h3>There are no Works yet!</h3>
    <p>
    Help us complete BookBrainz
    <br/>
    <br/><small>Not sure what to do? Visit the <a href="/help">help page</a> to get started.</small>
    </p>
    </span>
  3. MonkeyDo created this gist Feb 12, 2019.
    13 changes: 13 additions & 0 deletions missing works
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <h3>There are no Works yet!</h3>
    <p>
    Help us complete BookBrainz
    <Button
    bsStyle="success"
    className="margin-top-d15"
    href={`/work/create?${
    entity.type.toLowerCase()}=${entity.bbid}`}
    >
    <Icon className="margin-right-0-5" name="plus"/>Add Work
    </Button>
    <br/><small>Not sure what to do? Visit the <a href="/help">help page</a> to get started.</small>
    </p>