'use strict';

import * as _ from 'lodash'
import * as React from 'react'
import * as humanize from 'humanize-plus'

import DraggableMixin from '../mixins/draggable'

var Course = React.createClass({
	render() {
		return React.DOM.article({className: 'course'},
			React.DOM.h1({className: 'title'}, this.props.info.title),
			React.DOM.span({className: 'details'},
				React.DOM.span({className: 'identifier'},
					React.DOM.span({className: 'department'}, this.props.info.depts.join('/')),
					' ',
					React.DOM.span({className: 'number'}, this.props.info.num),
					this.props.info.sect ? React.DOM.span({className: 'section'}, this.props.info.sect) : ''
				),
				React.DOM.span({className: 'professors'}, humanize.oxford(this.props.info.profs))
			)
		)
	}
})

export default Course

@@ -114,111 +114,164 @@
 s'%0A%0A
-import DraggableMixin from '../mixins/draggable'%0A%0Avar Course = React.createClass(%7B%0A%09render() %7B%0A%09%09return
+var Course = React.createClass(%7B%0A%09render() %7B%0A%09%09let title = this.props.info.type === 'Topic' ? this.props.info.name : this.props.info.title;%0A%0A%09%09let summary =
  Rea
@@ -308,16 +308,60 @@
 urse'%7D,%0A
+%09%09%09React.DOM.div(%7BclassName: 'info-rows'%7D,%0A%09
 %09%09%09React
@@ -394,32 +394,16 @@
 '%7D, 
-this.props.info.
 title),%0A
 %09%09%09R
@@ -398,16 +398,17 @@
 title),%0A
+%09
 %09%09%09React
@@ -437,24 +437,25 @@
 'details'%7D,%0A
+%09
 %09%09%09%09React.DO
@@ -485,32 +485,33 @@
 ntifier'%7D,%0A%09%09%09%09%09
+%09
 React.DOM.span(%7B
@@ -560,27 +560,16 @@
 dept
-s.join('/')
 ),%0A%09%09%09%09%09
 ' ',
@@ -568,18 +568,14 @@
 %09%09%09%09
+%09
 ' ',
-%0A%09%09%09%09%09
+ 
 Reac
@@ -635,16 +635,17 @@
 ),%0A%09%09%09%09%09
+%09
 this.pro
@@ -658,17 +658,24 @@
 o.sect ?
- 
+%0A%09%09%09%09%09%09%09
 React.DO
@@ -732,19 +732,22 @@
 t) :
- ''%0A
+%0A%09%09%09
 %09%09%09%09
+''
 ),%0A
+%09
 %09%09%09%09
@@ -831,17 +831,93 @@
 fs))
+)
 %0A%09%09%09)
-%0A%09%09)
+,%0A%09%09%09React.DOM.div(%7B%0A%09%09%09%09className: 'info-button',%0A%09%09%09%7D)%0A%09%09)%0A%0A%09%09return summary;
 %0A%09%7D%0A

Add an info button to Course