mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
Merge pull request #4 from ascribe/AD-1075-year-before-1000-starts-with-0
Fix correct year extraction from date-string in edition and piece detail
This commit is contained in:
commit
dc813f2687
@ -129,7 +129,7 @@ let AccordionListItemWallet = React.createClass({
|
||||
piece={this.props.content}
|
||||
subsubheading={
|
||||
<div className="pull-left">
|
||||
<span>{this.props.content.date_created.split('-')[0]}</span>
|
||||
<span>{new Date(this.props.content.date_created).getFullYear()}</span>
|
||||
{this.getLicences()}
|
||||
</div>}
|
||||
buttons={
|
||||
|
@ -85,7 +85,7 @@ let Edition = React.createClass({
|
||||
<hr style={{marginTop: 0}}/>
|
||||
<h1 className="ascribe-detail-title">{this.props.edition.title}</h1>
|
||||
<EditionDetailProperty label="BY" value={this.props.edition.artist_name} />
|
||||
<EditionDetailProperty label="DATE" value={ this.props.edition.date_created.slice(0, 4) } />
|
||||
<EditionDetailProperty label="DATE" value={ new Date(this.props.edition.date_created).getFullYear() } />
|
||||
<hr/>
|
||||
</div>
|
||||
<EditionSummary
|
||||
|
@ -234,7 +234,7 @@ let PieceContainer = React.createClass({
|
||||
<hr style={{marginTop: 0}}/>
|
||||
<h1 className="ascribe-detail-title">{this.state.piece.title}</h1>
|
||||
<DetailProperty label="BY" value={this.state.piece.artist_name} />
|
||||
<DetailProperty label="DATE" value={ this.state.piece.date_created.slice(0, 4) } />
|
||||
<DetailProperty label="DATE" value={ new Date(this.state.piece.date_created).getFullYear() } />
|
||||
{this.state.piece.num_editions > 0 ? <DetailProperty label="EDITIONS" value={ this.state.piece.num_editions } /> : null}
|
||||
<hr/>
|
||||
</div>
|
||||
|
@ -182,7 +182,7 @@ let AccordionListItemPrize = React.createClass({
|
||||
artistName={artistName}
|
||||
subsubheading={
|
||||
<div>
|
||||
<span>{this.props.content.date_created.split('-')[0]}</span>
|
||||
<span>{new Date(this.props.content.date_created).getFullYear()}</span>
|
||||
</div>}
|
||||
buttons={this.getPrizeButtons()}
|
||||
badge={this.getPrizeBadge()}>
|
||||
|
@ -141,7 +141,7 @@ let PieceContainer = React.createClass({
|
||||
<hr/>
|
||||
<h1 className="ascribe-detail-title">{this.state.piece.title}</h1>
|
||||
<DetailProperty label={getLangText('BY')} value={artistName} />
|
||||
<DetailProperty label={getLangText('DATE')} value={ this.state.piece.date_created.slice(0, 4) } />
|
||||
<DetailProperty label={getLangText('DATE')} value={new Date(this.state.piece.date_created).getFullYear()} />
|
||||
{artistEmail}
|
||||
{this.getActions()}
|
||||
<hr/>
|
||||
|
@ -39,7 +39,7 @@ let WalletPieceContainer = React.createClass({
|
||||
<hr style={{marginTop: 0}}/>
|
||||
<h1 className="ascribe-detail-title">{this.props.piece.title}</h1>
|
||||
<DetailProperty label="BY" value={this.props.piece.artist_name} />
|
||||
<DetailProperty label="DATE" value={ this.props.piece.date_created.slice(0, 4) } />
|
||||
<DetailProperty label="DATE" value={new Date(this.props.piece.date_created).getFullYear()} />
|
||||
<hr/>
|
||||
</div>
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ let CylandAccordionListItem = React.createClass({
|
||||
piece={this.props.content}
|
||||
subsubheading={
|
||||
<div className="pull-left">
|
||||
<span>{this.props.content.date_created.split('-')[0]}</span>
|
||||
<span>{new Date(this.props.content.date_created).getFullYear()}</span>
|
||||
</div>}
|
||||
buttons={this.getSubmitButtons()}>
|
||||
{this.props.children}
|
||||
|
@ -106,7 +106,7 @@ let IkonotvAccordionListItem = React.createClass({
|
||||
piece={this.props.content}
|
||||
subsubheading={
|
||||
<div className="pull-left">
|
||||
<span>{this.props.content.date_created.split('-')[0]}</span>
|
||||
<span>{new Date(this.props.content.date_created).getFullYear()}</span>
|
||||
</div>}
|
||||
buttons={this.getSubmitButtons()}>
|
||||
{this.props.children}
|
||||
|
Loading…
Reference in New Issue
Block a user