2017-08-31 17:05:22 -04:00
|
|
|
var classNames = require('classnames');
|
|
|
|
var FormattedMessage = require('react-intl').FormattedMessage;
|
|
|
|
var injectIntl = require('react-intl').injectIntl;
|
|
|
|
var React = require('react');
|
|
|
|
|
|
|
|
var SocialMessage = require('../../../components/social-message/social-message.jsx');
|
|
|
|
|
|
|
|
var CuratorInviteMessage = injectIntl(React.createClass({
|
|
|
|
type: 'CuratorInviteMessage',
|
|
|
|
propTypes: {
|
|
|
|
actorUsername: React.PropTypes.string.isRequired,
|
|
|
|
studioId: React.PropTypes.number.isRequired,
|
|
|
|
studioTitle: React.PropTypes.string.isRequired,
|
|
|
|
datetimePromoted: React.PropTypes.string.isRequired
|
|
|
|
},
|
|
|
|
render: function () {
|
|
|
|
var studioLink = '/studios/' + this.props.studioId + '/';
|
2017-09-05 12:38:16 -04:00
|
|
|
var tabLink = '/studios/' + this.props.studioId + '/curators/';
|
2017-08-31 17:05:22 -04:00
|
|
|
var actorLink = '/users/' + this.props.actorUsername + '/';
|
|
|
|
var tabText = this.props.intl.formatMessage({id: 'messages.curatorTabText'});
|
|
|
|
|
|
|
|
var classes = classNames(
|
|
|
|
'mod-curator-invite',
|
|
|
|
this.props.className
|
|
|
|
);
|
|
|
|
return (
|
|
|
|
<SocialMessage
|
|
|
|
className={classes}
|
|
|
|
datetime={this.props.datetimePromoted}
|
2017-09-08 14:10:46 -04:00
|
|
|
iconSrc="/svgs/messages/curator-invite.svg"
|
|
|
|
iconAlt="curator invite notification image"
|
2017-08-31 17:05:22 -04:00
|
|
|
>
|
|
|
|
<FormattedMessage
|
|
|
|
id='messages.curatorInviteText'
|
|
|
|
values={{
|
|
|
|
actorLink: <a
|
|
|
|
href={actorLink}
|
|
|
|
className="social-messages-profile-link"
|
|
|
|
>
|
|
|
|
{this.props.actorUsername}
|
|
|
|
</a>,
|
|
|
|
studioLink: <a href={studioLink}>{this.props.studioTitle}</a>,
|
2017-09-05 12:38:16 -04:00
|
|
|
tabLink: <a href={tabLink}>{tabText}</a>
|
2017-08-31 17:05:22 -04:00
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</SocialMessage>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}));
|
|
|
|
|
|
|
|
module.exports = CuratorInviteMessage;
|