replacing keywords in files
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 8 Sep 2017 19:54:51 +0000 (15:54 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 8 Sep 2017 19:54:51 +0000 (15:54 -0400)
replacing some left over keywords and setting up the admin view files with the admin
models

classes/data/dataJobTitles.php
classes/data/dataJobs.php
css/admin.css
models/admin/jobs/index.php
models/front/jobs/list.php
views/admin/jobs/edit.html
views/admin/jobs/index.html
views/front/jobs/list.html

index 1e805be..b441a03 100644 (file)
@@ -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 (
index 62efcea..39b3882 100644 (file)
@@ -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'
index d272dc7..1f6797d 100644 (file)
@@ -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;
     
 }
index d0861b6..94a72c9 100644 (file)
@@ -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 '<pre>', print_r($report), '</pre>';
-                $this->report_id = $report['fieldData']['id'];
+                $job = $this->insertEntry();
+//               echo '<pre>', print_r($job), '</pre>';
+                $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/',
             
         );
 
index f112256..4bbede8 100644 (file)
@@ -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
index 4795973..0350dc7 100644 (file)
 {include file='admin/header.html'}
 
-{if ($option == 'add' || $haveReport)}
+{if ($option == 'add' || $haveJob)}
 
-    <a href="{$thisUrl}?page={$thisPage}&glm_action=index" class="button button-secondary glm-button glm-right">Return to Reports List</a>
+    <a href="{$thisUrl}?page={$thisPage}&glm_action=index" class="button button-secondary glm-button glm-right">Return to jobs List</a>
 
   {if $option == 'edit' || $option == 'update'}
-    <a id="deleteReportButton" class="button button-secondary glm-button glm-right">Delete this Report</a>
+    <a id="deleteJobButton" class="button button-secondary glm-button glm-right">Delete this Job</a>
     <h2>Edit Job Postings
   {else}
     <h2>Add New Job Postings
   {/if}
         &nbsp;&nbsp;&nbsp;
-        {if $reportUpdated}<span class="glm-notice glm-flash-updated">Obit Updated</span>{/if}
-        {if $reportUpdateError}<span class="glm-error glm-flash-updated">Obit Update Error</span>{/if}
-        {if $reportAdded}<span class="glm-notice glm-flash-updated">Obit Added</span>{/if}
-        {if $reportAddError}<span class="glm-error glm-flash-updated">Obit Add Error</span>{/if}
+        {if $jobUpdated}<span class="glm-notice glm-flash-updated">Job Updated</span>{/if}
+        {if $jobUpdateError}<span class="glm-error glm-flash-updated">Job Update Error</span>{/if}
+        {if $jobAdded}<span class="glm-notice glm-flash-updated">Job Added</span>{/if}
+        {if $jobAddError}<span class="glm-error glm-flash-updated">Job Add Error</span>{/if}
     </h2>
 
-  {if $reportUpdateError || $reportAddError}
-    <h1 class="glm-error">NOTICE: Your report has not yet been submitted.<br>Please select the tabs indicating a problem, correct the indicated fields and resubmit.</h1>
+  {if $jobUpdateError || $jobAddError}
+    <h1 class="glm-error">NOTICE: Your Job has not yet been submitted.<br>Please select the tabs indicating a problem, correct the indicated fields and resubmit.</h1>
   {else}
   {/if}
 
     <form action="{$thisUrl}?page={$thisPage}" method="post" enctype="multipart/form-data">
         <input type="hidden" name="glm_action" value="index">
 
-    {if $haveReport}
+    {if $haveJob}
         <input type="hidden" name="option" value="update">
-        <input type="hidden" name="report" value="{$report.fieldData.id}">
+        <input type="hidden" name="Job" value="{$job.fieldData.id}">
     {else}
         <input type="hidden" name="option" value="insert">
     {/if}
 
        <h2 class="nav-tab-wrapper" style="margin-bottom: 1em;">
-            <a id="glm-report-descr" data-show-table="glm-table-descr" class="glm-report-tab nav-tab nav-tab-active">Job Postings</a>
+            <a id="glm-Job-descr" data-show-table="glm-table-descr" class="glm-Job-tab nav-tab nav-tab-active">Job Postings</a>
         </h2>
 
-        <table id="glm-table-descr" class="glm-admin-table glm-report-table">
+        <table id="glm-table-descr" class="glm-admin-table glm-Job-table">
             <tr>
-                <th {if $report.fieldRequired.report_active}class="glm-required"{/if}>Report Active:</th>
-                <td {if $report.fieldFail.report_active}class="glm-form-bad-input" data-tabid="glm-report-descr"{/if}>
-                    <input type="checkbox" name="report_active" class="" {if $report.fieldData.report_active.value == 1} checked="checked" {/if}>
-                    {if $report.fieldFail.report_active}<p>{$report.fieldFail.report_active}</p>{/if}<br>
+                <th {if $job.fieldRequired.Job_active}class="glm-required"{/if}>Job Active:</th>
+                <td {if $job.fieldFail.Job_active}class="glm-form-bad-input" data-tabid="glm-Job-descr"{/if}>
+                    <input type="checkbox" name="Job_active" class="" {if $job.fieldData.Job_active.value == 1} checked="checked" {/if}>
+                    {if $job.fieldFail.Job_active}<p>{$job.fieldFail.Job_active}</p>{/if}<br>
                 </td>
             </tr>
             <tr>
