recruitment/app/views/recruitments/employee_recommendation.htm...

135 lines
4.5 KiB
Plaintext
Raw Normal View History

<%= csrf_meta_tag %>
<%# content_for :page_specific_css do %>
<%= stylesheet_link_tag "lib/main-forms" %>
<%= stylesheet_link_tag "lib/fileupload" %>
<%= stylesheet_link_tag "lib/main-list" %>
<%# end %>
<%# content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
<%= javascript_include_tag "lib/file-type" %>
<%# end %>
<style type="text/css">
.header-title{
text-align: center;
}
hr{
border-top: 1px solid #5c5c5c;
}
hr.dotted{
border-top: 1px dotted #5c5c5c;
}
.bootstrap-datetimepicker-widget ul{
list-style: none;
padding: 10px 25px;
text-align: center;
}
.bootstrap-datetimepicker-widget ul td,th{
cursor: pointer;
text-align: center;
}
.bootstrap-datetimepicker-widget ul td.old, td.new{
color: #cecece;
}
.bootstrap-datetimepicker-widget ul td:hover,th:hover{
background-color: #5c5c5c;
color: #fff;
}
.bootstrap-datetimepicker-widget span.month{
width: 50px;
}
.default_picker span.add-on{
padding: 3px;
margin-left: 5px;
cursor: pointer;
height: 20px;
width: 20px;
text-align: center;
}
</style>
<div id="dashboard-wrapper">
<%= render :partial => "dashboard_header" %>
<h3 class="header-title"><%= t("recruitment.recommendation") %></h3>
<hr>
<% @recommendations.each do |rec| %>
<div class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label"><%= t("recruitment.date") %></label>
<div class="col-sm-10">
<p class="form-control-static"><%= rec.created_at.strftime("%d %B %Y") rescue "" %></p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><%= t("recruitment.referral_name") %></label>
<div class="col-sm-10">
<p class="form-control-static"><%= rec.name %></p>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><%= t("recruitment.referral_email") %></label>
<div class="col-sm-10">
<p class="form-control-static"><%= rec.email %></p>
</div>
</div>
2018-01-16 12:06:04 +00:00
<% if !rec.file.nil? && !rec.file.url.nil? %>
<div class="form-group">
<label class="col-sm-2 control-label"><%= t("recruitment.file") %></label>
<div class="col-sm-10">
<p class="form-control-static"><a href="<%= rec.file.url %>" target="_blank"><%= t("recruitment.download_file") %></a></p>
</div>
</div>
<% end %>
<div class="form-group">
<label class="col-sm-2 control-label"><%= t("recruitment.recommendation_letter") %></label>
<div class="col-sm-10">
<p class="form-control-static"><%= simple_format(rec.info) %></p>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<a data-method="delete" data-confirm="Are you sure?" href="/recruit/<%= rec.id.to_s %>/delete_employee_recommendation" class="btn btn-danger"><%= t("delete_") %></a>
</div>
</div>
</div>
<hr class="dotted">
<% end %>
<form class="form-horizontal" method="post" action="<%= employee_recommendation_path %>" >
<!-- name -->
<div class="form-group">
<label for="referral_name" class="col-sm-2 control-label"><%= t("recruitment.referral_name") %></label>
<div class="col-sm-5">
<input type="text" name="referral_name" id="referral_name" class="form-control">
</div>
</div>
<!-- email -->
<div class="form-group">
<label for="referral_email" class="col-sm-2 control-label"><%= t("recruitment.referral_email") %></label>
<div class="col-sm-5">
<input type="text" name="referral_email" id="referral_email" class="form-control">
</div>
</div>
<!-- Request letter -->
<div class="form-group">
<label for="request_letter" class="col-sm-2 control-label"><%= t("recruitment.request_letter") %></label>
<div class="col-sm-5">
<textarea name="request_letter" id="request_letter" cols="30" rows="10" class="form-control"><%= t("recruitment.request_letter_content") %></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<%= hidden_field_tag :authenticity_token, form_authenticity_token -%>
<input type="submit" value="<%= t("recruitment.request") %>" class="btn btn-primary">
</div>
</div>
</form>
</div>