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

61 lines
2.3 KiB
Plaintext
Raw Normal View History

<%# 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" %>
<style type="text/css">
.head-title{
margin-bottom: 25px;
/*text-align: center;*/
}
hr{
border-top: 1px solid #5c5c5c;
}
.alert{
text-align: center;
}
</style>
<% if @profile.nil? %>
<div class="alert alert-danger"> <%= t("recruitment.user_not_found") %></div>
<% elsif !@profile.profile.recommendation_tokens.include?(params[:token]) %>
<div class="alert alert-danger"> <%= t("recruitment.referral_not_authorized") %></div>
<% elsif @is_written %>
<div class="alert alert-warning"> <%= t("recruitment.referral_already_recommended") %></div>
<% else %>
<h4 class="head-title">Please write a recommendation for <strong><%= @profile.name %></strong>.</h4>
<hr />
<%= form_for @recommendation, url: {"action" => "create_recommendation"}, :html => {:class => "form-horizontal main-forms"} do |f| %>
<div class="form-group">
<%= f.label :name, t("recruitment.name"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= f.text_field :name, :class => "form-control" %>
</div>
</div>
<div class="form-group">
<%= f.label :email, t("recruitment.contact_email"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= f.text_field :email, :class => "form-control" %>
</div>
</div>
<div class="form-group">
<%= f.label :info, t("recruitment.recommendation_letter"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= f.text_area :info, :rows => "10", :class => "form-control" %>
</div>
</div>
<div class="col-sm-offset-2 col-sm-10">
<%= f.hidden_field :employee_profile_id, :value => @profile.profile.id.to_s %>
<%= f.hidden_field :employee_recommendation_token, :value => params[:token] %>
<%= f.submit t("submit"), :class =>"btn btn-primary" %>
</div>
<% end %>
<% end %>