mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
edition_index + default license
This commit is contained in:
parent
eb947e68aa
commit
5f372eedda
@ -1,28 +1,38 @@
|
||||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import Router from 'react-router';
|
||||
|
||||
import requests from '../../utils/requests';
|
||||
|
||||
import { getLangText } from '../../utils/lang_utils';
|
||||
|
||||
let AccordionListItem = React.createClass({
|
||||
mixins: [Router.Navigation],
|
||||
|
||||
propTypes: {
|
||||
className: React.PropTypes.string,
|
||||
content: React.PropTypes.object,
|
||||
children: React.PropTypes.object
|
||||
},
|
||||
handleClick(event){
|
||||
requests.get('piece_first_edition_id', {'piece_id': this.props.content.id})
|
||||
.then((res) => this.transitionTo('edition', {editionId: res.bitcoin_id}));
|
||||
|
||||
console.log(event.target);
|
||||
},
|
||||
render() {
|
||||
return (
|
||||
<div className="row">
|
||||
<div className={this.props.className}>
|
||||
<div className="wrapper">
|
||||
<div className="col-xs-4 col-sm-3 col-md-2 col-lg-2 clear-paddings">
|
||||
<div className="thumbnail-wrapper">
|
||||
<div className="thumbnail-wrapper" onClick={this.handleClick}>
|
||||
<img src={this.props.content.thumbnail} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-xs-8 col-sm-9 col-md-9 col-lg-9 col-md-offset-1 col-lg-offset-1 accordion-list-item-header">
|
||||
<h1>{this.props.content.title}</h1>
|
||||
<h1 onClick={this.handleClick}>{this.props.content.title}</h1>
|
||||
<h3>{getLangText('by %s', this.props.content.artist_name)}</h3>
|
||||
<div>
|
||||
<span>{this.props.content.date_created.split('-')[0]}</span>
|
||||
|
@ -31,6 +31,7 @@ let apiUrls = {
|
||||
'ownership_unconsigns_request': AppConstants.apiEndpoint + 'ownership/unconsigns/request/',
|
||||
'piece': AppConstants.apiEndpoint + 'pieces/${piece_id}',
|
||||
'piece_extradata': AppConstants.apiEndpoint + 'pieces/${piece_id}/extradata/',
|
||||
'piece_first_edition_id': AppConstants.apiEndpoint + 'pieces/${piece_id}/edition_index/',
|
||||
'pieces_list': AppConstants.apiEndpoint + 'pieces/',
|
||||
'user': AppConstants.apiEndpoint + 'users/',
|
||||
'users_login': AppConstants.apiEndpoint + 'users/login/',
|
||||
|
@ -24,6 +24,7 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
padding:0;
|
||||
cursor: pointer;
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
@ -38,6 +39,7 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
|
||||
h1 {
|
||||
margin-top: .3em;
|
||||
font-size: 2.25em;
|
||||
cursor: pointer;
|
||||
}
|
||||
h3 {
|
||||
font-size: 1.1em;
|
||||
|
Loading…
Reference in New Issue
Block a user