1
0
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:
Tim Daubenschütz 2015-10-27 10:59:29 +01:00
commit dc813f2687
8 changed files with 8 additions and 8 deletions

View File

@ -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={

View File

@ -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

View File

@ -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>

View File

@ -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()}>

View File

@ -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/>

View File

@ -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>
}

View File

@ -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}

View File

@ -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}