<commit_before>import PropTypes from 'prop-types';
import React from 'react';
import { injectIntl, FormattedMessage } from 'react-intl';
import { Grid, Row, Col } from 'react-flexbox-grid/lib';
import PageTitle from '../../common/PageTitle';
import AppButton from '../../common/AppButton';

const localMessages = {
  description: { id: 'topics.adminList.title', defaultMessage: 'To make changes to a Topic, you must create a new version. Pick what kind of change you want to make and then follows prompts to build a new version.' },
  createNewVersion: { id: 'topics.createNewVersion', defaultMessage: 'Create New Version' },
  createNewVersionDesc: { id: 'topics.createNewVersion.desc', defaultMessage: 'Change the search terms, dates, or media sources and collections. Once you save your changes, we start building a new version with stories that match your new seed query and follow new links to discover more stories.' },
  addNewSubtopics: { id: 'topics.addNewSubtopics', defaultMessage: 'Add New Subtopics' },
  addNewSubtopicsDesc: { id: 'topics.addNewSubtopics.desc', defaultMessage: 'Slice and dice your topic into subtopics to support comparative analysis. You can create subtopics with a growing list of techniques; allowing you to group stories by simple boolean queries, the country of focus, the themes included, and more.' },
};

const TopicNewVersionContainer = props => (
  <div className="topic-container">
    <Grid>
      <PageTitle value={localMessages.title} />
      <FormattedMessage {...localMessages.description} />
      <Row>
        <Col lg={6}>
          <h2><FormattedMessage {...localMessages.createNewVersion} /></h2>
          <FormattedMessage {...localMessages.createNewVersionDesc} />
          <AppButton
            label={props.intl.formatMessage(localMessages.createNewVersion)}
            primary
          />
        </Col>
        <Col lg={6}>
          <h2><FormattedMessage {...localMessages.addNewSubtopics} /></h2>
          <FormattedMessage {...localMessages.addNewSubtopicsDesc} />
          <AppButton
            label={props.intl.formatMessage(localMessages.addNewSubtopics)}
            primary
          />
        </Col>
      </Row>
    </Grid>
  </div>
);

TopicNewVersionContainer.propTypes = {
  // from state
  filters: PropTypes.object,
  topicInfo: PropTypes.object,
  formatMessage: PropTypes.object,
  // from context
  intl: PropTypes.object.isRequired,
};

export default
injectIntl(
  TopicNewVersionContainer
);<commit_msg>#1231 back to topic (for now until/unless we implement controlbar)<commit_after>import PropTypes from 'prop-types';
import React from 'react';
import { injectIntl, FormattedMessage } from 'react-intl';
import { Grid, Row, Col } from 'react-flexbox-grid/lib';
import PageTitle from '../../common/PageTitle';
import AppButton from '../../common/AppButton';
import BackLinkingControlBar from '../BackLinkingControlBar';
import messages from '../../../resources/messages';

const localMessages = {
  description: { id: 'topics.adminList.title', defaultMessage: 'To make changes to a Topic, you must create a new version. Pick what kind of change you want to make and then follows prompts to build a new version.' },
  createNewVersion: { id: 'topics.createNewVersion', defaultMessage: 'Create New Version' },
  createNewVersionDesc: { id: 'topics.createNewVersion.desc', defaultMessage: 'Change the search terms, dates, or media sources and collections. Once you save your changes, we start building a new version with stories that match your new seed query and follow new links to discover more stories.' },
  addNewSubtopics: { id: 'topics.addNewSubtopics', defaultMessage: 'Add New Subtopics' },
  addNewSubtopicsDesc: { id: 'topics.addNewSubtopics.desc', defaultMessage: 'Slice and dice your topic into subtopics to support comparative analysis. You can create subtopics with a growing list of techniques; allowing you to group stories by simple boolean queries, the country of focus, the themes included, and more.' },
};

const TopicNewVersionContainer = props => (
  <div className="topic-container">
    <BackLinkingControlBar message={messages.backToTopic} linkTo={`/topics/${props.topicId}/summary`} />
    <Grid>
      <PageTitle value={localMessages.title} />
      <FormattedMessage {...localMessages.description} />
      <Row>
        <Col lg={6}>
          <h2><FormattedMessage {...localMessages.createNewVersion} /></h2>
          <FormattedMessage {...localMessages.createNewVersionDesc} />
          <AppButton
            label={props.intl.formatMessage(localMessages.createNewVersion)}
            primary
          />
        </Col>
        <Col lg={6}>
          <h2><FormattedMessage {...localMessages.addNewSubtopics} /></h2>
          <FormattedMessage {...localMessages.addNewSubtopicsDesc} />
          <AppButton
            label={props.intl.formatMessage(localMessages.addNewSubtopics)}
            primary
          />
        </Col>
      </Row>
    </Grid>
  </div>
);

TopicNewVersionContainer.propTypes = {
  // from state
  filters: PropTypes.object,
  topicId: PropTypes.number,
  formatMessage: PropTypes.object,
  // from context
  intl: PropTypes.object.isRequired,
};

export default
injectIntl(
  TopicNewVersionContainer
);
{'fraction_non_alphanumeric': 0.11373145682769113, 'fraction_numerical': 0.0030429821224800305, 'mean_word_length': 3.5414507772020727, 'pattern_counts': {'":': 0, '<': 48, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1690198', 'n_tokens_mistral': 1440, 'n_tokens_neox': 1441, 'n_words': 448}