recruitment/app/views/recruitments/_employer_dashboard.html.erb

43 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-01-01 13:52:15 +00:00
<table class="table table-striped jobs-table">
<thead>
<tr>
<th>Job Title</th>
<th>Job Posted</th>
<th>Position Filled</th>
<th>Applied Candidates</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<% if @jobsposted.blank? %>
<tr><td class="no-jobs" colspan="5">No jobs posted.</td></tr>
<% else %>
<% @jobsposted.each do |job| %>
<tr>
<td><a href="<%= @page + "/" + job.to_param %>" target="_blank"><%= job.job_title %></a></td>
<td><%= job.created_at.strftime("%Y-%m-%d") %></td>
<td><%= job.filled ? "Yes" : "No" %></td>
<td>
<% job_count = job.get_application_count %>
<% if job_count > 0 %>
<a href="/recruit/<%= job.id.to_s %>/job_applications" class="btn btn-danger">Show (<%= job_count %>)</a></td>
<% else %>
<a href="#" disabled="disabled" class="btn btn-info">Show</a></td>
<% end %>
2018-01-01 13:52:15 +00:00
<td>
<a href="/recruit/<%= job.id.to_s %>/editjob" class="btn btn-warning">Edit</a>
<% if !job.filled %>
<a href="/recruit/<%= job.id.to_s %>/markfilled" class="btn btn-primary">Mark Filled</a>
<% else %>
<a href="/recruit/<%= job.id.to_s %>/unmarkfilled" class="btn btn-success">Not Filled</a>
<% end %>
<a data-method="delete" href="/recruit/<%= job.id.to_s %>/deletejob" data-confirm="Are you sure?" class="btn btn-danger">Delete</a>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
<div class="add-job">
<a href="<%= addjob_path %>" class="pull-right btn btn-primary">Add Job</a>
</div>