1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 05:31:58 +02:00

Set title to edition/piece containers

This commit is contained in:
vrde 2015-10-13 17:52:45 +02:00
parent 21c84774c8
commit 2967a29f2e
2 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,8 @@ import Edition from './edition';
import AppConstants from '../../constants/application_constants';
import { setDocumentTitle } from '../../utils/dom_utils';
/**
* This is the component that implements resource/data specific functionality
@ -65,6 +67,8 @@ let EditionContainer = React.createClass({
render() {
if(this.state.edition && this.state.edition.title) {
setDocumentTitle([this.state.edition.artist_name, this.state.edition.title].join(', '));
return (
<Edition
edition={this.state.edition}

View File

@ -38,6 +38,7 @@ import ApiUrls from '../../constants/api_urls';
import AppConstants from '../../constants/application_constants';
import { mergeOptions } from '../../utils/general_utils';
import { getLangText } from '../../utils/lang_utils';
import { setDocumentTitle } from '../../utils/dom_utils';
/**
* This is the component that implements resource/data specific functionality
@ -210,6 +211,8 @@ let PieceContainer = React.createClass({
render() {
if(this.state.piece && this.state.piece.title) {
setDocumentTitle([this.state.piece.artist_name, this.state.piece.title].join(', '));
return (
<Piece
piece={this.state.piece}