From: Anthony Talarico Date: Wed, 1 Aug 2018 14:53:02 +0000 (-0400) Subject: adding the management settings for page id to the detail page as well X-Git-Tag: v1.0.0~1^2~4 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=7cf68d2a8faba602fbc699b979cbb03f379a2b8e;p=WP-Plugins%2Fglm-member-db-jobs.git adding the management settings for page id to the detail page as well detail page needs the page id for the action url in the search dropdown --- diff --git a/models/front/jobs/detail.php b/models/front/jobs/detail.php index 63248f4..8d07faa 100644 --- a/models/front/jobs/detail.php +++ b/models/front/jobs/detail.php @@ -106,6 +106,14 @@ class GlmMembersFront_jobs_detail extends GlmDatajobs { $job_titles = new GlmDataJobTitles($this->wpdb,$this->config); $job_titles = $job_titles->getList(); + $listUrl = GLM_MEMBERS_JOBS_SITE_BASE_URL ."/job-postings"; + + $sql = "SELECT list_page_id FROM " . GLM_MEMBERS_JOBS_PLUGIN_DB_PREFIX . "management"; + $list_page_id = $this->wpdb->get_results($sql, 'ARRAY_A'); + + if(!empty($list_page_id)){ + $listUrl = get_permalink($list_page_id[0]['list_page_id']); + } $success_message = ""; $option = false; @@ -136,6 +144,7 @@ class GlmMembersFront_jobs_detail extends GlmDatajobs 'jobTitles' => $job_titles, 'siteBaseUrl' => GLM_MEMBERS_JOBS_SITE_BASE_URL, 'currentUrl' => GLM_MEMBERS_JOBS_PLUGIN_CURRENT_URL, + 'listUrl' => $listUrl ); // Return status, any suggested view, and any data to controller diff --git a/views/front/jobs/detail.html b/views/front/jobs/detail.html index 1e3f2c9..0371323 100644 --- a/views/front/jobs/detail.html +++ b/views/front/jobs/detail.html @@ -1,6 +1,6 @@