<commit_before>/** @jsx React.DOM */
"use strict";

var React = require("react");
var _ = require("underscore");
var HelpIcon = require("../widgets/help_icon.jsx");

module.exports = React.createClass({

	getDefaultProps: function () {
		return {
			data: [] // * []
		};
	},

	render: function () {
		var _infoText = 'List of references used specifically on this page as citations for information in the Overview (e.g. gene names, aliases, Descriptions), Summary Paragraph, or History sections. The complete list of curated references associated with this locus can be found by clicking on the "Literature" tab for this locus.';

		var listNode = this._getListNode();
		return (<div>
	        <h2>
	        	References <HelpIcon text={_infoText} isInfo={true} /> <span className="label secondary round">{this.props.data.length}</span>
	        </h2>
	        <hr />
	        {listNode}
		</div>);
	},

	_getListNode: function () {
		var itemNodes = _.map(this.props.data, r => {
			var _text = r.citation.replace(r.display_name, "");
			var refNodes = _.map(r.urls, ref => {
				return <li><a href={ref.link}>{ref.display_name}</a></li>;
			});
			refNodes.unshift(<li><a href={r.link}>SGD Paper</a></li>)
			return (<li className="reference-list-item">
				<a href={r.link}>{r.display_name}</a> {_text} <small>PMID: {r.pubmed_id}</small>
				<ul className="ref-links">
					{refNodes}
				</ul>
			</li>);<commit_msg>ref list, don't show PMID if no PMID<commit_after>/** @jsx React.DOM */
"use strict";

var React = require("react");
var _ = require("underscore");
var HelpIcon = require("../widgets/help_icon.jsx");

module.exports = React.createClass({

	getDefaultProps: function () {
		return {
			data: [] // * []
		};
	},

	render: function () {
		var _infoText = 'List of references used specifically on this page as citations for information in the Overview (e.g. gene names, aliases, Descriptions), Summary Paragraph, or History sections. The complete list of curated references associated with this locus can be found by clicking on the "Literature" tab for this locus.';

		var listNode = this._getListNode();
		return (<div>
	        <h2>
	        	References <HelpIcon text={_infoText} isInfo={true} /> <span className="label secondary round">{this.props.data.length}</span>
	        </h2>
	        <hr />
	        {listNode}
		</div>);
	},

	_getListNode: function () {
		var itemNodes = _.map(this.props.data, r => {
			var _text = r.citation.replace(r.display_name, "");
			var refNodes = _.map(r.urls, ref => {
				return <li><a href={ref.link}>{ref.display_name}</a></li>;
			});
			refNodes.unshift(<li><a href={r.link}>SGD Paper</a></li>)
			var pubmedNode = r.pubmed_id ? <small>PMID: {r.pubmed_id}</small> : null;
			return (<li className="reference-list-item">
				<a href={r.link}>{r.display_name}</a> {_text} {pubmedNode}
				<ul className="ref-links">
					{refNodes}
				</ul>
			</li>);
{'fraction_non_alphanumeric': 0.16838134430727023, 'fraction_numerical': 0.0013717421124828531, 'mean_word_length': 3.473926380368098, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 55, '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': '4435452', 'n_tokens_mistral': 1063, 'n_tokens_neox': 949, 'n_words': 251}