From: Anthony Talarico Date: Fri, 8 Sep 2017 19:54:51 +0000 (-0400) Subject: replacing keywords in files X-Git-Tag: v1.0.0~1^2~39 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=177c83ec8faf97d77b208f47b34c568cbb68d050;p=WP-Plugins%2Fglm-member-db-jobs.git replacing keywords in files replacing some left over keywords and setting up the admin view files with the admin models --- diff --git a/classes/data/dataJobTitles.php b/classes/data/dataJobTitles.php index 1e805be..b441a03 100644 --- a/classes/data/dataJobTitles.php +++ b/classes/data/dataJobTitles.php @@ -112,7 +112,7 @@ class GlmDatajobTitles extends GlmDataAbstract * Table Name */ - $this->table = GLM_MEMBERS_JOBS_PLUGIN_DB_PREFIX . 'reports'; + $this->table = GLM_MEMBERS_JOBS_PLUGIN_DB_PREFIX . 'jobs'; // -- Conditions Table //CREATE TABLE {prefix}conditions ( diff --git a/classes/data/dataJobs.php b/classes/data/dataJobs.php index 62efcea..39b3882 100644 --- a/classes/data/dataJobs.php +++ b/classes/data/dataJobs.php @@ -112,7 +112,7 @@ class GlmDatajobs extends GlmDataAbstract * Table Name */ - $this->table = GLM_MEMBERS_JOBS_PLUGIN_DB_PREFIX . 'reports'; + $this->table = GLM_MEMBERS_JOBS_PLUGIN_DB_PREFIX . 'jobs'; // -- Conditions Table //CREATE TABLE {prefix}conditions ( @@ -229,7 +229,7 @@ class GlmDatajobs extends GlmDataAbstract 'member' => array ( 'field' => 'member', 'type' => 'pointer', - 'p_table' => GLM_MEMBERS_MEMBERS_PLUGIN_DB_PREFIX . 'members', + 'p_table' => GLM_MEMBERS_PLUGIN_DB_PREFIX . 'members', 'p_field' => 'name', 'p_orderby' => 'name', 'use' => 'a' diff --git a/css/admin.css b/css/admin.css index d272dc7..1f6797d 100644 --- a/css/admin.css +++ b/css/admin.css @@ -1,21 +1,21 @@ -#report-tabs{ +#Job-tabs{ opacity: 0; max-width: 725px; } -.trail-notes{ +.job-notes{ height: 100px; } -.condition-label,.trail-label{ +.condition-label,.job-label{ margin-bottom: 5px; } .ui-datepicker-trigger{ margin-left: 5px; position: absolute; } -.ui-tabs-panel .groom-date,.ui-tabs-panel .snow-base,.trail-conditions{ +.ui-tabs-panel .groom-date,.ui-tabs-panel .snow-base,.job-conditions{ margin-bottom: 20px; } -.trail-name{ +.job-name{ margin-bottom: 20px; } diff --git a/models/admin/jobs/index.php b/models/admin/jobs/index.php index d0861b6..94a72c9 100644 --- a/models/admin/jobs/index.php +++ b/models/admin/jobs/index.php @@ -34,12 +34,12 @@ class GlmMembersAdmin_jobs_index extends GlmDatajobs */ public $config; /** - * Report ID + * Job ID * - * @var $report ID + * @var $job ID * @access public */ - public $report_id = false; + public $job_id = false; /* * Constructor @@ -94,55 +94,55 @@ class GlmMembersAdmin_jobs_index extends GlmDatajobs wp_enqueue_script("jquery-ui-tabs"); } $success_message = ""; - $haveReport = false; + $haveJob = false; $option = false; - $report = false; - $reportUpdated = false; - $reportUpdateError = false; - $reportAdded = false; - $reportAddError = false; + $job = false; + $jobUpdated = false; + $jobUpdateError = false; + $jobAdded = false; + $jobAddError = false; if (isset($_REQUEST['option']) && trim($_REQUEST['option']) != '') { $option = $_REQUEST['option']; } - // get the report id for use in the edit, add and delete options - $this->report_id = ( isset( $_REQUEST['report'] ) ? filter_var( $_REQUEST['report'], FILTER_SANITIZE_STRING) : ''); + // get the Job id for use in the edit, add and delete options + $this->Job_id = ( isset( $_REQUEST['Job'] ) ? filter_var( $_REQUEST['Job'], FILTER_SANITIZE_STRING) : ''); - $trail_data = $this->getList(); + $job_data = $this->getList(); switch ($option) { case 'add': - $report = $this->newEntry(); + $job = $this->newEntry(); $view_file = 'edit'; break; case 'insert': - $report = $this->insertEntry(); -// echo '
', print_r($report), '
'; - $this->report_id = $report['fieldData']['id']; + $job = $this->insertEntry(); +// echo '
', print_r($job), '
'; + $this->Job_id = $job['fieldData']['id']; - if ($report['status']) { - $haveReport = true; - $reportAdded = true; + if ($job['status']) { + $haveJob = true; + $jobAdded = true; // Update created timestamp and name slug for URLs - //$this->updateSlug($this->reportID); + //$this->updateSlug($this->JobID); // Get this again so we have the created date - $report = $this->editEntry($this->report_id); + $job = $this->editEntry($this->Job_id); $option = 'edit'; - $reportAdded = true; + $jobAdded = true; } else { $option = 'add'; - $reportAddError = true; + $jobAddError = true; } $view_file = 'edit'; @@ -153,11 +153,11 @@ class GlmMembersAdmin_jobs_index extends GlmDatajobs - $report = $this->editEntry($this->report_id); + $job = $this->editEntry($this->Job_id); - // If we have a good report - if ($report['status']) { - $haveReport = true; + // If we have a good Job + if ($job['status']) { + $haveJob = true; } $view_file = 'edit'; @@ -165,52 +165,52 @@ class GlmMembersAdmin_jobs_index extends GlmDatajobs case 'update': - // Try to update this report - $report = $this->updateEntry($this->report_id); + // Try to update this Job + $job = $this->updateEntry($this->Job_id); // Check if that was successful - if ($report['status']) { - $reportUpdated = true; + if ($job['status']) { + $jobUpdated = true; - $report = $this->editEntry($this->report_id); + $job = $this->editEntry($this->Job_id); } else { - $reportUpdateError = true; + $jobUpdateError = true; } - $haveReport = true; + $haveJob = true; $view_file = 'edit'; break; case 'delete': echo "delte"; - $report = $this->deleteEntry($this->report_id,true); + $job = $this->deleteEntry($this->Job_id,true); - if ($report) { - $reportDeleted = true; + if ($job) { + $jobDeleted = true; } else { - $reportDeleteError = true; + $jobDeleteError = true; } $view_file = "index"; - $trail_data = $this->getList(); + $job_data = $this->getList(); break; default: - $trail_data = $this->getList(); + $job_data = $this->getList(); $view_file = 'index'; break; } // Compile template data $templateData = array( - 'trailData' => $trail_data, - 'haveReport' => $haveReport, - 'reportUpdated' => $reportUpdated, - 'reportUpdateError' => $reportUpdateError, - 'reportAdded' => $reportAdded, - 'reportAddError' => $reportAddError, - 'option' => $option, - 'report' => $report, - 'assetsUrl' => GLM_MEMBERS_JOBS_PLUGIN_URL . 'assets/', + 'jobData' => $job_data, + 'haveJob' => $haveJob, + 'JobUpdated' => $jobUpdated, + 'JobUpdateError' => $jobUpdateError, + 'JobAdded' => $jobAdded, + 'JobAddError' => $jobAddError, + 'option' => $option, + 'Job' => $job, + 'assetsUrl' => GLM_MEMBERS_JOBS_PLUGIN_URL . 'assets/', ); diff --git a/models/front/jobs/list.php b/models/front/jobs/list.php index f112256..4bbede8 100644 --- a/models/front/jobs/list.php +++ b/models/front/jobs/list.php @@ -109,14 +109,14 @@ class GlmMembersFront_jobs_list extends GlmDatajobs $option = $_REQUEST['option']; } - // separate the main report info and the individual details - $trail_data = $this->getList(); - foreach($trail_data as $id=>$record){ + // separate the main Job info and the individual details + $job_data = $this->getList(); + foreach($job_data as $id=>$record){ foreach($record as $key=>$value){ - if(strpos($key, "report") !== false){ - $JOBS['trail_report'][$id]['report_info'][$key] = $value; + if(strpos($key, "Job") !== false){ + $JOBS['trail_Job'][$id]['Job_info'][$key] = $value; } else { - $JOBS['trail_report'][$id]['trail_info'][$key] = $value; + $JOBS['trail_Job'][$id]['trail_info'][$key] = $value; } } } @@ -138,7 +138,7 @@ class GlmMembersFront_jobs_list extends GlmDatajobs // Compile template data $templateData = array( - 'trailData' => $JOBS + 'jobData' => $JOBS ); // Return status, any suggested view, and any data to controller diff --git a/views/admin/jobs/edit.html b/views/admin/jobs/edit.html index 4795973..0350dc7 100644 --- a/views/admin/jobs/edit.html +++ b/views/admin/jobs/edit.html @@ -1,141 +1,127 @@ {include file='admin/header.html'} -{if ($option == 'add' || $haveReport)} +{if ($option == 'add' || $haveJob)} - Return to Reports List + Return to jobs List {if $option == 'edit' || $option == 'update'} - Delete this Report + Delete this Job

