Changeset 5024 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/developers/index.jsx
- Timestamp:
- 03/01/2017 06:08:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/developers/index.jsx
r4464 r5024 1 import React from 'react'; 1 /** 2 * External dependencies. 3 */ 4 import React, { PropTypes } from 'react'; 5 import { connect } from 'react-redux'; 6 import { identity } from 'lodash'; 7 import { localize } from 'i18n-calypso'; 2 8 9 /** 10 * Internal dependencies. 11 */ 3 12 import DeveloperList from './list'; 13 import { getPlugin } from 'state/selectors'; 4 14 5 export default React.createClass( { 6 displayName: 'Developers', 15 export const Developers = ( { plugin, translate } ) => ( 16 <div> 17 <div id="developers" className="section read-more plugin-developers"> 18 <h2>{ translate( 'Contributors & Developers' ) }</h2> 19 <p> 20 { translate( 'This is open source software. The following people have contributed to this plugin.' ) } 21 </p> 22 <DeveloperList contributors={ plugin.contributors } /> 7 23 8 render() { 9 return ( 10 <div> 11 <div id="developers" className="read-more"> 12 <h2>Contributors & Developers</h2> 13 <p>This is open source software. The following people have contributed to this plugin.</p> 14 <DeveloperList contributors={ this.props.contributors } /> 24 <h5>{ translate( 'Interested in development?' ) }</h5> 25 <p> 26 { 27 /* eslint-disable max-len */ 28 translate( '{{code}}Browse the code{{/code}} or subscribe to the {{log}}development log{{/log}} by {{rss}}RSS{{/rss}}.', { 29 components: { 30 code: <a href={ `https://plugins.svn.wordpress.org/${ plugin.slug }/` } rel="nofollow" />, 31 log: <a href={ `https://plugins.trac.wordpress.org/log/${ plugin.slug }/` } rel="nofollow" />, 32 rss: <a href={ `https://plugins.trac.wordpress.org/log/${ plugin.slug }/?limit=100&mode=stop_on_copy&format=rss` } rel="nofollow" />, 33 }, 34 } ) 35 /* eslint-enable max-len */ 36 } 37 </p> 38 </div> 39 <button type="button" className="button-link section-toggle" aria-controls="developers" aria-expanded="false"> 40 { translate( 'Read more' ) } 41 </button> 42 </div> 43 ); 15 44 16 <h5>Interested in development?</h5> 17 <p><a href={ `https://plugins.svn.wordpress.org/${ this.props.slug }/` } rel="nofollow">Browse the code</a> or subscribe to the <a href={ `https://plugins.trac.wordpress.org/log/${ this.props.slug }/` } rel="nofollow">development log</a> by <a href={ `https://plugins.trac.wordpress.org/log/${ this.props.slug }/?limit=100&mode=stop_on_copy&format=rss` } rel="nofollow">RSS</a>.</p> 18 </div> 19 <button type="button" className="button-link section-toggle" aria-controls="developers" aria-expanded="false">Read more</button> 20 </div> 21 ) 22 } 23 } ); 45 Developers.propTypes = { 46 plugin: PropTypes.object, 47 translate: PropTypes.func, 48 }; 49 50 Developers.defaultProps = { 51 plugin: {}, 52 translate: identity, 53 }; 54 55 export default connect( 56 ( state ) => ( { 57 plugin: getPlugin( state ), 58 } ), 59 )( localize( Developers ) );
Note: See TracChangeset
for help on using the changeset viewer.