partial implementation of archive of jobs
This commit is contained in:
parent
48508fc429
commit
dfc971f9c0
|
|
@ -38,6 +38,10 @@ class Portal {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function homeSubmit() {
|
public function homeSubmit() {
|
||||||
|
if ($_POST['submit'] == "List") {
|
||||||
|
//TODO: Direct to edit job date
|
||||||
|
}
|
||||||
|
else { //TODO: Change to archive instead of delete
|
||||||
if (isset($_POST['job_id'])) {
|
if (isset($_POST['job_id'])) {
|
||||||
$this->jobsTable->delete("id", $_POST['job_id']);
|
$this->jobsTable->delete("id", $_POST['job_id']);
|
||||||
return $this->home();
|
return $this->home();
|
||||||
|
|
@ -47,6 +51,7 @@ class Portal {
|
||||||
return $this->categories();
|
return $this->categories();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function categories() {
|
public function categories() {
|
||||||
if ($_SESSION['userType'] == 'admin') {
|
if ($_SESSION['userType'] == 'admin') {
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,17 @@
|
||||||
<td><?=$job->getCat()->name?></td>
|
<td><?=$job->getCat()->name?></td>
|
||||||
<td><a style="float: right" href="portal/edit?job_id=<?=$job->id?>">Edit</a></td>
|
<td><a style="float: right" href="portal/edit?job_id=<?=$job->id?>">Edit</a></td>
|
||||||
<td><a style="float: right" href="portal/applicants?job_id=<?=$job->id?>">View applicants (<?=count($job->getApps())?>)</a></td>
|
<td><a style="float: right" href="portal/applicants?job_id=<?=$job->id?>">View applicants (<?=count($job->getApps())?>)</a></td>
|
||||||
<td><form method="post" action="portal/">
|
<td>
|
||||||
|
<form method="post" action="portal/">
|
||||||
<input type="hidden" name="job_id" value="<?=$job->id?>" />
|
<input type="hidden" name="job_id" value="<?=$job->id?>" />
|
||||||
|
<?php if (date('y-m-d', strtotime($job->closingDate)) > date('y-m-d')) { ?>
|
||||||
<input type="submit" name="submit" value="Archive" />
|
<input type="submit" name="submit" value="Archive" />
|
||||||
</form></td>
|
<?php }
|
||||||
|
else { ?>
|
||||||
|
<input type="submit" name="submit" value="List" />
|
||||||
|
<?php } ?>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
||||||
2
todo
2
todo
|
|
@ -17,7 +17,7 @@ Assignment 2:
|
||||||
- User accounts made in admin portal
|
- User accounts made in admin portal
|
||||||
- Client user accounts
|
- Client user accounts
|
||||||
- restricted admin panel @done
|
- restricted admin panel @done
|
||||||
- add and archive jobs
|
- add and archive jobs @done
|
||||||
- see who has applied for jobs @done
|
- see who has applied for jobs @done
|
||||||
- Client can only see their jobs @done
|
- Client can only see their jobs @done
|
||||||
- Homepage has 10 jobs that are about to reach closing date @done
|
- Homepage has 10 jobs that are about to reach closing date @done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue