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

190 lines
7.2 KiB
Plaintext

<%= 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;
}
.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.employee_portfolio") %></h3>
<hr>
<%= form_for @profile, url: {:action => "updateprofile"}, html: {:class => "form-horizontal main-forms", :id => "portfolioForm"} do |f| %>
<ul class="nav nav-pills language-nav">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<li class="<%= 'active' if i == 0 %>">
<a data-toggle="tab" href=".<%= locale %>"><%= t(locale) %></a>
</li>
<% end %>
</ul>
<!-- Language -->
<div class="tab-content language-area">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
<%= f.fields_for :employee_profile do |fe| %>
<!-- address -->
<%= fe.fields_for :desired_job_title_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, t("recruitment.job_title"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_field locale, :class => "form-control", :value => @profile.employee_profile.desired_job_title_translations[locale] %>
</div>
</div>
<% end %>
<%= fe.fields_for :current_company_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, t("recruitment.current_company"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_field locale, :class => "form-control", :value => @profile.employee_profile.current_company_translations[locale] %>
</div>
</div>
<% end %>
<%= fe.fields_for :introduction_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, t("recruitment.introduction"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_area locale, :rows => 5, :class => "form-control", :value => @profile.employee_profile.introduction_translations[locale], :placeholder => t("recruitment.intro_example") %>
<div class="hint"><%= t("recruitment.first_thing") %></div>
</div>
</div>
<% end %>
<%= fe.fields_for :resume_content_translations do |fe| %>
<div class="form-group">
<%= fe.label locale, t("recruitment.resume_content"), :class => "col-sm-2 control-label" %>
<div class="col-sm-10">
<%= fe.cktext_area locale, :class => "ckeditor form-control", :value => @profile.employee_profile.resume_content_translations[locale] %>
</div>
</div>
<% end %>
<% end %>
</div>
<% end %>
</div>
<%= f.fields_for :employee_profile do |fe| %>
<!-- desired place -->
<div class="form-group">
<%= fe.label :desired_place, t("recruitment.current_location"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_field :desired_place, :class => "form-control" %>
</div>
</div>
<!-- Working Hours -->
<div class="form-group">
<label class="col-sm-2 control-label"><%= t("recruitment.workingtime_title") %></label>
<div class="col-sm-8">
<label for="recruit_profile_employee_profile_attributes_working_time_type1" class="control-label radio-label">
<%= fe.radio_button :working_time, "type1" %> <%= t("recruitment.working_time.type1") %>
</label>
<label for="recruit_profile_employee_profile_attributes_working_time_type2" class="control-label radio-label">
<%= fe.radio_button :working_time, "type2" %> <%= t("recruitment.working_time.type2") %>
</label>
</div>
</div>
<!-- Skills -->
<div class="form-group">
<%= f.label :skills, t("recruitment.skills"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_field :skills, :class => "form-control", :placeholder => t("recruitment.seperate_with_word"), :value => (@profile.employee_profile.skills.join(", ") rescue "") %>
</div>
</div>
<!-- Language Req -->
<div class="form-group">
<%= fe.label :languages, t("recruitment.language_title"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_field :languages, :class => "form-control", :placeholder => t("recruitment.seperate_with_eng") %>
</div>
</div>
<!-- Resume -->
<% if !@profile.employee_profile.resume.nil? && !@profile.employee_profile.resume.url.nil? %>
<div class="form-group">
<label class="col-sm-2 control-label"><%= t("recruitment.resume_file") %></label>
<div class="col-sm-10">
<p class="form-control-static"><a href="<%= @profile.employee_profile.resume.url %>" target="_blank"><%= t("recruitment.download_cv") %></a></p>
</div>
</div>
<% end %>
<div class="form-group">
<%= fe.label :resume, t("recruitment.upload_cv"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<p class="form-control-static"><%= fe.file_field :resume %></p>
</div>
</div>
<!-- Total Exp -->
<div class="form-group">
<%= fe.label :exprience_years, t("recruitment.total_exp"), :class => "col-sm-2 control-label" %>
<div class="col-sm-1">
<%= fe.number_field :experience_years, :class => "form-control", :max => 50, :min => 0 %> <%= t("recruitment.years") %>
</div>
<div class="col-sm-1">
<%= fe.number_field :experience_months, :class => "form-control", :max => 11, :min => 0 %> <%= t("recruitment.months") %>
</div>
</div>
<% end %>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="hidden" name="step" value="step3" >
<%= f.submit t("save"), :class =>"btn btn-primary" %>
<%= f.submit t("recruitment.next"), :class =>"btn btn-primary" %>
</div>
</div>
<% end %>
</div>
<script type="text/javascript">
$(function() {
$("#portfolioForm").submit(function() {
$(this).find(":input").not("textarea.ckeditor").filter(function(){
return !this.value;
}).attr("disabled", "disabled");
return true; // ensure form still submits
});
});
</script>