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

61 lines
2.9 KiB
Plaintext

<table class="table table-striped jobs-table">
<thead>
<tr>
<th><%= t("recruitment.post_type") %></th>
<th><%= t("recruitment.title") %></th>
<th><%= t("recruitment.posted_on") %></th>
<th><%= t("recruitment.position_filled") %></th>
<th><%= t("recruitment.applications") %></th>
<th><%= t("recruitment.actions") %></th>
</tr>
</thead>
<tbody>
<% if @jobsposted.blank? %>
<tr><td class="no-jobs" colspan="6"><%= t("recruitment.no_jobs_posted") %></td></tr>
<% else %>
<% @jobsposted.each do |job| %>
<tr>
<td><%= job.get_post_type_label.html_safe %></td>
<td>
<% if job.post_type == "type1" %>
<a href="<%= "/#{I18n.locale.to_s}/jobs/" + job.to_param %>" target="_blank"><%= job.job_title %></a>
<% elsif job.post_type == "type2" %>
<a href="<%= "/#{I18n.locale.to_s}/internships/" + job.to_param %>" target="_blank"><%= job.job_title %></a>
<% elsif job.post_type == "type3" %>
<a href="<%= "/#{I18n.locale.to_s}/exchanges/" + job.to_param %>" target="_blank"><%= job.job_title %></a>
<% end %>
</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"><%= t("recruitment.show_application") %> (<%= job_count %>)</a></td>
<% else %>
<a href="#" disabled="disabled" class="btn btn-info"><%= t("recruitment.show_application") %></a></td>
<% end %>
<td>
<% if job.post_type == "type1" %>
<a href="/recruit/<%= job.id.to_s %>/editjob" class="btn btn-warning"><%= t("recruitment.edit") %></a>
<% elsif job.post_type == "type2" %>
<a href="/recruit/<%= job.id.to_s %>/editinternship" class="btn btn-warning"><%= t("recruitment.edit") %></a>
<% elsif job.post_type == "type3" %>
<a href="/recruit/<%= job.id.to_s %>/editexchange" class="btn btn-warning"><%= t("recruitment.edit") %></a>
<% end %>
<% if !job.filled %>
<a href="/recruit/<%= job.id.to_s %>/markfilled" class="btn btn-primary"><%= t("recruitment.mark_filled") %></a>
<% else %>
<a href="/recruit/<%= job.id.to_s %>/unmarkfilled" class="btn btn-success"><%= t("recruitment.not_filled") %></a>
<% end %>
<a data-method="delete" href="/recruit/<%= job.id.to_s %>/deletejob" data-confirm="Are you sure?" class="btn btn-danger"><%= t(:delete_) %></a>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
<div class="add-job pull-right">
<a href="<%= addjob_path %>" class="btn btn-primary"><%= t("recruitment.add_job") %></a>
<a href="<%= addinternship_path %>" class="btn btn-info"><%= t("recruitment.add_internship") %></a>
<a href="<%= addexchange_path %>" class="btn btn-warning"><%= t("recruitment.add_exchange") %></a>
</div>