From: Steve Sutton Date: Fri, 19 Dec 2014 13:25:44 +0000 (-0500) Subject: Add end class to last item in list display of the jobs X-Git-Tag: v1.0.1~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=9a93d0e84f00458a8dbc1f03d2a2ab5622b8a3b5;p=WP-Plugins%2Fglm-employment.git Add end class to last item in list display of the jobs --- diff --git a/controllers/front.php b/controllers/front.php index 15d4068..5f023f3 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -478,9 +478,12 @@ class glm_employment_front } } $jobs = get_posts($args); + $totalJobs = count($jobs); $current_url = add_query_arg($wp->query_string, '', home_url($wp->request)); + $iterator = 1; foreach ($jobs as $job) { $custom = get_post_custom($job->ID); + $job->end = false; $job->glm_jobs_startdate = $custom['glm_jobs_startdate'][0]; $job->glm_jobs_enddate = $custom['glm_jobs_enddate'][0]; $job->glm_jobs_contact = $custom['glm_jobs_contact'][0]; @@ -493,6 +496,10 @@ class glm_employment_front $job->href = $current_url . ((strpos($current_url, '?')) ? '&' : '?') . "job=" . $job->ID; + if ($iterator == $totalJobs) { + $job->end = true; + } + ++$iterator; } include $this->frontViewDir . '/jobList.php'; return; diff --git a/views/front/jobList.php b/views/front/jobList.php index 71db430..1cd1cc4 100644 --- a/views/front/jobList.php +++ b/views/front/jobList.php @@ -2,7 +2,7 @@

List Jobs

-
+

post_title;?>

Status: glm_jobs_status;?>
Full Job Description