Edit Job Postings {else}

Add New Job Postings {/if}     - {if $reportUpdated}Obit Updated{/if} - {if $reportUpdateError}Obit Update Error{/if} - {if $reportAdded}Obit Added{/if} - {if $reportAddError}Obit Add Error{/if} + {if $jobUpdated}Job Updated{/if} + {if $jobUpdateError}Job Update Error{/if} + {if $jobAdded}Job Added{/if} + {if $jobAddError}Job Add Error{/if}

- {if $reportUpdateError || $reportAddError} -

NOTICE: Your report has not yet been submitted.
Please select the tabs indicating a problem, correct the indicated fields and resubmit.

+ {if $jobUpdateError || $jobAddError} +

NOTICE: Your Job has not yet been submitted.
Please select the tabs indicating a problem, correct the indicated fields and resubmit.

{else} {/if}
- {if $haveReport} + {if $haveJob} - + {else} {/if} - +
- - + - - + - - + - - +
Report Active: - - {if $report.fieldFail.report_active}

{$report.fieldFail.report_active}

{/if}
+
Job Active: + + {if $job.fieldFail.Job_active}

{$job.fieldFail.Job_active}

{/if}
Report Date: - - {if $report.fieldFail.report_date.date}

{$report.fieldFail.report_date.date}