-                <th {if $report.fieldRequired.report_date}class="glm-required"{/if}>Report Date:</th>
-                <td {if $report.fieldFail.report_date}class="glm-form-bad-input" data-tabid="glm-report-descr"{/if}>
-                    <input type="text" name="report_date" value="{$report.fieldData.report_date.date}" class="glm-form-text-input-short groom-date">
-                    {if $report.fieldFail.report_date.date}<p>{$report.fieldFail.report_date.date}</p>{/if}<br>
+                <th {if $job.fieldRequired.Job_date}class="glm-required"{/if}>Job Date:</th>
+                <td {if $job.fieldFail.Job_date}class="glm-form-bad-input" data-tabid="glm-Job-descr"{/if}>
+                    <input type="text" name="Job_date" value="{$job.fieldData.Job_date.date}" class="glm-form-text-input-short groom-date">
+                    {if $job.fieldFail.Job_date.date}<p>{$job.fieldFail.Job_date.date}</p>{/if}<br>
                 </td>
             </tr>
             <tr>
-                <th {if $report.fieldRequired.report_blurb}class="glm-required"{/if}>Report Blurb:</th>
-                <td {if $report.fieldFail.report_blurb}class="glm-form-bad-input" data-tabid="glm-report-descr"{/if}>
-                    <input type="text" name="report_blurb" value="{$report.fieldData.report_blurb}" class="glm-form-text-input-short">
-                    {if $report.fieldFail.report_blurb}<p>{$report.fieldFail.report_blurb}</p>{/if}<br>
+                <th {if $job.fieldRequired.Job_blurb}class="glm-required"{/if}>Job Blurb:</th>
+                <td {if $job.fieldFail.Job_blurb}class="glm-form-bad-input" data-tabid="glm-Job-descr"{/if}>
+                    <input type="text" name="Job_blurb" value="{$job.fieldData.Job_blurb}" class="glm-form-text-input-short">
+                    {if $job.fieldFail.Job_blurb}<p>{$job.fieldFail.Job_blurb}</p>{/if}<br>
                 </td>
             </tr>
             <tr>
-                <th {if $report.fieldRequired.report_notes}class="glm-required"{/if}>Report Notes:</th>
-                <td {if $report.fieldFail.report_notes}class="glm-form-bad-input" data-tabid="glm-report-descr"{/if}>
-                    <textarea name="report_notes" class="glm-form-text-input-medium trail-notes"> {$report.fieldData.report_notes}</textarea>
-                    {if $report.fieldFail.report_notes}<p>{$report.fieldFail.report_notes}</p>{/if}<br>
+                <th {if $job.fieldRequired.Job_notes}class="glm-required"{/if}>Job Notes:</th>
+                <td {if $job.fieldFail.Job_notes}class="glm-form-bad-input" data-tabid="glm-Job-descr"{/if}>
+                    <textarea name="Job_notes" class="glm-form-text-input-medium job-notes"> {$job.fieldData.Job_notes}</textarea>
+                    {if $job.fieldFail.Job_notes}<p>{$job.fieldFail.Job_notes}</p>{/if}<br>
                 </td>
             </tr>
         </table>
