diff --git a/client/less/jobs.less b/client/less/jobs.less new file mode 100644 index 0000000000..428855e97e --- /dev/null +++ b/client/less/jobs.less @@ -0,0 +1,7 @@ +.jobs-list-highlight { + background-color: #ffc +} + +a.jobs-list-highlight:hover { + background-color: #ffc +} diff --git a/client/less/main.less b/client/less/main.less index aa70867894..b24a4a35b7 100644 --- a/client/less/main.less +++ b/client/less/main.less @@ -955,11 +955,12 @@ code { margin: 0!important; } -// gitter chat .gitter-chat-embed { z-index: 20000 !important; } +@import "jobs.less"; + //uncomment this to see the dimensions of all elements outlined in red //* { // border-color: red; diff --git a/common/app/routes/Jobs/components/GoToPayPal.jsx b/common/app/routes/Jobs/components/GoToPayPal.jsx index cedeeb5674..3314b45a82 100644 --- a/common/app/routes/Jobs/components/GoToPayPal.jsx +++ b/common/app/routes/Jobs/components/GoToPayPal.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { Col, Well, Row } from 'react-bootstrap'; +import { Col, Panel, Row } from 'react-bootstrap'; import { contain } from 'thundercats-react'; export default contain( @@ -23,12 +23,12 @@ export default contain(
- + xs={ 12 }> +
-
+
diff --git a/common/app/routes/Jobs/components/Jobs.jsx b/common/app/routes/Jobs/components/Jobs.jsx index a4d8354b3f..ab5834c706 100644 --- a/common/app/routes/Jobs/components/Jobs.jsx +++ b/common/app/routes/Jobs/components/Jobs.jsx @@ -1,7 +1,7 @@ import React, { cloneElement, PropTypes } from 'react'; import { contain } from 'thundercats-react'; import { History } from 'react-router'; -import { Button, Jumbotron, Row } from 'react-bootstrap'; +import { Button, Panel, Row } from 'react-bootstrap'; import CreateJobModal from './CreateJobModal.jsx'; import ListJobs from './List.jsx'; @@ -60,31 +60,29 @@ export default contain( } = this.props; return ( -
+ +

Free Code Camps' Job Board

- -

Free Code Camps' Job Board

-

- Need to find the best junior developers? - Want to find dedicated developers eager to join your company? - Sign up now to post your job! -

- -
+

+ Need to find the best junior developers? + Want to find dedicated developers eager to join your company? + Sign up now to post your job! +

+
- { this.renderChild(children, jobs) || - this.renderList(this.handleJobClick, jobs) } + { this.renderChild(children, jobs) || + this.renderList(this.handleJobClick, jobs) } -
+ ); } }) diff --git a/common/app/routes/Jobs/components/List.jsx b/common/app/routes/Jobs/components/List.jsx index 2457bcb7f0..d416497721 100644 --- a/common/app/routes/Jobs/components/List.jsx +++ b/common/app/routes/Jobs/components/List.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { PanelGroup, Thumbnail, Panel, Well } from 'react-bootstrap'; +import { ListGroup, ListGroupItem } from 'react-bootstrap'; import moment from 'moment'; export default React.createClass({ @@ -10,64 +10,40 @@ export default React.createClass({ jobs: PropTypes.array }, - renderJobs(handleClick, jobs =[]) { - const thumbnailStyle = { - backgroundColor: 'white', - maxHeight: '100px', - maxWidth: '100px' - }; - - return jobs.map(( - { + renderJobs(handleClick, jobs = []) { + return jobs + .filter(({ isPaid, isApproved, isFilled }) => { + return isPaid && isApproved && !isFilled; + }) + .map(({ id, company, position, isHighlighted, - description, - logo, - city, - state, - email, - phone, postedOn - }, - index - ) => { - const header = ( -
-

{ company }

-
- { position } -
-
- ); - return ( - - - - - Position: { position } - Location: { city }, { state } -
- Contact: { email || phone || 'N/A' } -
- Posted On: { moment(postedOn).format('MMMM Do, YYYY') } -
-

handleClick(id) }>{ description }

-
-
- ); - }); + }) => { + return ( + handleClick(id) }> +
+

+ { company } + {' '} + + - { position } + + {' '} +

+

+ { moment(new Date(postedOn)).format('MMM Do') } +

+
+
+ ); + }); }, render() { @@ -77,9 +53,9 @@ export default React.createClass({ } = this.props; return ( - + { this.renderJobs(handleClick, jobs) } - + ); } }); diff --git a/common/models/job.json b/common/models/job.json index 49866b0a58..673a5e0477 100644 --- a/common/models/job.json +++ b/common/models/job.json @@ -48,13 +48,20 @@ "type": "string" }, "isApproved": { - "type": "boolean" + "type": "boolean", + "default": false }, "isHighlighted": { - "type": "boolean" + "type": "boolean", + "default": false }, "isPaid": { - "type": "boolean" + "type": "boolean", + "default": false + }, + "isFilled": { + "type": "boolean", + "default": false }, "postedOn": { "type": "date",