54 lines
2.8 KiB
PHP
54 lines
2.8 KiB
PHP
<?= $this->extend('layout/management_layout') ?>
|
|
<?= $this->section('content') ?>
|
|
|
|
<div class="container-fluid mt-4">
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h2>Job Templates</h2>
|
|
<div class="d-flex gap-2">
|
|
<a href="<?= site_url('administrator/job-postings/positions') ?>" class="btn btn-outline-secondary">Open Positions</a>
|
|
<a href="<?= site_url('administrator/job-postings/templates/new') ?>" class="btn btn-primary">New Template</a>
|
|
</div>
|
|
</div>
|
|
<?php if (session('success')): ?><div class="alert alert-success"><?= esc(session('success')) ?></div><?php endif; ?>
|
|
<?php if (session('error')): ?><div class="alert alert-danger"><?= esc(session('error')) ?></div><?php endif; ?>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered no-mgmt-sticky">
|
|
<thead>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Department</th>
|
|
<th>Location</th>
|
|
<th>Type</th>
|
|
<th>Version</th>
|
|
<th>Status</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($templates as $template): ?>
|
|
<tr>
|
|
<td><?= esc($template['title']) ?></td>
|
|
<td><?= esc($template['department'] ?? '') ?></td>
|
|
<td><?= esc($template['location'] ?? '') ?></td>
|
|
<td><?= esc($template['employment_type'] ?? '') ?></td>
|
|
<td><?= esc($template['version']) ?></td>
|
|
<td><?= !empty($template['is_active']) ? 'Active' : 'Archived' ?></td>
|
|
<td class="d-flex gap-2">
|
|
<a class="btn btn-sm btn-outline-primary" href="<?= site_url('administrator/job-postings/templates/' . $template['template_id'] . '/edit') ?>">Edit</a>
|
|
<a class="btn btn-sm btn-outline-success" href="<?= site_url('administrator/job-postings/positions/new?template_id=' . $template['template_id']) ?>">Create Position</a>
|
|
<?php if (!empty($template['is_active'])): ?>
|
|
<form action="<?= site_url('administrator/job-postings/templates/' . $template['template_id'] . '/archive') ?>" method="post">
|
|
<?= csrf_field() ?>
|
|
<button class="btn btn-sm btn-outline-danger" type="submit">Archive</button>
|
|
</form>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<?= $this->endSection() ?>
|