From f756a16aa46840789ff6276d76b75f9c9e162923 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 11:41:14 -0700 Subject: [PATCH 01/22] Added curated section to user schema --- app/schemas/models/user.coffee | 42 +++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index e77bd6830..d7df13bd3 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -107,7 +107,47 @@ UserSchema = c.object {}, name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "GitHub"', format: 'link-name'} link: c.url {title: 'Link', description: 'The URL.', default: 'http://example.com'} photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image if you want to show a different profile picture to employers than your normal avatar.'} - + + curated: c.object {title: 'Curated', required: ['mainTag','location','education','workHistory','phoneScreenFilter','schoolFilter','locationFilter','roleFilter','seniorityFilter']}, + mainTag: + title: 'Main tag' + description: 'A main tag to describe this candidate' + type: 'string' + location: + title: 'Location' + description: "The CURRENT location of the candidate" + type: 'string' + education: + title: 'Education' + description: 'The main educational institution of the candidate' + type: 'string' + workHistory: c.array + title: 'Work history' + description: 'One or two places the candidate has worked' + type: 'array' + , + title: 'Workplace' + type: 'string' + phoneScreenFilter: + title: 'Phone screened' + type: 'boolean' + description: 'Whether the candidate has been phone screened.' + schoolFilter: + title: 'School' + type: 'string' + enum: ['Top 20 Eng.', 'Other US', 'Other Intl.'] + locationFilter: + title: 'Location' + type: 'string' + enum: ['Bay Area', 'New York', 'Other US', 'International'] + roleFilter: + title: 'Role' + type: 'string' + enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager'] + seniorityFilter: + title: 'Seniority' + type: 'string' + enum: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management'] jobProfileApproved: {title: 'Job Profile Approved', type: 'boolean', description: 'Whether your profile has been approved by CodeCombat.'} jobProfileNotes: {type: 'string', maxLength: 1000, title: 'Our Notes', description: "CodeCombat's notes on the candidate.", format: 'markdown', default: ''} employerAt: c.shortString {description: "If given employer permissions to view job candidates, for which employer?"} From ebc79668ef96795fe1be83120e21f0dade02a0ad Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 11:42:02 -0700 Subject: [PATCH 02/22] Added image assets for recruitment page --- .../images/pages/base/recruitment_logo.png | Bin 0 -> 3076 bytes app/assets/images/pages/employer/briefcase.png | Bin 0 -> 196 bytes app/assets/images/pages/employer/education.png | Bin 0 -> 345 bytes app/assets/images/pages/employer/location.png | Bin 0 -> 634 bytes app/assets/images/pages/employer/tag.png | Bin 0 -> 324 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/assets/images/pages/base/recruitment_logo.png create mode 100644 app/assets/images/pages/employer/briefcase.png create mode 100644 app/assets/images/pages/employer/education.png create mode 100644 app/assets/images/pages/employer/location.png create mode 100644 app/assets/images/pages/employer/tag.png diff --git a/app/assets/images/pages/base/recruitment_logo.png b/app/assets/images/pages/base/recruitment_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..6e107540b93c47e099a3ad30c8aafb42540028ea GIT binary patch literal 3076 zcmaJ@dpwhUAD-39StwBttx1{84vrg>!zQOmET>FnTddi^HpkFR3Q>h?)&@u{yx`reUE?KNvn>ep-m@x z@x2Jn7z&$dKwiceL@+rLHUMC;BZ5PwFlc;m04AwhgT2Lp$Phld-48yc{=fp8=mjfNvoa1;tALBM#CEIv5`#^P!JRKU@A z6fT{^r?Xk$WkqrTJCu)wNHYDW1SaQ~EQ|M}O_GMeBgh;$(g3ks(oZ0P@c*Gq<}Wml z??(GK-~TDhBSvy)a5ox{9m=Ih2De{(ITQzD%cYU|Y%Y<_4*uCi*B~~Z%?o04z_zwv zT>_axXD$2C?*sw?;k18AJblE;hf_ z`@yCDJ{Q~Ha^aF>;LDT!uSx&BlC012@z>r;oL`$yV@cMXE7@zf|514WKsww3XHAUg zfA2dO^2}__5sTPuq_`Z}R_70_T42|@#0qhy>}8@q2~@bk+HFAlc`%XIJ6QwH^pVeJ z*qixI>><*TVrc2z$2!qV{nc54ha9$ei-u#*T)FlIdh5~3{D9i6>bVYGwFxh0puUOs zXWxgJ&-J6HN%G$BbRNDbq&qQz(2uzX=C$%pD$B8@IJZ-V<~mPZ+pk6+J4Rkt#L`>aR17O^#6A`}%w)xN@LM5OP7P;9@+jFV1UY${F|WQJ^y|&GD7q zE%Zn4y}nYb|ArLgUt*}7Tocd}-4Fs0`cwg3IsxvhkL%Km95Aoc*9&o#BO@4YL4oFzf}WH79f9VuvrIi8qc|(grT2ONX1?m~m}K z1G_5&m+aSHx)|1Pbi>GN0?gTeT;2j~RjlRgnc+fqy1z}TR;w|J<*%63bmy}4rD0j2 zF=g1dV^+f*@L=FUsVl!rceoc+ePn#FI(}pc_PSf2Wf3QHMRVZ!;{t2%f|G%2*)@Ib z<@j%ZmC39;xYl!gw@ns8XxWJE&EY9&(KH8xK<)b{#1%2VVUAM`{Hs@$%z81ak8wJ4 z$VsaRB6XOE+ClVy!5r`VRDZE5UMtm{i<%A^QI59+j~o|$@CsPN1z9XwcSA#o75JSA z?vIjlTunT)zgl(Ms%*}$;AB3%8(v3>Ys%d);6%5I4VLQ21C$WVvuL;GyVnFBrosLI zoQe=+xVJl3JrUtA&IK*1ym-i1-DS8kX2$hnrni%Wz;K+xeY0v@5nbqhK!`E2o*^D1 z1gGp%74wrWPDE7}TY8u%sh4bx2pcajDmkZ}aoExBxei4?;NF1HIZ-==K_g(U$sGBGRfThi1w_1nsq`jqaO+3mbHx0ITmTpO6+G4W*HVoYiS z=sxk(%U<4lzsAnCL+Ga3>j~2;vz?4lRrzpcPdm@ zH6&puPewJ`HXHU*W=RLRKy=~3a#_(|z*$$0R(bx5RkuD(iu?iTDcY#y^f zMSs0?9#xUHbF?z%DNwgcu(cQ8Wf0loZRJ2c-Z(2pKV7qxb43|CwY6^HLi_y_ z&GqfMO8TyNtk=)T9c#XJuUxa_k*U$xe2 z_U(h(MXewT_KU07ZOYt}lyNDw?LZmIjf`MbDsdiP?T9b&-=5R>Kq}{!Gja8S?bBgF zqrTycjb4+IG4V7*C z=u=xFV)m)CGY{(x6fr`c@w=DG|2(T>iN%T<=Bzbu1dTFyU$apf&##Qds|1l=(DMgP zW{;;$nmfg(k7}L^pPtjXAW#78-8>qoAqVO%%mV38&MUUq?>d$lR_cFKwtjx!qSxm2 zPkl0;sp>gxej9)5j~poH^B<@Rapa?XNIs8qS0?$wYjEjYFzM~^3Hi27kxKFotzA7% zqq(zJ0MbxBnc+_ZLi}}RqmRbr%-(>&u{w9}Sm@FrmdOsOx4niuqV+`}H-4qg?a26g zbnX1<6!fW$Tco8M3g-(){Yh8VczRQ~ey}xh6ObotQmeQ(ievHh=;8^Te$m zNPS2WG=9n5o_bQzAw7M1kN@dQuMhUV`to*nQd4E?y0eu{dHj%foBBbufDG_#@|1#C zj}o9rB)wy_DEWyeU}^iBVFm}_%^=SS&@!CvnP{s?R)fpid#K2eA*RkM>GOt9L z`jn;yHy0sqP^hvgYrcpvU5SV8HrWt$$HD44bZ5U`xwG@@277q6-@!O_sKf(Z03i|fA zScB4O!htBh9;dAGjuL<-gQR4C&imY!;@FldJS4;DFmoz+QnR+@<{MQv54|?dQOf6H zdFm%s{i!of-QH4yF!NhuD@$BrHQ+!(^dT$pg^=H_(niL4PDG=dr~ z@h_Oc*e)et<}f|sVDfLL1#fw8s5I+AhrphQl*8bY_YYQfdsk%a#P1*-a5xNMja34l=8?mHf?r- z*r<;3O2@W&sL}_otg$*bxdiQc%=SU|V$rCDvl9knZ4kZ9O6>tT%rW;j{pMzeYsUX6r~AB00000NkvXXu0mjf(VmYU literal 0 HcmV?d00001 diff --git a/app/assets/images/pages/employer/location.png b/app/assets/images/pages/employer/location.png new file mode 100644 index 0000000000000000000000000000000000000000..6e89d949d763862225e75ef23f3a7eef40c19553 GIT binary patch literal 634 zcmV-=0)_pFP)X1^@s60h=H40000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!97#k$RCwBAWIzJO#>NgnDjtXffLH)Y z>H-i?JbU)+0+;|JjA3A4P{Pd2+yrE@Krthd#(zNk>+j#cdw_Jvg$oycGJ!<(_4V_B zni_#jP9SDQ(*yz_bsRu79zeVmB*3hzt82){#lrsVY#D1LDD#FJFE$ zUqf9C+HAIJq2 zP^|az<;y79jTv3z%a<>|Nl8h83N2e`UcGVt{P{QrETtDV&;`UFq3m>Q3IGBO0LT@- U{e$j5i2wiq07*qoM6N<$f?Zt`=Kufz literal 0 HcmV?d00001 diff --git a/app/assets/images/pages/employer/tag.png b/app/assets/images/pages/employer/tag.png new file mode 100644 index 0000000000000000000000000000000000000000..6ec04f4af5fd569b547512e0a0f4342b3182ba14 GIT binary patch literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~%1|*NXY)uAnN?apKg7ec#$`gxH85~pclTsBt za}(23gHjVyDhp4h+5iPFr}1_G=B$MX_eL#9meh-(l`V7}zYE@~=l zz|_May`f=g55v^(1yA?{y^s05VZJ}zZ+S#l+@+fECV{nI1+Pu}aEdo=CC35IYf%@B z8fSVjZCF%e>+`!Z?!+O6X9+z!59}*rUuDoR^J=MW+unA`hmN5V9d1R;flEvT6l5CO z3mEwxvfSe^zwnn+n_;K-!TGXEyvi36j%sA*a+`iQpp?vTZryGP1@;QoNP$lc3tG7y z7zNh;vR|Nap?dxwhObP`)5RF2SSFb#vrS={;a4A936p00i_>zopr09v1T1poj5 literal 0 HcmV?d00001 From 5da1db8f6ea951085807593356ffe36c2d6146f6 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 11:43:26 -0700 Subject: [PATCH 03/22] Made new recruitment base layout --- app/templates/recruitment_base.jade | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 app/templates/recruitment_base.jade diff --git a/app/templates/recruitment_base.jade b/app/templates/recruitment_base.jade new file mode 100644 index 000000000..b04d4848d --- /dev/null +++ b/app/templates/recruitment_base.jade @@ -0,0 +1,21 @@ +body + #fb-root + #employers-wrapper + block header + .nav + .content.clearfix + .navbar-header + a.navbar-brand(href='/') + img(src="/images/pages/base/recruitment_logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat") + block outer_content + #outer-content-wrapper + + #intermediate-content-wrapper + + #inner-content-wrapper + .main-content-area#employer-content-area + block content + p If this is showing, you dun goofed + + block footer + .footer \ No newline at end of file From fe08fdb2b0a4798e2bab1fe7559cd33dede40a49 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 11:43:39 -0700 Subject: [PATCH 04/22] Made new recruitment base styles --- app/styles/recruitment_base.sass | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 app/styles/recruitment_base.sass diff --git a/app/styles/recruitment_base.sass b/app/styles/recruitment_base.sass new file mode 100644 index 000000000..3cd255096 --- /dev/null +++ b/app/styles/recruitment_base.sass @@ -0,0 +1,19 @@ +@import "bootstrap/variables" +@import "bootstrap/mixins" +@import "base" + +#employers-wrapper + background-color: #B4B4B4 + #outer-content-wrapper, #intermediate-content-wrapper, #inner-content-wrapper + background: #B4B4B4 + + .navbar, #top-nav, .content.clearfix + background-color: #B4B4B4 + + .footer + border-top: none + background-color: #B4B4B4 + padding-bottom: 50px + +#employer-content-area + margin: auto \ No newline at end of file From 8e6807ab60aa269da275aade57b5d730df443827 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 11:44:33 -0700 Subject: [PATCH 05/22] Redesigned layout of employers page --- app/templates/employers.jade | 206 ++++++++++++----------------------- 1 file changed, 72 insertions(+), 134 deletions(-) diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 665a0e28d..864f37cb9 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -1,140 +1,78 @@ -extends /templates/base +extends /templates/recruitment_base block content + #tagline + h1(data-i18n="employers.hire_developers_not_credentials") Hire developers, not credentials. + button.btn.get-started-button Get started - h1(data-i18n="employers.want_to_hire_our_players") Hire CodeCombat Players - - if !isEmployer && !me.isAdmin() - div#info_wrapper - - div#leftside - - div.information_row - - img(class="employer_icon" src="/images/pages/employer/employer_icon1.png") - - h2(data-i18n="employers.what") What is CodeCombat? - - p(data-i18n="employers.what_blurb") CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io. - - div.information_row - - img(class="employer_icon" src="/images/pages/employer/employer_icon3.png") - - h2(data-i18n="employers.who") Who Are the Players? - - p(data-i18n="employers.who_blurb") CodeCombateers are CTOs, VPs of Engineering, and graduates of top 20 engineering schools. No junior developers here. Our players enjoy playing with code and solving problems. - - div.information_row - - img(class="employer_icon" src="/images/pages/employer/employer_icon5.png") - - h2(data-i18n="employers.cost") Who Are the Players? - - p(data-i18n="employers.cost_blurb") CodeCombateers are CTOs, VPs of Engineering, and graduates of top 20 engineering schools. No junior developers here. Our players enjoy playing with code and solving problems. - - div#rightside - - div.information_row - - img(class="employer_icon" src="/images/pages/employer/employer_icon2.png") - - h2(data-i18n="employers.how") How Much Do we Charge? - - p(data-i18n="employers.how_blurb") We charge 15% of first year's salary and offer a 100% money back guarantee for 90 days. We don't charge for candidates who are already actively being interviewed at your company. - - div.information_row - - img(class="employer_icon" src="/images/pages/employer/employer_icon4.png") - - h2(data-i18n="employers.why") Why Hire Through Us? - - p - span(data-i18n="employers.why_blurb_1") We will save you time. Every CodeCombateer we feaure is - strong(data-i18n="employers.why_blurb_2") looking for work - span(data-i18n="employers.why_blurb_3") , has - strong(data-i18n="employers.why_blurb_4") demonstrated top notch technical skills - span(data-i18n="employers.why_blurb_5") , and has been - strong(data-i18n="employers.why_blurb_6") personally screened by us - span(data-i18n="employers.why_blurb_7") . Stop screening and start hiring. - - div.information_row - - img(class="employer_icon" src="/images/pages/employer/employer_icon6.png") - - h2(data-i18n="employers.response") What's the Response Rate? - - p(data-i18n="employers.response_blurb") Almost every developer you contact on CodeCombat will respond to inquires whether or not they want to interivew. If you would like help finding a candidate for your role, we can make recommendations. if candidates.length + #candidate-table + table + tbody + for candidate, index in featuredCandidates + - var profile = candidate.get('jobProfile'); + - var authorized = candidate.id; // If we have the id, then we are authorized. + - var profileAge = (new Date() - new Date(profile.updated)) / 86400 / 1000; + - var expired = profileAge > 2 * 30.4; + - var curated = profile.curated; + tr(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") + td(rowspan=2) + img.candidate-picture(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, height=50) + td.candidate-description #{profile.shortDescription} + tr.border_row + if curated + - var workHistory = curated.workHistory.join(","); + td.tag_column + img(src="/images/pages/employer/tag.png") + | #{curated.mainTag} + td.location_column + img(src="/images/pages/employer/location.png") + | #{curated.location} + td.education_column + img(src="/images/pages/employer/education.png") + | #{curated.education} + td.work_column + img(src="/images/pages/employer/briefcase.png") + | #{workHistory} + else + td Hi - ul.nav.nav-pills - li.active - a(href="#featured-candidates", data-toggle="tab") - span(data-i18n="employers.featured_developers") Featured Developers - | (#{featuredCandidates.length}) - if otherCandidates.length - li - a(href="#other-candidates", data-toggle="tab") - span(data-i18n="employers.other_developers") Other Developers - | (#{otherCandidates.length}) - if me.isAdmin() && inactiveCandidates.length - li - a(href="#inactive-candidates", data-toggle="tab") - span(data-i18n="employers.inactive_developers") Inactive Developers - | (#{inactiveCandidates.length}) - - div.tab-content - for area, tabIndex in [{id: "featured-candidates", candidates: featuredCandidates}, {id: "other-candidates", candidates: otherCandidates}, {id: "inactive-candidates", candidates: inactiveCandidates}] - div(class="tab-pane well" + (tabIndex ? "" : " active"), id=area.id) - table.table.table-condensed.table-hover.table-responsive.tablesorter - thead - tr - th(data-i18n="general.name") Name - th(data-i18n="employers.candidate_location") Location - th(data-i18n="employers.candidate_looking_for") Looking For - th(data-i18n="employers.candidate_role") Role - th(data-i18n="employers.candidate_top_skills") Top Skills - th(data-i18n="employers.candidate_years_experience") Yrs Exp - th(data-i18n="employers.candidate_last_updated") Last Updated - if me.isAdmin() - th(data-i18n="employers.candidate_who") Who - if me.isAdmin() && area.id == 'inactive-candidates' - th ✓? - - tbody - for candidate, index in area.candidates - - var profile = candidate.get('jobProfile'); - - var authorized = candidate.id; // If we have the id, then we are authorized. - - var profileAge = (new Date() - new Date(profile.updated)) / 86400 / 1000; - - var expired = profileAge > 2 * 30.4; - tr(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") - td - if authorized - img(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, height=50) - if profile.name - p= profile.name - else if me.isAdmin() - p (#{candidate.get('name')}) - else - img(src="/images/pages/contribute/archmage.png", alt="", title="Sign up as an employer to see our candidates", width=50) - p Developer ##{index + 1 + (area.id == 'featured-candidates' ? 0 : featuredCandidates.length)} - if profile.country == 'USA' - td= profile.city - else - td= profile.country - td= profile.lookingFor - td= profile.jobTitle - td - each skill in profile.skills - code= skill - span - td= profile.experience - td(data-profile-age=profileAge)= moment(profile.updated).fromNow() - if me.isAdmin() - td= remarks[candidate.id] ? remarks[candidate.id].get('contactName') : '' - if me.isAdmin() && area.id == 'inactive-candidates' - if candidate.get('jobProfileApproved') - td ✓ - else - td ✗ + if (!isEmployer && !me.isAdmin()) || true + div#info_wrapper + span.hiring-call-to-action + h2#start-hiring(data-i18n="employers.start_hiring") Start hiring. + button.btn.get-started-button Get started + + h2#hiring-reasons.hiring-call-to-action(data-i18n="employers.reasons") 3 reasons you should hire through us: + .reasons#top_row + .reason + img.employer_icon(src="/images/pages/employer/employer_icon2.png") + h3(data-i18n="employers.everyone_looking") Everyone here is looking for work. + p(data-i18n="employers.everyone_looking_blurb") Forget about 20% LinkedIn InMail response rates. Everyone that we list on this site wants to find their next position and will respond to your request for an introduction. + .reason + img.employer_icon(src="/images/pages/employer/employer_icon6.png") + h3(data-i18n="employers.weeding") We've done the weeding for you. + //this will break in i18n. Fix the inlining + p(data-i18n="employers.weeding_blurb") + | Every candidate that has a + span.glyphicon.glyphicon-earphone + | icon has already gone through a phone screen with us. We only feature developers that we would work with. + .reason + img(class="employer_icon" src="/images/pages/employer/employer_icon3.png") + h3(data-i18n="employers.pass_screen") They will pass your technical screen. + p(data-i18n="employers.pass_screen_blurb") All of these developers have ranked in our programming competitions. One employer found that 5x as many of our devs passed their technical screen than hiring from Hacker News. + span.hiring-call-to-action + h2(data-i18n="employers.make_hiring_easier") Make my hiring easier, please. + button.btn.get-started-button Get started + .reasons#bottom_row + .reason_long + img.employer_icon(src="/images/pages/employer/employer_icon1.png") + .reason_text + h3(data-i18n="employers.what") What is CodeCombat? + p(data-i18n="employers.what_blurb") CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io. + .reason_long + img.employer_icon(src="/images/pages/employer/employer_icon5.png") + .reason_text + h3(data-i18n="employers.cost") Who Are the Players? + p(data-i18n="employers.cost_blurb") CodeCombateers are CTOs, VPs of Engineering, and graduates of top 20 engineering schools. No junior developers here. Our players enjoy playing with code and solving problems. From 7eeb964d3eb0bea8bc4e503fff58d7e68b801115 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 11:44:45 -0700 Subject: [PATCH 06/22] Restyled employers page --- app/styles/employers.sass | 114 ++++++++++++++++++++++++++++++++------ 1 file changed, 97 insertions(+), 17 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index 233dd5e10..23923795b 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -1,7 +1,36 @@ #employers-view + button + background: #fce232 /* Old browsers */ + background: -moz-linear-gradient(top, #fce232 0%, #ea8e2b 100%) + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fce232), color-stop(100%,#ea8e2b)) + background: -webkit-linear-gradient(top, #fce232 0%,#ea8e2b 100%) + background: -o-linear-gradient(top, #fce232 0%,#ea8e2b 100%) + background: -ms-linear-gradient(top, #fce232 0%,#ea8e2b 100%) + background: linear-gradient(to bottom, #fce232 0%,#ea8e2b 100%) + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fce232', endColorstr='#ea8e2b',GradientType=0 ) + vertical-align: text-bottom + margin-left: 30px + + + .get-started-button + vertical-align: text-bottom + margin-left: 10px + + #tagline, .hiring-call-to-action + width: 100% + text-align: center + display: inline-block + margin-top: 20px + h1, h2, h3 + display: inline-block + button + display: inline-block h1, h2, h3 - font: Arial + font-family: Arial, Helvetica, sans-serif + color: #333333 + #tagline + margin-bottom: 20px .see-candidates-header margin: 30px @@ -10,23 +39,74 @@ #see-candidates cursor: pointer - .employer_icon - width: 125px - float: left - margin: 0px 15px 15px 0px + .reasons + height: 275px + margin-bottom: 25px + width: 100% - .information_row - height: 150px - padding-right: 15px - - #leftside - width: 500px - float: left - - #rightside - width: 500px - float: left + .information_row + height: 150px + padding-right: 15px + + .reason + width: 33% + padding-left: 3% + height: 150px + display: inline-block + .employer_icon + width: 125px + margin: 0px auto + + .reason_long + width: 50% + padding-left: 3% + display: inline-block + .employer_icon + display: inline-block + width: 25% + max-width: 125px + vertical-align: text-bottom + .reason_text + display: inline-block + width: 75% + #bottom_row + height: auto + #candidate-table + width: 96% + margin-left: 2% + margin-right: 2% + background-color: #E7E7E7 + table + width: 96% + margin-left: 2% + margin-right: 2% + .tag_column + width: 25% + display: inline-block + .location_column + display: inline-block + width: 25% + .education_column + display: inline-block + width: 25% + .work_column + display: inline-block + width: 25% + tr + .candidate-picture + height: 50px + .candidate-description + width: 100% + vertical-align: bottom + td + margin-bottom: 10px + margin-top: 10px + .border_row + border-bottom: 1px solid #d3d3d3 + vertical-align: bottom + + .tablesorter //img // display: none @@ -68,7 +148,7 @@ #employers-view, #profile-view.viewed-by-employer #outer-content-wrapper, #intermediate-content-wrapper, #inner-content-wrapper - background: #949494 + background: #B4B4B4 .main-content-area background-color: #EAEAEA From c6cc28b97675e2e01735fbc622382330e2650174 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 11:45:00 -0700 Subject: [PATCH 07/22] Various fixes to enable employers page to function correctly --- app/views/employers_view.coffee | 2 ++ server/users/user_handler.coffee | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 2b1186422..787cbbaf7 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -41,6 +41,8 @@ module.exports = class EmployersView extends View ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved') + #ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated + ctx.featuredCandidates = ctx.featuredCandidates.slice(0,8) ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved') ctx.remarks = {} ctx.remarks[remark.get('user')] = remark for remark in @remarks.models diff --git a/server/users/user_handler.coffee b/server/users/user_handler.coffee index 3bd3bed78..49f918b61 100644 --- a/server/users/user_handler.coffee +++ b/server/users/user_handler.coffee @@ -324,7 +324,7 @@ UserHandler = class UserHandler extends Handler fields = if authorized then ['name', 'jobProfile', 'jobProfileApproved', 'photoURL', '_id'] else ['jobProfile', 'jobProfileApproved'] obj = _.pick document.toObject(), fields obj.photoURL ||= obj.jobProfile.photoURL if authorized - subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active'] + subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active', 'shortDescription', 'curated'] if authorized subfields = subfields.concat ['name'] obj.jobProfile = _.pick obj.jobProfile, subfields From fe328a766b660e1a50cc1b6b1dd63295852b1893 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 15:48:26 -0700 Subject: [PATCH 08/22] Basic filtering functionality Still has a few bugs --- app/styles/employers.sass | 14 ++++- app/styles/recruitment_base.sass | 2 + app/templates/employers.jade | 90 +++++++++++++++++++++++++++++--- app/views/employers_view.coffee | 48 +++++++++++++++-- server/users/user_handler.coffee | 2 +- 5 files changed, 145 insertions(+), 11 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index 23923795b..e701cd452 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -12,7 +12,19 @@ vertical-align: text-bottom margin-left: 30px - + //filter panels + #filter + margin-bottom: 10px + .panel-heading + background-color: darkgrey + .panel-body + background-color: darkgrey + + #filters + .filter_section + width: 16% + display: inline-block + vertical-align: top .get-started-button vertical-align: text-bottom margin-left: 10px diff --git a/app/styles/recruitment_base.sass b/app/styles/recruitment_base.sass index 3cd255096..06bfe815c 100644 --- a/app/styles/recruitment_base.sass +++ b/app/styles/recruitment_base.sass @@ -4,6 +4,7 @@ #employers-wrapper background-color: #B4B4B4 + height: 100% #outer-content-wrapper, #intermediate-content-wrapper, #inner-content-wrapper background: #B4B4B4 @@ -14,6 +15,7 @@ border-top: none background-color: #B4B4B4 padding-bottom: 50px + #employer-content-area margin: auto \ No newline at end of file diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 864f37cb9..371eef1d2 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -1,11 +1,89 @@ extends /templates/recruitment_base block content - #tagline - h1(data-i18n="employers.hire_developers_not_credentials") Hire developers, not credentials. - button.btn.get-started-button Get started - - + if !isEmployer && !me.isAdmin() + #tagline + h1(data-i18n="employers.hire_developers_not_credentials") Hire developers, not credentials. + button.btn.get-started-button Get started + else + #filter + .panel-group#filter_panel + .panel.panel-default + .panel-heading + h4.panel-title + a(data-toggle="collapse" data-target="#collapseOne" href="#collapseOne") + span.glyphicon.glyphicon-folder-open + | Filter + .panel-collapse.collapse.in#collapseOne + .panel-body + form#filters + .filter_section#screened_filter + h4 Screened + input(type="checkbox" name="phoneScreenFilter" value=true) + | Phone Screened + .filter_section#visa_filter + h4 Visa + input(type="checkbox" name="visa" value="Authorized to work in the US") + | US Authorized + br + input(type="checkbox" name="visa" value="Need visa sponsorship") + | Not Authorized + .filter_section#school_filter + h4 School + input(type="checkbox" name="schoolFilter" value="Top 20 Eng.") + | Top 20 Eng. + br + input(type="checkbox" name="schoolFilter" value="Other US") + | Other US + br + input(type="checkbox" name="schoolFilter" value="Other Intl.") + | Other Intl. + .filter_section#location_filter + h4 Location + input(type="checkbox" name="locationFilter" value="Bay Area") + | Bay Area + br + input(type="checkbox" name="locationFilter" value="New York") + | New York + br + input(type="checkbox" name="locationFilter" value="Other US") + | Other US + br + input(type="checkbox" name="locationFilter" value="International") + | International + .filter_section#role_filter + h4 Role + input(type="checkbox" name="roleFilter" value="Web Developer") + | Web Developer + br + input(type="checkbox" name="roleFilter" value="Software Developer") + | Software Developer + br + input(type="checkbox" name="roleFilter" value="iOS Developer") + | iOS Developer + br + input(type="checkbox" name="roleFilter" value="Android Developer") + | Android Developer + br + input(type="checkbox" name="roleFilter" value="Project Manager") + | Project Developer + .filter_section#seniority_filter + h4 Seniority + input(type="checkbox" name="seniorityFilter" value="College Student") + | College Student + br + input(type="checkbox" name="seniorityFilter" value="Recent Grad") + | Recent Grad + br + input(type="checkbox" name="seniorityFilter" value="Junior") + | Junior + br + input(type="checkbox" name="seniorityFilter" value="Senior") + | Senior + br + input(type="checkbox" name="seniorityFilter" value="Management") + | Management + if candidates.length #candidate-table table @@ -38,7 +116,7 @@ block content else td Hi - if (!isEmployer && !me.isAdmin()) || true + if !isEmployer && !me.isAdmin() div#info_wrapper span.hiring-call-to-action h2#start-hiring(data-i18n="employers.start_hiring") Start hiring. diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 787cbbaf7..c5df40ceb 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -21,11 +21,13 @@ module.exports = class EmployersView extends View events: 'click tbody tr': 'onCandidateClicked' + 'change #filters input': 'onFilterChanged' constructor: (options) -> super options @getCandidates() - + @setFilterDefaults() + afterRender: -> super() @sortTable() if @candidates.models.length @@ -33,7 +35,45 @@ module.exports = class EmployersView extends View afterInsert: -> super() _.delay @checkForEmployerSignupHash, 500 - + onFilterChanged: (e) -> + @resetFilters() + that = @ + $("#filters :input").each -> + input = $(this) + checked = input.prop 'checked' + name = input.attr 'name' + if checked + that.filters[name] = _.union that.filters[name], [input.val()] + @render() + resetFilters: -> + for filterName, filterValues of @filters + @filters[filterName] = [] + + applyFilters: (candidateList) -> + filteredCandidates = [] + for filterName, filterValues of @filters + if filterName is "visa" + filteredCandidates = _.union filteredCandidates, _.filter(candidateList, (c) -> + fieldValue = c.get('jobProfile').visa + return _.contains filterValues, fieldValue + ) + else + filteredCandidates = _.union filteredCandidates, _.filter(candidateList, (c) -> + unless c.get('jobProfile').curated then return false + fieldValue = c.get('jobProfile').curated?[filterName] + return _.contains filterValues, fieldValue + ) + return filteredCandidates + setFilterDefaults: -> + @filters = + phoneScreenFilter: [true] + visa: ['Authorized to work in the US', 'Need visa sponsorship'] + schoolFilter: ['Top 20 Eng.', 'Other US', 'Other Intl.'] + locationFilter: ['Bay Area', 'New York', 'Other US', 'International'] + roleFilter: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager'] + seniorityFilter: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management'] + + getRenderData: -> ctx = super() ctx.isEmployer = @isEmployer() @@ -41,8 +81,10 @@ module.exports = class EmployersView extends View ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved') + ctx.featuredCandidates = @applyFilters(ctx.featuredCandidates) + #ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated - ctx.featuredCandidates = ctx.featuredCandidates.slice(0,8) + #ctx.featuredCandidates = ctx.featuredCandidates.slice(0,8) ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved') ctx.remarks = {} ctx.remarks[remark.get('user')] = remark for remark in @remarks.models diff --git a/server/users/user_handler.coffee b/server/users/user_handler.coffee index 49f918b61..7bd483678 100644 --- a/server/users/user_handler.coffee +++ b/server/users/user_handler.coffee @@ -324,7 +324,7 @@ UserHandler = class UserHandler extends Handler fields = if authorized then ['name', 'jobProfile', 'jobProfileApproved', 'photoURL', '_id'] else ['jobProfile', 'jobProfileApproved'] obj = _.pick document.toObject(), fields obj.photoURL ||= obj.jobProfile.photoURL if authorized - subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active', 'shortDescription', 'curated'] + subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active', 'shortDescription', 'curated', 'visa'] if authorized subfields = subfields.concat ['name'] obj.jobProfile = _.pick obj.jobProfile, subfields From 397140d9b064dbd0857278e71fae22b72c39c2f2 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Wed, 2 Jul 2014 16:47:02 -0700 Subject: [PATCH 09/22] Basic filtering Only visas work --- app/templates/employers.jade | 2 +- app/views/employers_view.coffee | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 371eef1d2..53801844a 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -98,7 +98,7 @@ block content td(rowspan=2) img.candidate-picture(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, height=50) td.candidate-description #{profile.shortDescription} - tr.border_row + tr.border_row(data-candidate-id=candidate.id) if curated - var workHistory = curated.workHistory.join(","); td.tag_column diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index c5df40ceb..dd2d095d5 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -44,12 +44,15 @@ module.exports = class EmployersView extends View name = input.attr 'name' if checked that.filters[name] = _.union that.filters[name], [input.val()] - @render() + @applyFilters() resetFilters: -> for filterName, filterValues of @filters @filters[filterName] = [] - applyFilters: (candidateList) -> + applyFilters: -> + candidateList = _.sortBy @candidates.models, (c) -> c.get('jobProfile').updated + candidateList = _.filter candidateList, (c) -> c.get('jobProfileApproved') + filteredCandidates = [] for filterName, filterValues of @filters if filterName is "visa" @@ -63,6 +66,12 @@ module.exports = class EmployersView extends View fieldValue = c.get('jobProfile').curated?[filterName] return _.contains filterValues, fieldValue ) + candidateIDsToShow = _.pluck filteredCandidates, 'id' + $("#candidate-table tr").each -> $(this).hide() + candidateIDsToShow.forEach (id) -> + $("[data-candidate-id=#{id}]").show() + + return filteredCandidates setFilterDefaults: -> @filters = @@ -81,8 +90,6 @@ module.exports = class EmployersView extends View ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved') - ctx.featuredCandidates = @applyFilters(ctx.featuredCandidates) - #ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated #ctx.featuredCandidates = ctx.featuredCandidates.slice(0,8) ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved') From ed30d3292ab9dc164b25be1fa633cd55505cf97d Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 10:14:32 -0700 Subject: [PATCH 10/22] Filter button --- app/styles/employers.sass | 4 ++++ app/templates/employers.jade | 3 ++- app/views/employers_view.coffee | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index e701cd452..03e7eeee8 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -25,9 +25,13 @@ width: 16% display: inline-block vertical-align: top + margin-bottom: 10px .get-started-button vertical-align: text-bottom margin-left: 10px + + #filter-button, #create-alert-button + float: right #tagline, .hiring-call-to-action width: 100% diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 53801844a..2a236b847 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -83,7 +83,8 @@ block content br input(type="checkbox" name="seniorityFilter" value="Management") | Management - + button.btn#filter-button Filter + button.btn#create-alert-button Create Alert if candidates.length #candidate-table table diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index dd2d095d5..8d8c0c21f 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -22,6 +22,7 @@ module.exports = class EmployersView extends View events: 'click tbody tr': 'onCandidateClicked' 'change #filters input': 'onFilterChanged' + 'click #filter-button': 'applyFilters' constructor: (options) -> super options @@ -44,7 +45,7 @@ module.exports = class EmployersView extends View name = input.attr 'name' if checked that.filters[name] = _.union that.filters[name], [input.val()] - @applyFilters() + resetFilters: -> for filterName, filterValues of @filters @filters[filterName] = [] From b58f2c49eb9cd202548423570dc9a129cb97b142 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 10:22:50 -0700 Subject: [PATCH 11/22] Fix description --- app/templates/employers.jade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 2a236b847..350c1ca12 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -98,7 +98,10 @@ block content tr(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") td(rowspan=2) img.candidate-picture(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, height=50) - td.candidate-description #{profile.shortDescription} + if curated && curated.shortDescription + td.candidate-description #{curated.shortDescription} + else + td.candidate-description #{profile.shortDescription} tr.border_row(data-candidate-id=candidate.id) if curated - var workHistory = curated.workHistory.join(","); From ae63461ef36347a1ee65b5bfc77ed7f3de12c969 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 11:39:44 -0700 Subject: [PATCH 12/22] Filter functional --- app/styles/employers.sass | 2 +- app/templates/employers.jade | 49 ++++++++++++++++++--------------- app/views/employers_view.coffee | 33 +++++++++++++++------- 3 files changed, 51 insertions(+), 33 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index 03e7eeee8..e16e91cfe 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -42,7 +42,7 @@ display: inline-block button display: inline-block - h1, h2, h3 + h1, h2, h3, h4 font-family: Arial, Helvetica, sans-serif color: #333333 #tagline diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 350c1ca12..da3e0a863 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -11,7 +11,7 @@ block content .panel.panel-default .panel-heading h4.panel-title - a(data-toggle="collapse" data-target="#collapseOne" href="#collapseOne") + a(data-toggle="collapse" data-target="#collapseOne") span.glyphicon.glyphicon-folder-open | Filter .panel-collapse.collapse.in#collapseOne @@ -19,72 +19,77 @@ block content form#filters .filter_section#screened_filter h4 Screened - input(type="checkbox" name="phoneScreenFilter" value=true) + input(type="checkbox" name="phoneScreenFilter" value="true" checked) | Phone Screened + br + input(type="checkbox" name="phoneScreenFilter" value="false" checked) + | Not Phone Screened .filter_section#visa_filter h4 Visa - input(type="checkbox" name="visa" value="Authorized to work in the US") + input(type="checkbox" name="visa" value="Authorized to work in the US" checked) | US Authorized br - input(type="checkbox" name="visa" value="Need visa sponsorship") + input(type="checkbox" name="visa" value="Need visa sponsorship" checked) | Not Authorized .filter_section#school_filter h4 School - input(type="checkbox" name="schoolFilter" value="Top 20 Eng.") + input(type="checkbox" name="schoolFilter" value="Top 20 Eng." checked) | Top 20 Eng. br - input(type="checkbox" name="schoolFilter" value="Other US") + input(type="checkbox" name="schoolFilter" value="Other US" checked) | Other US br - input(type="checkbox" name="schoolFilter" value="Other Intl.") + input(type="checkbox" name="schoolFilter" value="Other Intl." checked) | Other Intl. .filter_section#location_filter h4 Location - input(type="checkbox" name="locationFilter" value="Bay Area") + input(type="checkbox" name="locationFilter" value="Bay Area" checked) | Bay Area br - input(type="checkbox" name="locationFilter" value="New York") + input(type="checkbox" name="locationFilter" value="New York" checked) | New York br - input(type="checkbox" name="locationFilter" value="Other US") + input(type="checkbox" name="locationFilter" value="Other US" checked) | Other US br - input(type="checkbox" name="locationFilter" value="International") + input(type="checkbox" name="locationFilter" value="International" checked) | International .filter_section#role_filter h4 Role - input(type="checkbox" name="roleFilter" value="Web Developer") + input(type="checkbox" name="roleFilter" value="Web Developer" checked) | Web Developer br - input(type="checkbox" name="roleFilter" value="Software Developer") + input(type="checkbox" name="roleFilter" value="Software Developer" checked) | Software Developer br - input(type="checkbox" name="roleFilter" value="iOS Developer") + input(type="checkbox" name="roleFilter" value="iOS Developer" checked) | iOS Developer br - input(type="checkbox" name="roleFilter" value="Android Developer") + input(type="checkbox" name="roleFilter" value="Android Developer" checked) | Android Developer br - input(type="checkbox" name="roleFilter" value="Project Manager") + input(type="checkbox" name="roleFilter" value="Project Manager" checked) | Project Developer .filter_section#seniority_filter h4 Seniority - input(type="checkbox" name="seniorityFilter" value="College Student") + input(type="checkbox" name="seniorityFilter" value="College Student" checked) | College Student br - input(type="checkbox" name="seniorityFilter" value="Recent Grad") + input(type="checkbox" name="seniorityFilter" value="Recent Grad" checked) | Recent Grad br - input(type="checkbox" name="seniorityFilter" value="Junior") + input(type="checkbox" name="seniorityFilter" value="Junior" checked) | Junior br - input(type="checkbox" name="seniorityFilter" value="Senior") + input(type="checkbox" name="seniorityFilter" value="Senior" checked) | Senior br - input(type="checkbox" name="seniorityFilter" value="Management") + input(type="checkbox" name="seniorityFilter" value="Management" checked) | Management + input#select_all_checkbox(type="checkbox" name="select_all" checked) + | Select all button.btn#filter-button Filter - button.btn#create-alert-button Create Alert + //button.btn#create-alert-button Create Alert if candidates.length #candidate-table table diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 8d8c0c21f..973ebc107 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -23,12 +23,14 @@ module.exports = class EmployersView extends View 'click tbody tr': 'onCandidateClicked' 'change #filters input': 'onFilterChanged' 'click #filter-button': 'applyFilters' + 'change #select_all_checkbox': 'handleSelectAllChange' constructor: (options) -> super options @getCandidates() @setFilterDefaults() + afterRender: -> super() @sortTable() if @candidates.models.length @@ -36,16 +38,27 @@ module.exports = class EmployersView extends View afterInsert: -> super() _.delay @checkForEmployerSignupHash, 500 - onFilterChanged: (e) -> + + onFilterChanged: -> @resetFilters() that = @ $("#filters :input").each -> input = $(this) checked = input.prop 'checked' name = input.attr 'name' + value = input.val() + if name is "phoneScreenFilter" + value = JSON.parse(input.prop 'value') if checked - that.filters[name] = _.union that.filters[name], [input.val()] - + that.filters[name] = _.union that.filters[name], [value] + else + that.filters[name] = _.difference that.filters[name], [value] + handleSelectAllChange: (e) -> + checkedState = e.currentTarget.checked + $("#filters :input").each -> + $(this).prop 'checked', checkedState + @onFilterChanged() + resetFilters: -> for filterName, filterValues of @filters @filters[filterName] = [] @@ -54,18 +67,18 @@ module.exports = class EmployersView extends View candidateList = _.sortBy @candidates.models, (c) -> c.get('jobProfile').updated candidateList = _.filter candidateList, (c) -> c.get('jobProfileApproved') - filteredCandidates = [] + filteredCandidates = candidateList for filterName, filterValues of @filters if filterName is "visa" - filteredCandidates = _.union filteredCandidates, _.filter(candidateList, (c) -> + filteredCandidates = _.difference filteredCandidates, _.filter(filteredCandidates, (c) -> fieldValue = c.get('jobProfile').visa - return _.contains filterValues, fieldValue + return not (_.contains filterValues, fieldValue) ) else - filteredCandidates = _.union filteredCandidates, _.filter(candidateList, (c) -> - unless c.get('jobProfile').curated then return false + filteredCandidates = _.difference filteredCandidates, _.filter(filteredCandidates, (c) -> + unless c.get('jobProfile').curated then return true fieldValue = c.get('jobProfile').curated?[filterName] - return _.contains filterValues, fieldValue + return not (_.contains filterValues, fieldValue) ) candidateIDsToShow = _.pluck filteredCandidates, 'id' $("#candidate-table tr").each -> $(this).hide() @@ -76,7 +89,7 @@ module.exports = class EmployersView extends View return filteredCandidates setFilterDefaults: -> @filters = - phoneScreenFilter: [true] + phoneScreenFilter: [true, false] visa: ['Authorized to work in the US', 'Need visa sponsorship'] schoolFilter: ['Top 20 Eng.', 'Other US', 'Other Intl.'] locationFilter: ['Bay Area', 'New York', 'Other US', 'International'] From 538344094b43b026ec7e9ef7164b67ea32187736 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 13:59:10 -0700 Subject: [PATCH 13/22] Fixed filter behavior --- app/views/employers_view.coffee | 13 ++++++++++--- server/users/user_handler.coffee | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 973ebc107..7d154b76a 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -53,6 +53,11 @@ module.exports = class EmployersView extends View that.filters[name] = _.union that.filters[name], [value] else that.filters[name] = _.difference that.filters[name], [value] + + for filterName, filterValues of @filters + if filterValues.length is 0 + @filters[filterName] = @defaultFilters[filterName] + handleSelectAllChange: (e) -> checkedState = e.currentTarget.checked $("#filters :input").each -> @@ -95,7 +100,8 @@ module.exports = class EmployersView extends View locationFilter: ['Bay Area', 'New York', 'Other US', 'International'] roleFilter: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager'] seniorityFilter: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management'] - + @defaultFilters = _.cloneDeep @filters + getRenderData: -> ctx = super() @@ -104,8 +110,9 @@ module.exports = class EmployersView extends View ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved') - #ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated - #ctx.featuredCandidates = ctx.featuredCandidates.slice(0,8) + unless @isEmployer() or me.isAdmin() + ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated + ctx.featuredCandidates = ctx.featuredCandidates.slice(0,7) ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved') ctx.remarks = {} ctx.remarks[remark.get('user')] = remark for remark in @remarks.models diff --git a/server/users/user_handler.coffee b/server/users/user_handler.coffee index 7bd483678..0ed4f6a51 100644 --- a/server/users/user_handler.coffee +++ b/server/users/user_handler.coffee @@ -321,9 +321,9 @@ UserHandler = class UserHandler extends Handler @sendSuccess(res, candidates) formatCandidate: (authorized, document) -> - fields = if authorized then ['name', 'jobProfile', 'jobProfileApproved', 'photoURL', '_id'] else ['jobProfile', 'jobProfileApproved'] + fields = if authorized then ['name', 'jobProfile', 'jobProfileApproved', 'photoURL', '_id'] else ['_id','jobProfile', 'jobProfileApproved'] obj = _.pick document.toObject(), fields - obj.photoURL ||= obj.jobProfile.photoURL if authorized + obj.photoURL ||= obj.jobProfile.photoURL #if authorized subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active', 'shortDescription', 'curated', 'visa'] if authorized subfields = subfields.concat ['name'] From 3f1547488cf63cb5fd3216ce8873f491aa10b1df Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 14:40:39 -0700 Subject: [PATCH 14/22] Added login button and fixed bg color --- app/styles/employers.sass | 7 +++++++ app/templates/employers.jade | 6 ++++++ app/views/employers_view.coffee | 10 ++++++++++ 3 files changed, 23 insertions(+) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index e16e91cfe..951d1ea21 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -33,6 +33,13 @@ #filter-button, #create-alert-button float: right + #login-link, #logout-button + float: right + color: #333333 + display: inline-block + :visited + color: #333333 + #tagline, .hiring-call-to-action width: 100% text-align: center diff --git a/app/templates/employers.jade b/app/templates/employers.jade index da3e0a863..337a4baaf 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -6,6 +6,12 @@ block content h1(data-i18n="employers.hire_developers_not_credentials") Hire developers, not credentials. button.btn.get-started-button Get started else + if me.get('anonymous') + a#login-link(href="/account") Login + br + else + a#logout-button(data-i18n="login.log_out") Logout + br #filter .panel-group#filter_panel .panel.panel-default diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 7d154b76a..d69371ef1 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -24,6 +24,8 @@ module.exports = class EmployersView extends View 'change #filters input': 'onFilterChanged' 'click #filter-button': 'applyFilters' 'change #select_all_checkbox': 'handleSelectAllChange' + 'click .get-started-button': 'openSignupModal' + 'click .navbar-brand': 'restoreBodyColor' constructor: (options) -> super options @@ -38,7 +40,13 @@ module.exports = class EmployersView extends View afterInsert: -> super() _.delay @checkForEmployerSignupHash, 500 + #fairly hacky, change this in the future + @originalBackgroundColor = $("body").css 'background-color' + $("body").css 'background-color', '#B4B4B4' + restoreBodyColor: -> + $("body").css 'background-color', @originalBackgroundColor + onFilterChanged: -> @resetFilters() that = @ @@ -58,6 +66,8 @@ module.exports = class EmployersView extends View if filterValues.length is 0 @filters[filterName] = @defaultFilters[filterName] + openSignupModal: -> + @openModalView new EmployerSignupView handleSelectAllChange: (e) -> checkedState = e.currentTarget.checked $("#filters :input").each -> From 52ddb8db624aab0615bf424ba8fc8928682b891c Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 15:10:09 -0700 Subject: [PATCH 15/22] Add login link and rounded corners for pics --- app/styles/employers.sass | 2 ++ app/templates/employers.jade | 12 ++++++------ app/views/employers_view.coffee | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index 951d1ea21..6c949f67c 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -119,6 +119,8 @@ tr .candidate-picture height: 50px + border-radius: 5px + .candidate-description width: 100% vertical-align: bottom diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 337a4baaf..4112b4dc8 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -1,15 +1,15 @@ extends /templates/recruitment_base block content + if me.get('anonymous') + a#login-link Login + br if !isEmployer && !me.isAdmin() #tagline h1(data-i18n="employers.hire_developers_not_credentials") Hire developers, not credentials. button.btn.get-started-button Get started else - if me.get('anonymous') - a#login-link(href="/account") Login - br - else + if !me.get('anonymous') a#logout-button(data-i18n="login.log_out") Logout br #filter @@ -92,8 +92,8 @@ block content br input(type="checkbox" name="seniorityFilter" value="Management" checked) | Management - input#select_all_checkbox(type="checkbox" name="select_all" checked) - | Select all + //input#select_all_checkbox(type="checkbox" name="select_all" checked) + //| Select all button.btn#filter-button Filter //button.btn#create-alert-button Create Alert if candidates.length diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index d69371ef1..f56b530e2 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -26,6 +26,7 @@ module.exports = class EmployersView extends View 'change #select_all_checkbox': 'handleSelectAllChange' 'click .get-started-button': 'openSignupModal' 'click .navbar-brand': 'restoreBodyColor' + 'click #login-link': 'onClickAuthbutton' constructor: (options) -> super options @@ -276,7 +277,7 @@ module.exports = class EmployersView extends View onCandidateClicked: (e) -> id = $(e.target).closest('tr').data('candidate-id') - if id + if id and (@isEmployer() or me.isAdmin()) if window.history oldState = _.cloneDeep window.history.state ? {} oldState["lastViewedCandidateID"] = id From 88b0a0a97b7effa8bea0d5c9d1a10de1dbc098da Mon Sep 17 00:00:00 2001 From: George Saines Date: Thu, 3 Jul 2014 15:17:38 -0700 Subject: [PATCH 16/22] making changes to the employer page icon dimensions --- app/assets/images/pages/employer/anon_user.png | Bin 0 -> 1028 bytes app/assets/images/pages/employer/briefcase.png | Bin 196 -> 174 bytes app/assets/images/pages/employer/location.png | Bin 634 -> 323 bytes app/assets/images/pages/employer/tag.png | Bin 324 -> 253 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/assets/images/pages/employer/anon_user.png diff --git a/app/assets/images/pages/employer/anon_user.png b/app/assets/images/pages/employer/anon_user.png new file mode 100644 index 0000000000000000000000000000000000000000..34c2f197ba1134e92593ea0417aef714abd2a21e GIT binary patch literal 1028 zcmV+f1pE7mP)bQ< z>~?!6b&h)ozrv}#%fq$n4|4c!RZFZI#e2#!S zGcz+2rapi^5rF$vR#x();8RmmPYJ*ulb@U|EiKF^p)mL=Ik?4Q86ntN2FbxuKlc%w zo?F$Z$1~M%T9pF+j(}s199*Z<-IsgH{l}PBWp`n69kSW%VsmqI3=MA^zFHN4z7z}w zuO$+RBq=y1U@xe*v9XbX?<$i!5)Oy^qtR$mjU4A9kqBF$kC(wck1^h;4qi-|D}et};%c8qekV(vyR5sB<>loB0KV$= z`hI+Ekm33$7K>egKUa|zFFf!0c~;qdl<77KKh;mpvfC~tiZrFbd9~+N3S92HlB+m) zQ&ST&Z8F_V6$kI?>SA}~?K0ht8jVJ+nveLWpjP2TQM8*(Cic&QS*E+gX0wH`9nPj9 zs(>2|2G;4@y1Tpgna$?As1mo7GBFCZLsqLb9goKsFQ`g&$IIGs+G1}C9I0IpN3pF|KZV8#Q1z+2d8DwRtA6CBXSBJf$j4pg!sMgZ)d zaufkPVKp5B_!As2Na4Q6<#LUnJsak#NKnYJl^^u`{U7iW=Y9e2?d|P=xee%@T$Ks} z*bn$g1}_vJi2=Zq)eK#1)F+U}ec0t^6m-!NzCkZl?O0000L z*s)`u8$+0w3lk3A+?>umku_q2Mo_~g{sl7_+oc4|9Hu86O#bb(;4SYBm40onfg1j7O$iBL{Q4GJ0x0000DNk~Le0000A0000I2nGNE0AjaKOOYWbe*oo4 zL_t(|+JutL4T3-rg<-J(&zvj)!o?$2qT7LXAV-f@ARVX`NCPC4z>Rovy?OMFnIV(S zf|JZH!#=+GS>lMTD2gMtEqukV9Q+19v~BBR7G1FIqOkSw+%QRtI(VaE%5XKDPRt@r z4&M-k)034()zm>y%NKYi@)#RMd~<>N-XUR$dNVbJr7mm1T}k=}1T~ZNsD8pmbxo9g zXhf9y9{smQ2L58&l;zS)JtOLAR3bdj2rF6=T83e8X_``pS%7B!IaX7&k*KKD(AuZ@ sL?OskT78h{0MrktPyQ)R`s^#f096o6ELjvzp#T5?07*qoM6N<$f;M14nQg%hy#FF07>cs5KlaN_Ur+f%*@;bWU@dpBa+5{ zK>X|P-@ki+bjXDZ7k)B{J`a-E5Z>CL}?|3uLYe~=du5qZVL&dwhB|NnnpB*|y2tgK-dFJ5#9VIbQS zh|eI&GXwRMGXewT0mu}XC{R)GrAwDKef#$94~Wmj#RZ}iG&MEPBL^7BYB?m+?q0ca zWiw0@2msk23^IHfx~Gu?;=z|MUw$)S2M^FSA_GMwB_$mC81&FJBHI88f3aM29SRBx z+Ca(^CDeiV9uTX;LJSzmwQ_QD!a(*usF=36xOmK;KYxVLHJ(J$2m+##l9Kh%WCsFD zKux@8j(Exh4E}BCP6H|gVSOm(#p2(sOi!LX*$qmE3?u+xs#*)u_zuWEOoG0z&!0a( z0*($~!ks~^E}+`Yj~+exe+Jh0=FOY!pfpO1MxfeWcmlY0@7`BnP9VnCt3b79P*TpP zPoGwSk|sV~K*QTHlH5%oU}R)mi$~ubU^-roHLZUC{=E}O{lumVXlU2<>(~Eb)p!*M zfC@HX(e(J|&z}qMQ#*T>Pc#8_d@)*I=x2OhWXw(CYMx zH4YQ@F-D%Z<6?R=x0pFW#!;lYul=+I<4L7|4tgD3G8g1Ia!djR8?4;UPgC%AP2x3b zG00xKyDdM!_0i!kM!xc<8@WB3TP{zJXiK@k{if~C0=6|BB8n`ll|olEEc7^~cYxti Xe$ZA01s^7$n;AS^{an^LB{Ts5g5XcR delta 294 zcmV+>0onfj0mK3!iBL{Q4GJ0x0000DNk~Le0000P0000P2nGNE0L1BqW04^!f96R< zK~#9!wAHZK=d_7G2d0xoE0Onwfxxl`5 z2dXfDnbmbYhP{Uw;Xzdxh(>Y)d{Lw{5Fi|Yhj0N7;RN0YH_-hFD*(Am!Ji!>4I|KC z#VBiS3pMb-B4Yr~uDci@2Y3Zp5b}Vag$qCd5Uu(@peWFLpZoyz0)v+p0U897H)95r s1d>Ps$^x>GFK7<)gxTZ*n3n(p03924@a_#!TmS$707*qoM6N<$f;i7_C;$Ke From 4d12aff35e981392fc19c2a1c32acc52d6fed913 Mon Sep 17 00:00:00 2001 From: George Saines Date: Thu, 3 Jul 2014 15:42:24 -0700 Subject: [PATCH 17/22] removing the counselor from the contribute page and all other links --- app/templates/community.jade | 3 -- app/templates/contribute/contribute.jade | 19 -------- app/templates/contribute/contribute_nav.jade | 7 +-- app/templates/contribute/counselor.jade | 49 -------------------- app/views/contribute/counselor_view.coffee | 8 ---- 5 files changed, 1 insertion(+), 85 deletions(-) delete mode 100644 app/templates/contribute/counselor.jade delete mode 100644 app/views/contribute/counselor_view.coffee diff --git a/app/templates/community.jade b/app/templates/community.jade index 3ff8d3444..755e55cf4 100644 --- a/app/templates/community.jade +++ b/app/templates/community.jade @@ -79,9 +79,6 @@ block content li a(href="/contribute#ambassador", data-i18n="classes.ambassador_title") | : support our community of educators and coders. - li - a(href="/contribute#counselor", data-i18n="classes.counselor_title") - | : offer your advice and business acumen to the founders. | Check out the a(href="/contribute", data-i18n="nav.contribute") diff --git a/app/templates/contribute/contribute.jade b/app/templates/contribute/contribute.jade index d9457e6d8..5fdb19698 100644 --- a/app/templates/contribute/contribute.jade +++ b/app/templates/contribute/contribute.jade @@ -179,23 +179,4 @@ block content .contributor-signup(data-contributor-class-id="support", data-contributor-class-name="ambassador") - #counselor.header-scrolling-fix - - .class_image - img.img-responsive(src="/images/pages/contribute/counselor.png", alt="") - - h3.header-scrolling-fix - span(data-i18n="classes.counselor_title") Counselor - span - span(data-i18n="classes.counselor_title_description") (Expert/Teacher) - p(data-i18n="contribute.counselor_summary") - | None of the above roles fit what you are interested in? Do not worry, we are on the - | lookout for anybody who wants a hand in the development of CodeCombat! If you are - | interested in teaching, game development, open source management, or anything else - | that you think will be relevant to us, then this class is for you. - - a(href="/contribute/counselor") - p.lead(data-i18n="contribute.more_about_counselor") - | Learn More About Becoming a Counselor - div.clearfix \ No newline at end of file diff --git a/app/templates/contribute/contribute_nav.jade b/app/templates/contribute/contribute_nav.jade index c7379e975..90b07133e 100644 --- a/app/templates/contribute/contribute_nav.jade +++ b/app/templates/contribute/contribute_nav.jade @@ -30,9 +30,4 @@ ul.contribute_class.affix.nav.nav-list.nav-pills#contribute-nav a(href=navPrefix + "#ambassador") span(data-i18n="classes.ambassador_title") Ambassador span - span(data-i18n="classes.ambassador_title_description") (Support) - li - a(href=navPrefix + "#counselor") - span(data-i18n="classes.counselor_title") Counselor - span - span(data-i18n="classes.counselor_title_description") (Expert/Teacher) \ No newline at end of file + span(data-i18n="classes.ambassador_title_description") (Support) \ No newline at end of file diff --git a/app/templates/contribute/counselor.jade b/app/templates/contribute/counselor.jade deleted file mode 100644 index 36a79d8cc..000000000 --- a/app/templates/contribute/counselor.jade +++ /dev/null @@ -1,49 +0,0 @@ -extends /templates/base - -block content - - div.contribute_class - - include /templates/contribute/contribute_nav - - div.class-main#sounselor-main - - .class_image - img.img-responsive(src="/images/pages/contribute/counselor.png", alt="") - - h2 - span(data-i18n="classes.counselor_title") Counselor - span - span(data-i18n="classes.counselor_title_description") (Expert/Teacher) - p(data-i18n="contribute.counselor_introduction_1") - | Do you have life experience? - | A different perspective on things that can help us decide how to shape CodeCombat? - | Of all these roles, this will probably take the least time, but - | individually you may make the most difference. - | We're on the lookout for wisened sages, particularly in areas like: teaching, - | game development, open source project management, technical recruiting, entrepreneurship, - | or design. - - p(data-i18n="contribute.counselor_introduction_2") - | Or really anything that is relevant to the development of CodeCombat. - | If you have knowledge and want to share it to help grow this project, then - | this class might be for you. - - h4(data-i18n="contribute.class_attributes") Class Attributes - ul - li(data-i18n="contribute.counselor_attribute_1") - | Experience, in any of the areas above or something you think might be helpful. - li(data-i18n="contribute.counselor_attribute_2") - | A little bit of free time! - - h4(data-i18n="contribute.how_to_join") How to Join - p - a(title='Contact', tabindex=-1, data-toggle="coco-modal", data-target="modal/contact", data-i18n="contribute.contact_us_url") - | Contact us - span , - span(data-i18n="contribute.counselor_join_desc") - | tell us a little about yourself, what you've done and what you'd - | be interested in doing. We'll put you in our contact list and be in touch - | when we could use advice (not too often). - - div.clearfix diff --git a/app/views/contribute/counselor_view.coffee b/app/views/contribute/counselor_view.coffee deleted file mode 100644 index 6e5a6be2c..000000000 --- a/app/views/contribute/counselor_view.coffee +++ /dev/null @@ -1,8 +0,0 @@ -ContributeClassView = require 'views/contribute/contribute_class_view' -template = require 'templates/contribute/counselor' -{me} = require('lib/auth') - -module.exports = class CounselorView extends ContributeClassView - id: "counselor-view" - template: template - contributorClassName: 'counselor' From 6c31f0885375597ef09ec355c53931bd973a6d96 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 15:48:48 -0700 Subject: [PATCH 18/22] Unchecked all by default --- app/templates/employers.jade | 79 ++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 4112b4dc8..423477db9 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -25,72 +25,72 @@ block content form#filters .filter_section#screened_filter h4 Screened - input(type="checkbox" name="phoneScreenFilter" value="true" checked) + input(type="checkbox" name="phoneScreenFilter" value="true") | Phone Screened br - input(type="checkbox" name="phoneScreenFilter" value="false" checked) + input(type="checkbox" name="phoneScreenFilter" value="false") | Not Phone Screened .filter_section#visa_filter h4 Visa - input(type="checkbox" name="visa" value="Authorized to work in the US" checked) + input(type="checkbox" name="visa" value="Authorized to work in the US") | US Authorized br - input(type="checkbox" name="visa" value="Need visa sponsorship" checked) + input(type="checkbox" name="visa" value="Need visa sponsorship") | Not Authorized .filter_section#school_filter h4 School - input(type="checkbox" name="schoolFilter" value="Top 20 Eng." checked) + input(type="checkbox" name="schoolFilter" value="Top 20 Eng.") | Top 20 Eng. br - input(type="checkbox" name="schoolFilter" value="Other US" checked) + input(type="checkbox" name="schoolFilter" value="Other US") | Other US br - input(type="checkbox" name="schoolFilter" value="Other Intl." checked) + input(type="checkbox" name="schoolFilter" value="Other Intl.") | Other Intl. .filter_section#location_filter h4 Location - input(type="checkbox" name="locationFilter" value="Bay Area" checked) + input(type="checkbox" name="locationFilter" value="Bay Area") | Bay Area br - input(type="checkbox" name="locationFilter" value="New York" checked) + input(type="checkbox" name="locationFilter" value="New York") | New York br - input(type="checkbox" name="locationFilter" value="Other US" checked) + input(type="checkbox" name="locationFilter" value="Other US") | Other US br - input(type="checkbox" name="locationFilter" value="International" checked) + input(type="checkbox" name="locationFilter" value="International") | International .filter_section#role_filter h4 Role - input(type="checkbox" name="roleFilter" value="Web Developer" checked) + input(type="checkbox" name="roleFilter" value="Web Developer") | Web Developer br - input(type="checkbox" name="roleFilter" value="Software Developer" checked) + input(type="checkbox" name="roleFilter" value="Software Developer") | Software Developer br - input(type="checkbox" name="roleFilter" value="iOS Developer" checked) + input(type="checkbox" name="roleFilter" value="iOS Developer") | iOS Developer br - input(type="checkbox" name="roleFilter" value="Android Developer" checked) + input(type="checkbox" name="roleFilter" value="Android Developer") | Android Developer br - input(type="checkbox" name="roleFilter" value="Project Manager" checked) + input(type="checkbox" name="roleFilter" value="Project Manager") | Project Developer .filter_section#seniority_filter h4 Seniority - input(type="checkbox" name="seniorityFilter" value="College Student" checked) + input(type="checkbox" name="seniorityFilter" value="College Student") | College Student br - input(type="checkbox" name="seniorityFilter" value="Recent Grad" checked) + input(type="checkbox" name="seniorityFilter" value="Recent Grad") | Recent Grad br - input(type="checkbox" name="seniorityFilter" value="Junior" checked) + input(type="checkbox" name="seniorityFilter" value="Junior") | Junior br - input(type="checkbox" name="seniorityFilter" value="Senior" checked) + input(type="checkbox" name="seniorityFilter" value="Senior") | Senior br - input(type="checkbox" name="seniorityFilter" value="Management" checked) + input(type="checkbox" name="seniorityFilter" value="Management") | Management //input#select_all_checkbox(type="checkbox" name="select_all" checked) //| Select all @@ -106,30 +106,31 @@ block content - var profileAge = (new Date() - new Date(profile.updated)) / 86400 / 1000; - var expired = profileAge > 2 * 30.4; - var curated = profile.curated; - tr(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") + + tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") td(rowspan=2) img.candidate-picture(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, height=50) if curated && curated.shortDescription td.candidate-description #{curated.shortDescription} else td.candidate-description #{profile.shortDescription} - tr.border_row(data-candidate-id=candidate.id) - if curated - - var workHistory = curated.workHistory.join(","); - td.tag_column - img(src="/images/pages/employer/tag.png") - | #{curated.mainTag} - td.location_column - img(src="/images/pages/employer/location.png") - | #{curated.location} - td.education_column - img(src="/images/pages/employer/education.png") - | #{curated.education} - td.work_column - img(src="/images/pages/employer/briefcase.png") - | #{workHistory} - else - td Hi + tr.border_row(data-candidate-id=candidate.id) + if curated + - var workHistory = curated.workHistory.join(","); + td.tag_column + img(src="/images/pages/employer/tag.png") + | #{curated.mainTag} + td.location_column + img(src="/images/pages/employer/location.png") + | #{curated.location} + td.education_column + img(src="/images/pages/employer/education.png") + | #{curated.education} + td.work_column + img(src="/images/pages/employer/briefcase.png") + | #{workHistory} + else + td Hi if !isEmployer && !me.isAdmin() div#info_wrapper From 615303395c001ae96f44d56b1fda15ae0f5f33c3 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 16:30:27 -0700 Subject: [PATCH 19/22] Various fixes for recruiting page --- app/styles/employers.sass | 10 ++++++- app/templates/employers.jade | 49 +++++++++++++++++---------------- app/views/employers_view.coffee | 9 ++++-- 3 files changed, 42 insertions(+), 26 deletions(-) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index 6c949f67c..80758331a 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -101,9 +101,11 @@ margin-right: 2% background-color: #E7E7E7 table + cursor: pointer width: 96% margin-left: 2% margin-right: 2% + margin-bottom: 30px .tag_column width: 25% display: inline-block @@ -118,8 +120,10 @@ width: 25% tr .candidate-picture + width: 50px height: 50px border-radius: 5px + overflow: hidden .candidate-description width: 100% @@ -127,11 +131,15 @@ td margin-bottom: 10px margin-top: 10px + padding-bottom: 5px + padding-top: 10px .border_row border-bottom: 1px solid #d3d3d3 vertical-align: bottom + padding-top: 0px - + #results + display: inline-block .tablesorter //img // display: none diff --git a/app/templates/employers.jade b/app/templates/employers.jade index 423477db9..01f6debd7 100644 --- a/app/templates/employers.jade +++ b/app/templates/employers.jade @@ -14,11 +14,12 @@ block content br #filter .panel-group#filter_panel - .panel.panel-default - .panel-heading - h4.panel-title - a(data-toggle="collapse" data-target="#collapseOne") - span.glyphicon.glyphicon-folder-open + a#filter-link(data-toggle="collapse" data-target="#collapseOne") + .panel.panel-default + .panel-heading + h4.panel-title + + span.glyphicon.glyphicon-folder-open#folder-icon | Filter .panel-collapse.collapse.in#collapseOne .panel-body @@ -95,6 +96,7 @@ block content //input#select_all_checkbox(type="checkbox" name="select_all" checked) //| Select all button.btn#filter-button Filter + p#results #{numberOfCandidates} results //button.btn#create-alert-button Create Alert if candidates.length #candidate-table @@ -109,28 +111,29 @@ block content tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "") td(rowspan=2) - img.candidate-picture(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, height=50) + .candidate-picture + img(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, width=50) if curated && curated.shortDescription td.candidate-description #{curated.shortDescription} else td.candidate-description #{profile.shortDescription} - tr.border_row(data-candidate-id=candidate.id) - if curated - - var workHistory = curated.workHistory.join(","); - td.tag_column - img(src="/images/pages/employer/tag.png") - | #{curated.mainTag} - td.location_column - img(src="/images/pages/employer/location.png") - | #{curated.location} - td.education_column - img(src="/images/pages/employer/education.png") - | #{curated.education} - td.work_column - img(src="/images/pages/employer/briefcase.png") - | #{workHistory} - else - td Hi + tr.border_row(data-candidate-id=candidate.id) + if curated + - var workHistory = curated.workHistory.join(","); + td.tag_column + img(src="/images/pages/employer/tag.png") + | #{curated.mainTag} + td.location_column + img(src="/images/pages/employer/location.png") + | #{curated.location} + td.education_column + img(src="/images/pages/employer/education.png") + | #{curated.education} + td.work_column + img(src="/images/pages/employer/briefcase.png") + | #{workHistory} + else + td Hi if !isEmployer && !me.isAdmin() div#info_wrapper diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index f56b530e2..7e5c0e501 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -27,6 +27,7 @@ module.exports = class EmployersView extends View 'click .get-started-button': 'openSignupModal' 'click .navbar-brand': 'restoreBodyColor' 'click #login-link': 'onClickAuthbutton' + 'click #filter-link': 'swapFolderIcon' constructor: (options) -> super options @@ -47,7 +48,9 @@ module.exports = class EmployersView extends View restoreBodyColor: -> $("body").css 'background-color', @originalBackgroundColor - + + swapFolderIcon: -> + $("#folder-icon").toggleClass("glyphicon-folder-close").toggleClass("glyphicon-folder-open") onFilterChanged: -> @resetFilters() that = @ @@ -100,6 +103,7 @@ module.exports = class EmployersView extends View $("#candidate-table tr").each -> $(this).hide() candidateIDsToShow.forEach (id) -> $("[data-candidate-id=#{id}]").show() + $("#results").text(candidateIDsToShow.length + " results") return filteredCandidates @@ -117,7 +121,7 @@ module.exports = class EmployersView extends View getRenderData: -> ctx = super() ctx.isEmployer = @isEmployer() - ctx.candidates = _.sortBy @candidates.models, (c) -> c.get('jobProfile').updated + ctx.candidates = _.sortBy @candidates.models, (c) -> -1 * c.get('jobProfile').experience ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved') @@ -129,6 +133,7 @@ module.exports = class EmployersView extends View ctx.remarks[remark.get('user')] = remark for remark in @remarks.models ctx.moment = moment ctx._ = _ + ctx.numberOfCandidates = ctx.featuredCandidates.length ctx isEmployer: -> From 45e3da0945dc172cfebdeee9b9d4865aa2ecbadb Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 16:32:20 -0700 Subject: [PATCH 20/22] Hover on logout button --- app/styles/employers.sass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index 80758331a..85830ce4e 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -39,6 +39,8 @@ display: inline-block :visited color: #333333 + #logout-button:hover + cursor: pointer #tagline, .hiring-call-to-action width: 100% From d3cc9ae1790301a9beed921bb54b1f580ca64452 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 16:33:10 -0700 Subject: [PATCH 21/22] 10 pixel margin on photos --- app/styles/employers.sass | 1 + 1 file changed, 1 insertion(+) diff --git a/app/styles/employers.sass b/app/styles/employers.sass index 85830ce4e..1e11323fa 100644 --- a/app/styles/employers.sass +++ b/app/styles/employers.sass @@ -126,6 +126,7 @@ height: 50px border-radius: 5px overflow: hidden + margin-right: 10px .candidate-description width: 100% From 6a33ca08925b4670ef81b0a3fe4b7cb4bddc842b Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Thu, 3 Jul 2014 16:40:00 -0700 Subject: [PATCH 22/22] Removed autoscrolling --- app/views/employers_view.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee index 7e5c0e501..788a2d584 100644 --- a/app/views/employers_view.coffee +++ b/app/views/employers_view.coffee @@ -152,10 +152,10 @@ module.exports = class EmployersView extends View renderCandidatesAndSetupScrolling: => @render() $(".nano").nanoScroller() - if window.history?.state?.lastViewedCandidateID - $(".nano").nanoScroller({scrollTo:$("#" + window.history.state.lastViewedCandidateID)}) - else if window.location.hash.length is 25 - $(".nano").nanoScroller({scrollTo:$(window.location.hash)}) + #if window.history?.state?.lastViewedCandidateID + # $(".nano").nanoScroller({scrollTo:$("#" + window.history.state.lastViewedCandidateID)}) + #else if window.location.hash.length is 25 + # $(".nano").nanoScroller({scrollTo:$(window.location.hash)}) checkForEmployerSignupHash: => if window.location.hash is "#employerSignupLoggingIn" and not ("employer" in me.get("permissions"))