mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Add document title for prize
This commit is contained in:
parent
66dbf3da71
commit
84d2dd7701
@ -40,6 +40,7 @@ import DetailProperty from '../../../../ascribe_detail/detail_property';
|
|||||||
import ApiUrls from '../../../../../constants/api_urls';
|
import ApiUrls from '../../../../../constants/api_urls';
|
||||||
import { mergeOptions } from '../../../../../utils/general_utils';
|
import { mergeOptions } from '../../../../../utils/general_utils';
|
||||||
import { getLangText } from '../../../../../utils/lang_utils';
|
import { getLangText } from '../../../../../utils/lang_utils';
|
||||||
|
import { setDocumentTitle } from '../../../../../utils/dom_utils';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -112,12 +113,22 @@ let PieceContainer = React.createClass({
|
|||||||
// Only show the artist name if you are the participant or if you are a judge and the piece is shortlisted
|
// Only show the artist name if you are the participant or if you are a judge and the piece is shortlisted
|
||||||
let artistName = ((this.state.currentUser.is_jury && !this.state.currentUser.is_judge) ||
|
let artistName = ((this.state.currentUser.is_jury && !this.state.currentUser.is_judge) ||
|
||||||
(this.state.currentUser.is_judge && !this.state.piece.selected )) ?
|
(this.state.currentUser.is_judge && !this.state.piece.selected )) ?
|
||||||
<span className="glyphicon glyphicon-eye-close" aria-hidden="true"/> : this.state.piece.artist_name;
|
null : this.state.piece.artist_name;
|
||||||
|
|
||||||
// Only show the artist email if you are a judge and the piece is shortlisted
|
// Only show the artist email if you are a judge and the piece is shortlisted
|
||||||
let artistEmail = (this.state.currentUser.is_judge && this.state.piece.selected ) ?
|
let artistEmail = (this.state.currentUser.is_judge && this.state.piece.selected ) ?
|
||||||
<DetailProperty label={getLangText('REGISTREE')} value={ this.state.piece.user_registered } /> : null;
|
<DetailProperty label={getLangText('REGISTREE')} value={ this.state.piece.user_registered } /> : null;
|
||||||
|
|
||||||
|
if (artistName === null) {
|
||||||
|
setDocumentTitle(this.state.piece.title);
|
||||||
|
} else {
|
||||||
|
setDocumentTitle([artistName, this.state.piece.title].join(', '));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (artistName === null) {
|
||||||
|
artistName = <span className="glyphicon glyphicon-eye-close" aria-hidden="true"/>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Piece
|
<Piece
|
||||||
piece={this.state.piece}
|
piece={this.state.piece}
|
||||||
|
@ -6,6 +6,7 @@ import { Link } from 'react-router';
|
|||||||
import LoginForm from '../../../ascribe_forms/form_login';
|
import LoginForm from '../../../ascribe_forms/form_login';
|
||||||
|
|
||||||
import { getLangText } from '../../../../utils/lang_utils';
|
import { getLangText } from '../../../../utils/lang_utils';
|
||||||
|
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||||
|
|
||||||
|
|
||||||
let LoginContainer = React.createClass({
|
let LoginContainer = React.createClass({
|
||||||
@ -14,6 +15,8 @@ let LoginContainer = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
setDocumentTitle(getLangText('Log in'));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ascribe-login-wrapper">
|
<div className="ascribe-login-wrapper">
|
||||||
<LoginForm
|
<LoginForm
|
||||||
|
@ -17,6 +17,7 @@ import AccordionListItemPrize from './ascribe_accordion_list/accordion_list_item
|
|||||||
|
|
||||||
import { mergeOptions } from '../../../../utils/general_utils';
|
import { mergeOptions } from '../../../../utils/general_utils';
|
||||||
import { getLangText } from '../../../../utils/lang_utils';
|
import { getLangText } from '../../../../utils/lang_utils';
|
||||||
|
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||||
|
|
||||||
let PrizePieceList = React.createClass({
|
let PrizePieceList = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
@ -63,6 +64,8 @@ let PrizePieceList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
setDocumentTitle(getLangText('Collection'));
|
||||||
|
|
||||||
let orderParams = ['artist_name', 'title'];
|
let orderParams = ['artist_name', 'title'];
|
||||||
if (this.state.currentUser.is_jury) {
|
if (this.state.currentUser.is_jury) {
|
||||||
orderParams = ['rating', 'title'];
|
orderParams = ['rating', 'title'];
|
||||||
|
@ -11,6 +11,7 @@ import InputTextAreaToggable from '../../../ascribe_forms/input_textarea_toggabl
|
|||||||
import InputCheckbox from '../../../ascribe_forms/input_checkbox';
|
import InputCheckbox from '../../../ascribe_forms/input_checkbox';
|
||||||
|
|
||||||
import { getLangText } from '../../../../utils/lang_utils';
|
import { getLangText } from '../../../../utils/lang_utils';
|
||||||
|
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||||
|
|
||||||
|
|
||||||
let PrizeRegisterPiece = React.createClass({
|
let PrizeRegisterPiece = React.createClass({
|
||||||
@ -32,6 +33,8 @@ let PrizeRegisterPiece = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
setDocumentTitle(getLangText('Submit to the prize'));
|
||||||
|
|
||||||
if(this.state.prize && this.state.prize.active){
|
if(this.state.prize && this.state.prize.active){
|
||||||
return (
|
return (
|
||||||
<RegisterPiece
|
<RegisterPiece
|
||||||
|
@ -24,6 +24,7 @@ import AppConstants from '../../../../constants/application_constants';
|
|||||||
import ApiUrls from '../../../../constants/api_urls';
|
import ApiUrls from '../../../../constants/api_urls';
|
||||||
|
|
||||||
import { getLangText } from '../../../../utils/lang_utils';
|
import { getLangText } from '../../../../utils/lang_utils';
|
||||||
|
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||||
|
|
||||||
|
|
||||||
let Settings = React.createClass({
|
let Settings = React.createClass({
|
||||||
@ -45,6 +46,8 @@ let Settings = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
setDocumentTitle(getLangText('Account settings'));
|
||||||
|
|
||||||
let prizeSettings = null;
|
let prizeSettings = null;
|
||||||
if (this.state.currentUser.is_admin){
|
if (this.state.currentUser.is_admin){
|
||||||
prizeSettings = <PrizeSettings />;
|
prizeSettings = <PrizeSettings />;
|
||||||
|
@ -4,6 +4,7 @@ import React from 'react';
|
|||||||
import SignupForm from '../../../ascribe_forms/form_signup';
|
import SignupForm from '../../../ascribe_forms/form_signup';
|
||||||
|
|
||||||
import { getLangText } from '../../../../utils/lang_utils';
|
import { getLangText } from '../../../../utils/lang_utils';
|
||||||
|
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||||
|
|
||||||
let SignupContainer = React.createClass({
|
let SignupContainer = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
@ -25,6 +26,8 @@ let SignupContainer = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
setDocumentTitle(getLangText('Sign up'));
|
||||||
|
|
||||||
if (this.state.submitted){
|
if (this.state.submitted){
|
||||||
return (
|
return (
|
||||||
<div className="ascribe-login-wrapper">
|
<div className="ascribe-login-wrapper">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user