-        <div id="report-tabs">
-            <ul>
-                <li><a href="#tabs-1">Big Bay Trail</a></li>
-                <li><a href="#tabs-2">Alston Trail</a></li>
-                <li><a href="#tabs-3">Nestoria Trail</a></li>
-                <li><a href="#tabs-4">Chassell Trail</a></li>
-                <li><a href="#tabs-5">Pinery lakes CC Ski Trail</a></li>
-            </ul>
-                {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'}  
-        </div>
-        <input id="updateReport" type="submit" value="{if $haveReport}Update Report{else}Save New Report{/if}">
+        <input id="updateJob" type="submit" value="{if $haveJob}Update Job{else}Save New Job{/if}">
     </form>
 
 {else} <!-- Can just display -->
 
-    <h3>Sorry, no report found or permission not granted.</h3>
+    <h3>Sorry, no Job found or permission not granted.</h3>
 
 {/if}
 
-    <!-- Delete Obit Dialog Box -->
+    <!-- Delete Job Dialog Box -->
 
-    <div id="deleteReportDialog" class="glm-dialog-box" title="Delete Obit">
+    <div id="deleteJobDialog" class="glm-dialog-box" title="Delete Job">
         <center>
-            <p><a id="deleteReportCancel" class="button button-primary">Cancel</a></p>
-            <p><input id="deleteReportSubmit" type="submit" value="Delete this report"></p>
+            <p><a id="deleteJobCancel" class="button button-primary">Cancel</a></p>
+            <p><input id="deletejobsubmit" type="submit" value="Delete this Job"></p>
         </center>
         <div class="glm-item-container">
             <p><center><span class="glm-error">WARNING:</span></center></p>
             <p>
-                <span class="glm-warning">Clicking the "Delete this Obit" button above will
-                delete all of the data and images associated with this report.
+                <span class="glm-warning">Clicking the "Delete this Job" button above will
+                delete all of the data and images associated with this Job.
                 </span>
             </p>
             <p>
                 <span class="glm-error">
                     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.
                 </span>
             </p>
         </div>
     </div>
     <script type="text/javascript">
         jQuery(document).ready(function($) {
-            $("#report-tabs").fadeTo("600", 1);
-            $('#report-tabs').tabs();
+            $("#Job-tabs").fadeTo("600", 1);
+            $('#Job-tabs').tabs();
             $('.groom-date').datepicker({
                 showOn: "both",
                 buttonImage: '{$assetsUrl}' + "/calIcon.png",
                 buttonImageOnly: true
             });
-        {if $haveReport}
-            // Delete Report dialog
-            $("#deleteReportDialog").dialog({
+        {if $haveJob}
+            // Delete Job dialog
+            $("#deleteJobDialog").dialog({
                 autoOpen: false,
                 minWidth: 400,
                 dialogClass: "glm-dialog-no-close"
             });
-            $('#deleteReportButton').click( function() {
-                $('#deleteReportDialog').dialog('open');
+            $('#deleteJobButton').click( function() {
+                $('#deleteJobDialog').dialog('open');
             });
-            $('#deleteReportCancel').click( function() {
-                $("#deleteReportDialog").dialog("close");
+            $('#deleteJobCancel').click( function() {
+                $("#deleteJobDialog").dialog("close");
             });
-            $('#deleteReportSubmit').click( function() {
-                window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=index&option=delete&report={$report.fieldData.id}");
+            $('#deletejobsubmit').click( function() {
+                window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=index&option=delete&Job={$job.fieldData.id}");
             });
     {/if}
             
index a82dad3..0edbcd3 100644 (file)
@@ -4,24 +4,24 @@
 
         <tr><td colspan="2">&nbsp;</td></tr>
         <tr>
-            <td class="add-report"><a href="{$thisUrl}?page={$thisPage}&glm_action=index&option=add">New Report</a></td>
+            <td class="add-Job"><a href="{$thisUrl}?page={$thisPage}&glm_action=index&option=add">New Job</a></td>
         </tr>
 
     </table>
-    {if $trailData}
+    {if $jobData}
         
             <table class="glm-admin-table">
                 <tr>
-                    <th>Report Date</th>
-                    <th>Report Blurb</th>
-                    <th>Report Notes</th>
+                    <th>Job Date</th>
+                    <th>Job Blurb</th>
+                    <th>Job Notes</th>
                 </tr>
-            {foreach $trailData as $record=>$data}
+            {foreach $jobData as $record=>$data}
                 <tr>
-                    <td>{$data.report_date.date}</td>
-                    <td>{$data.report_blurb}</td>
-                    <td>{$data.report_notes}</td>
-                    <td><a href="{$thisUrl}?page={$thisPage}&glm_action=index&option=edit&report={$data.id}">Edit</a><a href="{$thisUrl}?page={$thisPage}&glm_action=index&option=delete&report={$data.id}">Delete</a></td>
+                    <td>{$data.Job_date.date}</td>
+                    <td>{$data.Job_blurb}</td>
+                    <td>{$data.Job_notes}</td>
+                    <td><a href="{$thisUrl}?page={$thisPage}&glm_action=index&option=edit&Job={$data.id}">Edit</a><a href="{$thisUrl}?page={$thisPage}&glm_action=index&option=delete&Job={$data.id}">Delete</a></td>
                 </tr>
             {/foreach}
             </table>
@@ -32,7 +32,7 @@
             });
         </script>
     {else if}
-        <div class="no-trail-data"> No Trail Information </div>
+        <div class="no-job-data"> No Job Postings</div>
     {/if}
 {include file='admin/footer.html'}
 
index c14262f..d777f74 100644 (file)
@@ -1,10 +1,10 @@
-{foreach $trailData as $key=>$value}
-    {foreach $value as $id=>$trail}
-        <div id='trail-report-{$id}' class="trail-report">
-            <div class='trail-info'>
-                <span class='report-date'> Report Date: {$trail.report_info.report_date.date|date_format:"%B %e, %Y"}
+{foreach $jobData as $key=>$value}
+    {foreach $value as $id=>$job}
+        <div id='job-Job-{$id}' class="job-Job">
+            <div class='job-info'>
+                <span class='Job-date'> Job Date: {$job.Job_info.Job_date.date|date_format:"%B %e, %Y"}
             </div>
-            <div class="trail-info">
+            <div class="job-info">
                 {include file='front/jobs/parts/bigBay.html'}
                 {include file='front/jobs/parts/alston.html'}
                 {include file='front/jobs/parts/nestoria.html'}