2018-01-02 18:30:32 +00:00
|
|
|
<style type="text/css">
|
|
|
|
#cover_letter_box .modal-dialog{
|
|
|
|
z-index: 1100;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<div id="dashboard-wrapper">
|
|
|
|
<%= render :partial => "dashboard_header" %>
|
|
|
|
<table class="table table-striped jobs-table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2018-01-07 18:22:57 +00:00
|
|
|
<th><%= t("recruitment.canidate_name") %></th>
|
|
|
|
<th><%= t("recruitment.applied_date") %></th>
|
|
|
|
<th><%= t("recruitment.cover_letter") %></th>
|
|
|
|
<th><%= t("recruitment.actions") %></th>
|
2018-01-02 18:30:32 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @applications.each do |application| %>
|
|
|
|
<% profile = application.employee_profile %>
|
|
|
|
<tr>
|
|
|
|
<td><a target="_blank" href="/<%= I18n.locale.to_s %>/candidates/<%= profile.recruit_profile.to_param %>"><%= profile.recruit_profile.name %></a></td>
|
|
|
|
<td><%= application.created_at.strftime("%d %B %Y") %></td>
|
|
|
|
<td>
|
|
|
|
<% if !application.cover_letter.nil? && application.cover_letter != "" %>
|
2018-01-07 18:22:57 +00:00
|
|
|
<a href="" for="<%= profile.recruit_profile.name %>" class="cover-letter-btn"><%= t("recruitment.cover_letter") %></a><div style="display: none;"><%= application.cover_letter %></div>
|
2018-01-02 18:30:32 +00:00
|
|
|
<% else %>
|
2018-01-07 18:22:57 +00:00
|
|
|
<a href="" disabled="disabled" class=""><%= t("recruitment.cover_letter") %></a>
|
2018-01-02 18:30:32 +00:00
|
|
|
<% end %>
|
|
|
|
</td>
|
2018-01-07 18:22:57 +00:00
|
|
|
<td><a class="btn btn-danger archive-button" href="/recruit/<%= application.id.to_s %>/archive_application"><%= t(:delete_) %></a></td>
|
2018-01-02 18:30:32 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="modal fade" id="cover_letter_box" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
|
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body"></div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var letterBox = $("#cover_letter_box");
|
|
|
|
$(".cover-letter-btn").on("click",function(){
|
|
|
|
var name = $(this).attr("for"),
|
|
|
|
letter = $(this).parent().find("div").html();
|
|
|
|
letterBox.find(".modal-body").html(letter);
|
|
|
|
letterBox.find(".modal-title").text(name + " ~ Cover Letter");
|
|
|
|
letterBox.modal("show");
|
|
|
|
return false;
|
|
|
|
})
|
|
|
|
$(".archive-button").on("click",function(){
|
|
|
|
if(!confirm("You can not undo once application is deleted. Are you sure?")){
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|