- Your Profile was successfully updated (remove word "your", which doesn't work...
authorharris wong <hwong@ocad.ca>
Thu, 29 Jul 2010 19:09:02 +0000 (19:09 -0000)
committerharris wong <hwong@ocad.ca>
Thu, 29 Jul 2010 19:09:02 +0000 (19:09 -0000)
 -When job post approval admin preferecne is on, message after posting a job should state "Job posted successfully." when approve is off, and add "The job posting will appear when it has been approved" when approve is turned on

 -As admin, when viewing jobs to be approved, use "approved" or "unapproved" rather than confirmed/unconfirmed (terms already exist in ATutor language). Makes the language consistent with the way it is used elsewhere in ATutor

 -When clicking on edit, to approve a job post, the post is listed as confirmed (approved), while viewing it in the table before editing, it lists as unconfirmed (unapproved). Labels are backwards.

 -In the admin job board screen, the employer is listed as the user who posted the job, It should list the company the person posting the job belongs to. Same on the main Job Board screen. List the company, not the user.

 -In the same admin screen, when one category is listed, a semi colon appear after it. When one category is listed, use no separator, when more than one, use a comma to separate categories (but not one at the end)

 -Employer logout link should be available on all screens while logged in as an employer, top right where it is on the employer home screen, and redirect to the job_board/index.php from wherever logout occurs.

-I find myself wanting to click on the ATutor login/logout link when viewing as an employer. Instead of the words login/logout, lets use "Employer sign-in"/"Employer sign-out" to distinguish them more clearly.

13 files changed:
mods/job_board/admin/edit_employer.php
mods/job_board/employer/add_new_post.php
mods/job_board/employer/edit_post.php
mods/job_board/employer/home.php
mods/job_board/employer/profile.php
mods/job_board/employer/view_post.php
mods/job_board/include/html/admin/jb_edit_post.tmpl.php
mods/job_board/include/html/admin/jb_index.tmpl.php
mods/job_board/include/html/employer/jb_employer_header.tmpl.php [new file with mode: 0644]
mods/job_board/include/html/employer/jb_home.tmpl.php
mods/job_board/include/html/jb_index.tmpl.php
mods/job_board/module.css
mods/job_board/module.sql

index bf4ab06..a84c8c0 100644 (file)
@@ -69,7 +69,7 @@ if ($_POST['submit']){
        $employer->setApprovalState($approval_state);
 
        if ($employer->updateProfile($name, $company, $email, $website)){
-               $msg->addFeedback('PROFILE_UPDATED');
+               $msg->addFeedback('JB_PROFILE_UPDATED');
        } else {
                $msg->addError('DB_NOT_UPDATED');
        }
index fed507c..5319706 100644 (file)
@@ -48,7 +48,13 @@ if(isset($_POST['submit'])){
        $jb_closing_date = $year.'-'.$month.'-'.$day.' '.$hour.':'.$min.':00';
 
        $job->addJob($_POST['title'], $_POST['jb_description'], $_POST['jb_categories'], $_POST['jb_is_public'], $jb_closing_date);
-       $msg->addFeedback('JB_POST_ADDED_SUCCESSFULLY');
+       
+       if ($_config['jb_posting_approval']==1){
+           //if the post require approval.
+           $msg->addFeedback('JB_POST_PENDING');
+       } else {
+           $msg->addFeedback('JB_POST_ADDED_SUCCESSFULLY');
+       }
        header('Location: home.php');
        exit;
 }
@@ -73,6 +79,7 @@ if (!isset($_REQUEST['setvisual']) && !isset($_REQUEST['settext'])) {
 }
 
 include(AT_INCLUDE_PATH.'header.inc.php');
+$savant->display('employer/jb_employer_header.tmpl.php');
 $savant->assign('categories', $all_categories);
 $savant->display('employer/jb_add_new_post.tmpl.php');
 include(AT_INCLUDE_PATH.'footer.inc.php'); 
index 7af9ead..4d722cc 100644 (file)
@@ -84,6 +84,7 @@ if (!isset($_REQUEST['setvisual']) && !isset($_REQUEST['settext'])) {
 }
 
 include(AT_INCLUDE_PATH.'header.inc.php');
+$savant->display('employer/jb_employer_header.tmpl.php');
 $savant->assign('job', $job);
 $savant->assign('categories', $job->getCategories());
 $savant->assign('job_post', $job_post);
index 8b76a29..9c603a9 100644 (file)
@@ -51,6 +51,7 @@ if ($_GET['order']==''){
 }
 
 include(AT_INCLUDE_PATH.'header.inc.php');
+$savant->display('employer/jb_employer_header.tmpl.php');
 echo '<div class="pageinator_box">';
 print_paginator($page, sizeof($all_job_posts), $page_string, AT_JB_ROWS_PER_PAGE);
 echo '</div>';
index 728c63a..a0f9879 100644 (file)
@@ -63,7 +63,7 @@ if ($_POST['submit']){
        } 
 
        if ($employer->updateProfile($name, $company, $email, $website)){
-               $msg->addFeedback('PROFILE_UPDATED');
+               $msg->addFeedback('JB_PROFILE_UPDATED');
        } else {
                $msg->addFeedback('DB_NOT_UPDATED');
        }
@@ -73,6 +73,7 @@ if ($_POST['submit']){
 
 include(AT_INCLUDE_PATH.'header.inc.php');
 $msg->printConfirm();
+$savant->display('employer/jb_employer_header.tmpl.php');
 $savant->assign('name', $employer->getName());
 $savant->assign('company', $employer->getCompany());
 $savant->assign('email', $employer->getEmail());
index 814bbb7..82e58dc 100644 (file)
@@ -54,6 +54,7 @@ if (isset($_POST['submit_no'])) {
 
 include(AT_INCLUDE_PATH.'header.inc.php');
 $msg->printConfirm();
+$savant->display('employer/jb_employer_header.tmpl.php');
 $savant->assign('job_obj', $job);
 $savant->assign('job_post', $job_post);
 $savant->display('jb_view_post.tmpl.php');
index 420ad05..be68375 100644 (file)
@@ -25,11 +25,11 @@ if (($_POST['setvisual'] && !$_POST['settext']) || $_GET['setvisual']) {
                        <input type="checkbox" id="jb_is_public" name="jb_is_public" <?php echo ($this->job_post['is_public']==1)?'checked="checked"':''; ?>/>
                </div>
                <div class="row">
-                       <label><?php echo _AT('jb_approval_state'); ?></label>                  
-                       <label for="jb_approval_state_<?php echo AT_JB_POSTING_STATUS_UNCONFIRMED; ?>"><?php echo _AT('jb_approval_state_confirmed'); ?></label>
-                       <input type="radio" id="jb_approval_state_<?php echo AT_JB_POSTING_STATUS_UNCONFIRMED; ?>" name="jb_approval_state" value="<?php echo AT_JB_POSTING_STATUS_UNCONFIRMED; ?>" <?php echo ($this->job_post['approval_state']==AT_JB_POSTING_STATUS_UNCONFIRMED)?'checked="checked"':''; ?> />                      
-                       <label for="jb_approval_state_<?php echo AT_JB_POSTING_STATUS_CONFIRMED; ?>"><?php echo _AT('jb_approval_state_unconfirmed'); ?></label>
+                       <label><?php echo _AT('jb_approval_state'); ?></label>                                          
+                       <label for="jb_approval_state_<?php echo AT_JB_POSTING_STATUS_CONFIRMED; ?>"><?php echo _AT('jb_approval_state_confirmed'); ?></label>
                        <input type="radio" id="jb_approval_state_<?php echo AT_JB_POSTING_STATUS_CONFIRMED; ?>" name="jb_approval_state" value="<?php echo AT_JB_POSTING_STATUS_CONFIRMED; ?>" <?php echo ($this->job_post['approval_state']==AT_JB_POSTING_STATUS_CONFIRMED)?'checked="checked"':''; ?> />
+                       <label for="jb_approval_state_<?php echo AT_JB_POSTING_STATUS_UNCONFIRMED; ?>"><?php echo _AT('jb_approval_state_unconfirmed'); ?></label>
+                       <input type="radio" id="jb_approval_state_<?php echo AT_JB_POSTING_STATUS_UNCONFIRMED; ?>" name="jb_approval_state" value="<?php echo AT_JB_POSTING_STATUS_UNCONFIRMED; ?>" <?php echo ($this->job_post['approval_state']==AT_JB_POSTING_STATUS_UNCONFIRMED)?'checked="checked"':''; ?> />                      
                </div>
                <div class="row">
                        <label for="jb_closing_date"><?php echo _AT('jb_closing_date'); ?></label>
@@ -79,4 +79,4 @@ if (($_POST['setvisual'] && !$_POST['settext']) || $_GET['setvisual']) {
                        <input class="button" type="submit" name="submit" value="<?php echo _AT('submit'); ?>"/>
                </div>
        </form>
-</div>
\ No newline at end of file
+</div>
index 05e6e58..8dd1cda 100644 (file)
                        <td><a href="<?php echo AT_JB_BASENAME.'admin/view_post.php?jid='.$row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
                        <td><?php 
                                        $employer = new Employer($row['employer_id']);
-                                       echo $employer->getName(); 
+                                       echo $employer->getCompany(); 
                                ?>
                        </td>
                        <td>                            
                                <?php if(is_array($row['categories'])):
-                                               foreach($row['categories'] as $category): 
+                                               $category_str = '';
+                                               foreach($row['categories'] as $category){
+                                                   $category_str .= $this->job_obj->getCategoryNameById($category).', ';
+                        }
+                        $category_str = substr($category_str, 0, -2);
                                ?>
-                               <span><?php echo $this->job_obj->getCategoryNameById($category);?></span> ; 
-                               <?php endforeach; else: ?>
+                               <span><?php echo $category_str;?></span>
+                               <?php else: ?>
                                <span><?php echo $this->job_obj->getCategoryNameById($row['categories']);?></span>
                                <?php endif; ?>
                        </td>
                        <td><?php echo AT_DATE(_AT("announcement_date_format"), $row['created_date']); ?></td>
                        <td><?php echo AT_DATE(_AT("announcement_date_format"), $row['closing_date']); ?></td>
-                       <td><?php echo ($row['approval_state']==AT_JB_POSTING_STATUS_CONFIRMED)?_AT('jb_confirmed'):_AT('jb_unconfirmed'); ?></td>
+                       <td><?php echo ($row['approval_state']==AT_JB_POSTING_STATUS_CONFIRMED)?_AT('jb_approval_state_confirmed'):_AT('jb_approval_state_unconfirmed'); ?></td>
                        <td><a href="<?php echo AT_JB_BASENAME . 'admin/edit_post.php?jid='.$row['id']; ?>" title="<?php echo _AT('jb_click_to_edit'); ?>"><?php echo _AT('edit');?></a> | <a href="<?php echo AT_JB_BASENAME . 'admin/view_post.php?action=delete'.SEP.'jid='.$row['id']; ?>" title="<?php echo _AT('jb_click_to_delete'); ?>"><?php echo _AT('delete'); ?></a></td>
                </tr>
                <?php endforeach; ?>
@@ -42,4 +46,4 @@
                        <tr><td colspan="7"><?php echo _AT('none_found'); ?></td></tr>
                <?php endif; ?>
        </tbody>
-</table>
\ No newline at end of file
+</table>
diff --git a/mods/job_board/include/html/employer/jb_employer_header.tmpl.php b/mods/job_board/include/html/employer/jb_employer_header.tmpl.php
new file mode 100644 (file)
index 0000000..6479b4b
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="jb_add_posting">
+       <?php if(isset($_SESSION['jb_employer_id']) && $_SESSION['jb_employer_id'] > 0): ?>
+       <a href="<?php echo AT_JB_BASENAME;?>employer/home.php"><?php echo _AT('jb_employer_home');?></a> | 
+       <a href="<?php echo AT_JB_BASENAME;?>employer/logout.php"><?php echo _AT('jb_logout');?></a>
+       <?php else: ?>
+       <a href="<?php echo AT_JB_BASENAME;?>employer/login.php"><?php echo _AT('jb_login');?></a> | 
+       <a href="<?php echo AT_JB_BASENAME;?>employer/registration.php"><?php echo _AT('jb_employer_registration');?></a>
+       <?php endif; ?>
+</div>
index 1721834..335d5d5 100644 (file)
                                foreach ($this->job_posts as $id=>$row): 
                ?>
                <tr>
-                       <td><a href="<?php echo AT_JB_BASENAME.'view_post.php?jid='.$row['id'];?>" title="<?php echo _AT('jb_view_job_post'); ?>"><?php echo $row['id']; ?></a></td>
-                       <td><a href="<?php echo AT_JB_BASENAME.'view_post.php?jid='.$row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
+                       <td><a href="<?php echo AT_JB_BASENAME.'employer/view_post.php?jid='.$row['id'];?>" title="<?php echo _AT('jb_view_job_post'); ?>"><?php echo $row['id']; ?></a></td>
+                       <td><a href="<?php echo AT_JB_BASENAME.'employer/view_post.php?jid='.$row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
                        <td><?php 
                                                $employer = new Employer($row['employer_id']);
-                                               echo $employer->getName(); 
+                                               echo $employer->getCompany(); 
                                        ?>
                        </td>
                        <td>                            
                                <?php if(is_array($row['categories'])):
-                                               foreach($row['categories'] as $category): 
+                                               $category_str = '';
+                                               foreach($row['categories'] as $category){
+                                                   $category_str .= $this->job_obj->getCategoryNameById($category).', ';
+                        }
+                        $category_str = substr($category_str, 0, -2);
                                ?>
-                               <span><?php echo $this->job_obj->getCategoryNameById($category);?></span> ; 
-                               <?php endforeach; else: ?>
+                               <span><?php echo $category_str;?></span>
+                               <?php else: ?>
                                <span><?php echo $this->job_obj->getCategoryNameById($row['categories']);?></span>
                                <?php endif; ?>
                        </td>
index d563e28..42f3dd0 100644 (file)
@@ -35,15 +35,19 @@ if ($search_string!=''){
                                <td><a href="<?php echo AT_JB_BASENAME.'view_post.php?jid='.$row['id'];?>" title="<?php echo $row['title']; ?>"><?php echo $row['title']; ?></a></td>
                                <td><?php 
                                                $employer = new Employer($row['employer_id']);
-                                               echo $employer->getName(); 
+                                               echo $employer->getCompany(); 
                                        ?>
                                </td>
                                <td>
                                <?php if(is_array($row['categories'])):
-                                               foreach($row['categories'] as $category): 
+                                       $category_str = '';
+                                               foreach($row['categories'] as $category){
+                                                   $category_str .= $this->job_obj->getCategoryNameById($category).', ';
+                        }
+                        $category_str = substr($category_str, 0, -2);
                                ?>
-                               <span><?php echo $this->job_obj->getCategoryNameById($category);?></span> ; 
-                               <?php endforeach; else: ?>
+                               <span><?php echo $category_str;?></span>
+                               <?php else: ?>
                                <span><?php echo $this->job_obj->getCategoryNameById($row['categories']);?></span>
                                <?php endif; ?>
                                </td>
index 459a37e..ffa428d 100644 (file)
@@ -4,6 +4,7 @@ div.jb_head{
 }
 div.jb_add_posting{
        float: right;
+       padding-right: 2em;
 }
 div.jb_search{
        width: 70%;
index bca25ee..47ade29 100644 (file)
@@ -84,8 +84,8 @@ INSERT INTO `language_text` VALUES ('en', '_module','jb_company_description','Co
 INSERT INTO `language_text` VALUES ('en', '_module','jb_post_description','Description',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_post_description_note','Description should include Job Overview, Responsibilities, Qualifications, Contact Information',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_closing_date','Closing Date',NOW(),'');
-INSERT INTO `language_text` VALUES ('en', '_module','jb_login','Post a Job',NOW(),'');
-INSERT INTO `language_text` VALUES ('en', '_module','jb_logout','Logout',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_module','jb_login','Employer sign-in',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_module','jb_logout','Employer sign-out',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_employer_registration','Employer Registration',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_any_categories','Any Categories',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_employer_login','Employer Login',NOW(),'');
@@ -106,8 +106,9 @@ INSERT INTO `language_text` VALUES ('en', '_module','jb_website','Website',NOW()
 INSERT INTO `language_text` VALUES ('en', '_module','jb_confirmed','Confirmed',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_unconfirmed','Unconfirmed',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_approval_state','Approval State',NOW(),'');
-INSERT INTO `language_text` VALUES ('en', '_module','jb_approval_state_confirmed','Confirmed',NOW(),'');
-INSERT INTO `language_text` VALUES ('en', '_module','jb_approval_state_unconfirmed','Unconfirmed',NOW(),'');
+
+INSERT INTO `language_text` VALUES ('en', '_module','jb_approval_state_confirmed','Approved',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_module','jb_approval_state_unconfirmed','Disapproved',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_required_posting_approval','New posting requires approval',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_admin_add_category_blub','To add new categories for the job posting, type the category name in the text field and click "Save".',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_module','jb_admin_edit_categories_blub','The list below are the current categories within the system.  You may edit the item by clicking on them, or delete them by clicking on "Delete".',NOW(),'');
@@ -130,11 +131,13 @@ INSERT INTO `language_text` VALUES ('en', '_module','jb_click_to_delete','Click
 INSERT INTO `language_text` VALUES ('en', '_module','jb_required_posting_approval','Does job post need to be approved before listing?',NOW(),'');
 
 # Module Messages
-INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_JB_POST_ADDED_SUCCESSFULLY','Job Post added successfully.',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_JB_POST_ADDED_SUCCESSFULLY','Job posted added successfully.',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_JB_POST_PENDING','The job posting will appear when it has been approved.',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_JB_POST_DELETED','Job Post deleted successfully.',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_JB_POST_UPDATED_SUCCESS','Job Post updated successfully.',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_JB_CATEGORY_ADDED_SUCCESSFULLY','Category added successfully.',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_JB_CATEGORY_DELETED','Category deleted successfully.',NOW(),'');
+INSERT INTO `language_text` VALUES ('en', '_msgs','AT_FEEDBACK_JB_PROFILE_UPDATED','Profile was successfully updated.',NOW(),'');
 
 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_ERROR_JB_MISSING_FIELDS','Email, username, company name, employer name cannot be empty.',NOW(),'');
 INSERT INTO `language_text` VALUES ('en', '_msgs','AT_ERROR_JB_EXISTING_INFO','Username or email has already been used.  Please choose another one. ',NOW(),'');
@@ -154,4 +157,4 @@ INSERT INTO `jb_categories` (name) VALUES ('Pharmacy and Nutrition');
 INSERT INTO `jb_categories` (name) VALUES ('Teaching');
 INSERT INTO `jb_categories` (name) VALUES ('Performing Arts');
 INSERT INTO `jb_categories` (name) VALUES ('Psychology, Social Work, Counseling, Religion');
-INSERT INTO `jb_categories` (name) VALUES ('Others');
\ No newline at end of file
+INSERT INTO `jb_categories` (name) VALUES ('Others');