From c78ff65165bbae9df131f6c23e849cf74ddc9968 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 19 Sep 2017 12:28:05 -0400 Subject: [PATCH] adding restriction by job expiration date, centering front end output adding styles, centering the front end data output, adding a check to make sure the job postings aren't older than the expiration date range --- classes/data/dataJobs.php | 2 +- css/front.css | 2 +- css/front.css.map | 2 +- models/admin/jobs/index.php | 7 ++++--- models/front/jobs/detail.php | 1 + models/front/jobs/list.php | 7 ++++--- scss/front.scss | 11 +++++++++-- views/admin/jobs/edit.html | 32 +++++++++++++++++++++++++++----- views/front/jobs/detail.html | 28 ++++++++++++++-------------- views/front/jobs/list.html | 2 +- 10 files changed, 63 insertions(+), 31 deletions(-) diff --git a/classes/data/dataJobs.php b/classes/data/dataJobs.php index 2887b3e..1ea8dab 100644 --- a/classes/data/dataJobs.php +++ b/classes/data/dataJobs.php @@ -155,7 +155,7 @@ class GlmDataJobs extends GlmDataAbstract 'use' => 'a' ), 'resume_location' => array ( - 'field' => 'email_location', + 'field' => 'resume_location', 'type' => 'text', 'use' => 'a' ), diff --git a/css/front.css b/css/front.css index 8f7f1e4..6d753a7 100644 --- a/css/front.css +++ b/css/front.css @@ -1,3 +1,3 @@ -.no-padding{padding:0}body .front-job-listings-wrapper{margin-top:20px}body .front-job-listings-wrapper .job-detail-wrapper div{float:none !important;line-height:1.1;margin:7px}body .front-job-listings-wrapper span{font-weight:bold}body .front-job-listings-wrapper .front-job-list-row{margin-bottom:20px}body .front-job-listings-wrapper .front-job-list-row .job-title-list span{font-size:20px}body .front-job-listings-wrapper .job-title-search #job_title_dropdown{max-width:450px}body .front-job-listings-wrapper .job-title-search .job-title-button{height:39px}@media screen and (max-width: 641px){body .front-job-listings-wrapper .job-title-button{display:block;max-width:100px;margin:0 auto}body .front-job-listings-wrapper .front-job-search{margin-bottom:20px}}@media (min-width: 639px) and (max-width: 1025px){body .front-job-listings-wrapper .job-title-button{display:inline-block;margin:0 0 0 10px}}@media (min-width: 1023px){body .front-job-listings-wrapper .job-title-button{display:inline-block;margin:0 0 0 10px}} +.no-padding{padding:0}body .front-job-listings-wrapper{margin-top:20px}body .front-job-listings-wrapper .job-detail-wrapper .front-title{font-weight:bold;font-size:20px}body .front-job-listings-wrapper .job-detail-wrapper div{float:none !important;line-height:1.1;margin:8px 8px 8px 0}body .front-job-listings-wrapper .front-job-search{max-width:530px;margin:0 auto}body .front-job-listings-wrapper span{font-weight:bold}body .front-job-listings-wrapper .front-job-list-row{margin-bottom:20px}body .front-job-listings-wrapper .front-job-list-row .job-title-list span{font-size:20px}body .front-job-listings-wrapper .job-title-search #job_title_dropdown{max-width:450px}body .front-job-listings-wrapper .job-title-search .job-title-button{height:39px}@media screen and (max-width: 641px){body .front-job-listings-wrapper .job-title-button{display:block;max-width:100px;margin:0 auto}body .front-job-listings-wrapper .front-job-search{margin-bottom:20px}}@media (min-width: 639px) and (max-width: 1025px){body .front-job-listings-wrapper .job-title-button{display:inline-block;margin:0 0 0 10px}}@media (min-width: 1023px){body .front-job-listings-wrapper .job-title-button{display:inline-block;margin:0 0 0 10px}} /*# sourceMappingURL=front.css.map */ diff --git a/css/front.css.map b/css/front.css.map index 9858feb..e990a27 100644 --- a/css/front.css.map +++ b/css/front.css.map @@ -1 +1 @@ -{"version":3,"file":"front.css","sources":["front.scss"],"sourcesContent":[".no-padding{\n padding: 0;\n}\n\nbody .front-job-listings-wrapper {\n .job-detail-wrapper{\n div{\n float: none !important;\n line-height: 1.1;\n margin: 7px;\n }\n }\n\n margin-top: 20px;\n span{\n font-weight: bold;\n }\n \n .front-job-list-row{\n margin-bottom: 20px;\n .job-title-list{\n span{\n font-size: 20px;\n }\n }\n\n }\n .job-title-search{\n #job_title_dropdown{\n max-width: 450px;\n }\n .job-title-button{\n height: 39px;\n }\n }\n \n @media screen and (max-width: 641px){\n .job-title-button{\n display: block;\n max-width: 100px;\n margin: 0 auto;\n }\n .front-job-search{\n margin-bottom: 20px;\n }\n }\n @media (min-width: 639px) and (max-width: 1025px){\n .job-title-button{\n display: inline-block;\n margin: 0 0 0 10px;\n }\n }\n @media (min-width: 1023px){\n .job-title-button{\n display: inline-block;\n margin: 0 0 0 10px;\n } \n }\n}"],"names":[],"mappings":"AAAA,AAAA,WAAW,AAAA,CACP,OAAO,CAAE,CAAC,CACb,AAED,AAAK,IAAD,CAAC,2BAA2B,AAAC,CAS7B,UAAU,CAAE,IAAI,CA6CnB,AAtDD,AAEO,IAFH,CAAC,2BAA2B,CAC5B,mBAAmB,CAChB,GAAG,AAAA,CACC,KAAK,CAAE,eAAe,CACtB,WAAW,CAAE,GAAG,CAChB,MAAM,CAAE,GAAG,CACd,AANR,AAUI,IAVA,CAAC,2BAA2B,CAU5B,IAAI,AAAA,CACA,WAAW,CAAE,IAAI,CACpB,AAZL,AAcI,IAdA,CAAC,2BAA2B,CAc5B,mBAAmB,AAAA,CACf,aAAa,CAAE,IAAI,CAOtB,AAtBL,AAiBY,IAjBR,CAAC,2BAA2B,CAc5B,mBAAmB,CAEf,eAAe,CACX,IAAI,AAAA,CACA,SAAS,CAAE,IAAI,CAClB,AAnBb,AAwBQ,IAxBJ,CAAC,2BAA2B,CAuB5B,iBAAiB,CACb,mBAAmB,AAAA,CACf,SAAS,CAAE,KAAK,CACnB,AA1BT,AA2BQ,IA3BJ,CAAC,2BAA2B,CAuB5B,iBAAiB,CAIb,iBAAiB,AAAA,CACb,MAAM,CAAE,IAAI,CACf,AAGL,MAAM,CAAC,MAAM,MAAM,SAAS,EAAE,KAAK,EAhCvC,AAiCQ,IAjCJ,CAAC,2BAA2B,CAiCxB,iBAAiB,AAAA,CACb,OAAO,CAAE,KAAK,CACd,SAAS,CAAE,KAAK,CAChB,MAAM,CAAE,MAAM,CACjB,AArCT,AAsCQ,IAtCJ,CAAC,2BAA2B,CAsCxB,iBAAiB,AAAA,CACb,aAAa,CAAE,IAAI,CACtB,CAEL,MAAM,EAAE,SAAS,EAAE,KAAK,OAAO,SAAS,EAAE,MAAM,EA1CpD,AA2CQ,IA3CJ,CAAC,2BAA2B,CA2CxB,iBAAiB,AAAA,CACb,OAAO,CAAE,YAAY,CACrB,MAAM,CAAE,UAAU,CACrB,CAEL,MAAM,EAAE,SAAS,EAAE,MAAM,EAhD7B,AAiDQ,IAjDJ,CAAC,2BAA2B,CAiDxB,iBAAiB,AAAA,CACb,OAAO,CAAE,YAAY,CACrB,MAAM,CAAE,UAAU,CACrB"} \ No newline at end of file +{"version":3,"file":"front.css","sources":["front.scss"],"sourcesContent":[".no-padding{\n padding: 0;\n}\n\nbody .front-job-listings-wrapper {\n .job-detail-wrapper{\n .front-title{\n font-weight: bold;\n font-size: 20px;\n }\n div{\n float: none !important;\n line-height: 1.1;\n margin: 8px 8px 8px 0;\n }\n }\n .front-job-search{\n max-width: 530px;\n margin: 0 auto;\n }\n margin-top: 20px;\n span{\n font-weight: bold;\n }\n \n .front-job-list-row{\n margin-bottom: 20px;\n .job-title-list{\n span{\n font-size: 20px;\n }\n }\n\n }\n .job-title-search{\n #job_title_dropdown{\n max-width: 450px;\n }\n .job-title-button{\n height: 39px;\n }\n }\n \n @media screen and (max-width: 641px){\n .job-title-button{\n display: block;\n max-width: 100px;\n margin: 0 auto;\n }\n .front-job-search{\n margin-bottom: 20px;\n }\n }\n @media (min-width: 639px) and (max-width: 1025px){\n .job-title-button{\n display: inline-block;\n margin: 0 0 0 10px;\n }\n }\n @media (min-width: 1023px){\n .job-title-button{\n display: inline-block;\n margin: 0 0 0 10px;\n } \n }\n}"],"names":[],"mappings":"AAAA,AAAA,WAAW,AAAA,CACP,OAAO,CAAE,CAAC,CACb,AAED,AAAK,IAAD,CAAC,2BAA2B,AAAC,CAgB7B,UAAU,CAAE,IAAI,CA6CnB,AA7DD,AAEQ,IAFJ,CAAC,2BAA2B,CAC5B,mBAAmB,CACf,YAAY,AAAA,CACR,WAAW,CAAE,IAAI,CACjB,SAAS,CAAE,IAAI,CAClB,AALT,AAMO,IANH,CAAC,2BAA2B,CAC5B,mBAAmB,CAKhB,GAAG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,CACb,OAAO,CAAE,YAAY,CACrB,MAAM,CAAE,UAAU,CACrB"} \ No newline at end of file diff --git a/models/admin/jobs/index.php b/models/admin/jobs/index.php index cfcb8a1..709f016 100644 --- a/models/admin/jobs/index.php +++ b/models/admin/jobs/index.php @@ -191,11 +191,12 @@ class GlmMembersAdmin_jobs_index extends GlmDataJobs switch ($option) { case 'add': - $job_titles = $job_titles->getList(); + $job = $this->newEntry(); $view_file = 'edit'; - + $job_titles = $job_titles->getList(); $job_data = $this->getList($where); + break; case 'insert': @@ -269,7 +270,7 @@ class GlmMembersAdmin_jobs_index extends GlmDataJobs case 'delete': $job = $this->deleteEntry($this->job_id,true); - + echo $this->job_id; if ($job) { $jobDeleted = true; } else { diff --git a/models/front/jobs/detail.php b/models/front/jobs/detail.php index 18e1276..63248f4 100644 --- a/models/front/jobs/detail.php +++ b/models/front/jobs/detail.php @@ -126,6 +126,7 @@ class GlmMembersFront_jobs_detail extends GlmDatajobs $where = "id = $this->job_id"; $job = $this->getList($where); + foreach($job as $j){ $job = $j; } diff --git a/models/front/jobs/list.php b/models/front/jobs/list.php index ef61095..aad1b76 100644 --- a/models/front/jobs/list.php +++ b/models/front/jobs/list.php @@ -106,20 +106,21 @@ class GlmMembersFront_jobs_list extends GlmDatajobs { $job_titles = new GlmDataJobTitles($this->wpdb,$this->config); $job_titles = $job_titles->getList(); + $where = ""; $success_message = ""; $option = false; if (isset($_REQUEST['option']) && trim($_REQUEST['option']) != '') { $option = $_REQUEST['option']; } - + $where .= "CURDATE() <= DATE_ADD(post_date, INTERVAL job_expiration DAY) "; if (isset($_REQUEST['job_titles']) && $_REQUEST['job_titles'] !== '') { // Make sure it's numeric $job_title_id = ($_REQUEST['job_titles'] - 0); - $where = "title = $job_title_id"; + $where .= "AND title = $job_title_id"; $job_data = $this->getList($where); } else { - $job_data = $this->getList(); + $job_data = $this->getList($where); } $view_file = 'list'; diff --git a/scss/front.scss b/scss/front.scss index cc49ea9..6d33c73 100644 --- a/scss/front.scss +++ b/scss/front.scss @@ -4,13 +4,20 @@ body .front-job-listings-wrapper { .job-detail-wrapper{ + .front-title{ + font-weight: bold; + font-size: 20px; + } div{ float: none !important; line-height: 1.1; - margin: 7px; + margin: 8px 8px 8px 0; } } - + .front-job-search{ + max-width: 530px; + margin: 0 auto; + } margin-top: 20px; span{ font-weight: bold; diff --git a/views/admin/jobs/edit.html b/views/admin/jobs/edit.html index cc5c7de..c889f0e 100644 --- a/views/admin/jobs/edit.html +++ b/views/admin/jobs/edit.html @@ -246,7 +246,29 @@ {/php} - + +
+
+ Send Resume To +
+
+ {php} + wp_editor( + + '{$job.fieldData.resume_location|escape:quotes}', + + 'resume_location', array( + 'media_buttons' => false, + 'tinymce' => false, + // 'quicktags' => false, + // 'wpautop' => false, NOTE: Dont's use. Problem when numerous spaces before text. + 'textarea_name' => 'resume_location', + 'editor_height' => 200, // Height in px, overrides editor_rows + // 'textarea_rows' => 8 + )); + {/php} +
+
@@ -259,7 +281,7 @@
- Email To + Contact Email
@@ -291,7 +313,7 @@