{/if}
+
Job Date: + + {if $job.fieldFail.Job_date.date}

{$job.fieldFail.Job_date.date}

{/if}
Report Blurb: - - {if $report.fieldFail.report_blurb}

{$report.fieldFail.report_blurb}

{/if}
+
Job Blurb: + + {if $job.fieldFail.Job_blurb}

{$job.fieldFail.Job_blurb}

{/if}
Report Notes: - - {if $report.fieldFail.report_notes}

{$report.fieldFail.report_notes}

{/if}
+
Job Notes: + + {if $job.fieldFail.Job_notes}

{$job.fieldFail.Job_notes}

{/if}
-
- - {include file='admin/jobs/parts/bigBay.html'} - {include file='admin/jobs/parts/alston.html'} - {include file='admin/jobs/parts/nestoria.html'} - {include file='admin/jobs/parts/chassell.html'} - {include file='admin/jobs/parts/pinery.html'} -
- +
{else} -

Sorry, no report found or permission not granted.

+

Sorry, no Job found or permission not granted.

{/if} - + -
+
-

Cancel

-

+

Cancel

+

WARNING:

- Clicking the "Delete this Obit" button above will - delete all of the data and images associated with this report. + Clicking the "Delete this Job" button above will + delete all of the data and images associated with this Job.

Once deleted, this information will no longer be available and cannot be retrieved! If you are unsure that you want to completely remove this data, consider changing the status - of this report to "Archived" instead. + of this Job to "Archived" instead.

{else if} -
No Trail Information
+
No Job Postings
{/if} {include file='admin/footer.html'} diff --git a/views/front/jobs/list.html b/views/front/jobs/list.html index c14262f..d777f74 100644 --- a/views/front/jobs/list.html +++ b/views/front/jobs/list.html @@ -1,10 +1,10 @@ -{foreach $trailData as $key=>$value} - {foreach $value as $id=>$trail} -
-
- Report Date: {$trail.report_info.report_date.date|date_format:"%B %e, %Y"} +{foreach $jobData as $key=>$value} + {foreach $value as $id=>$job} +
+
+ Job Date: {$job.Job_info.Job_date.date|date_format:"%B %e, %Y"}
-
+
{include file='front/jobs/parts/bigBay.html'} {include file='front/jobs/parts/alston.html'} {include file='front/jobs/parts/nestoria.html'}