2023-01-25 14:25:37 +00:00
|
|
|
<h2>Jobs</h2>
|
2023-02-04 21:34:17 +00:00
|
|
|
<a class="new" href="/portal/addJob">Add new job</a>
|
2023-01-25 16:16:14 +00:00
|
|
|
<form method="get" action="/portal">
|
2023-01-25 16:06:44 +00:00
|
|
|
<label for="filter">Filter:</label>
|
|
|
|
|
<select name="filter">
|
|
|
|
|
<?php foreach ($cats as $cat) { ?>
|
|
|
|
|
<option value="<?=$cat->id?>"><?=$cat->name?></option>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</select>
|
|
|
|
|
<input type="submit" name="submit" value="filter" />
|
2023-01-25 16:27:08 +00:00
|
|
|
</form>
|
2023-01-25 14:25:37 +00:00
|
|
|
<table>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Title</th>
|
|
|
|
|
<th style="width: 15%">Salary</th>
|
2023-01-25 15:52:32 +00:00
|
|
|
<th>Category</th>
|
2023-02-05 13:50:57 +00:00
|
|
|
<th>Archived</th>
|
2023-01-25 14:25:37 +00:00
|
|
|
<th style="width: 5%"> </th>
|
|
|
|
|
<th style="width: 15%"> </th>
|
|
|
|
|
<th style="width: 5%"> </th>
|
|
|
|
|
<th style="width: 5%"> </th>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php foreach ($jobs as $job) { ?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><?=$job->title?></td>
|
|
|
|
|
<td><?=$job->salary?></td>
|
2023-01-25 15:52:32 +00:00
|
|
|
<td><?=$job->getCat()->name?></td>
|
2023-02-05 13:50:57 +00:00
|
|
|
<td>
|
|
|
|
|
<?php if ($job->archived == 'n') {
|
|
|
|
|
echo 'no';
|
|
|
|
|
}
|
|
|
|
|
if ($job->archived == 'y') {
|
|
|
|
|
echo 'yes';
|
|
|
|
|
} ?>
|
|
|
|
|
</td>
|
2023-01-25 15:37:06 +00:00
|
|
|
<td><a style="float: right" href="portal/edit?job_id=<?=$job->id?>">Edit</a></td>
|
2023-02-05 12:07:41 +00:00
|
|
|
<td><a style="float: right" href="portal/applicants?job_id=<?=$job->id?>">View applicants (<?=count($job->getApps())?>)</a></td>
|
2023-02-05 13:13:12 +00:00
|
|
|
<td>
|
|
|
|
|
<form method="post" action="portal/">
|
|
|
|
|
<input type="hidden" name="job_id" value="<?=$job->id?>" />
|
2023-02-05 13:50:57 +00:00
|
|
|
<?php if ($job->archived == 'n') { ?>
|
2023-02-05 13:13:12 +00:00
|
|
|
<input type="submit" name="submit" value="Archive" />
|
|
|
|
|
<?php }
|
2023-02-05 13:50:57 +00:00
|
|
|
else if ($job->archived == 'y') { ?>
|
2023-02-05 13:13:12 +00:00
|
|
|
<input type="submit" name="submit" value="List" />
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</form>
|
|
|
|
|
</td>
|
2023-01-25 14:25:37 +00:00
|
|
|
</tr>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</thead>
|
|
|
|
|
</table>
|