ifirst commit
This commit is contained in:
commit
e52310fab5
|
@ -0,0 +1,8 @@
|
|||
.bundle/
|
||||
log/*.log
|
||||
pkg/
|
||||
test/dummy/db/*.sqlite3
|
||||
test/dummy/db/*.sqlite3-journal
|
||||
test/dummy/log/*.log
|
||||
test/dummy/tmp/
|
||||
test/dummy/.sass-cache
|
|
@ -0,0 +1,15 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
# Declare your gem's dependencies in recruitment.gemspec.
|
||||
# Bundler will treat runtime dependencies like base dependencies, and
|
||||
# development dependencies will be added by default to the :development group.
|
||||
gemspec
|
||||
|
||||
# Declare any dependencies that are still in development here instead of in
|
||||
# your gemspec. These might include edge Rails or gems from your path or
|
||||
# Git. Remember to move these dependencies to your gemspec before releasing
|
||||
# your gem to rubygems.org.
|
||||
|
||||
# To use a debugger
|
||||
# gem 'byebug', group: [:development, :test]
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
Copyright 2017 Harry Bomrah
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,3 @@
|
|||
= Recruitment
|
||||
|
||||
This project rocks and uses MIT-LICENSE.
|
|
@ -0,0 +1,37 @@
|
|||
begin
|
||||
require 'bundler/setup'
|
||||
rescue LoadError
|
||||
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
||||
end
|
||||
|
||||
require 'rdoc/task'
|
||||
|
||||
RDoc::Task.new(:rdoc) do |rdoc|
|
||||
rdoc.rdoc_dir = 'rdoc'
|
||||
rdoc.title = 'Recruitment'
|
||||
rdoc.options << '--line-numbers'
|
||||
rdoc.rdoc_files.include('README.rdoc')
|
||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||
end
|
||||
|
||||
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
||||
load 'rails/tasks/engine.rake'
|
||||
|
||||
|
||||
load 'rails/tasks/statistics.rake'
|
||||
|
||||
|
||||
|
||||
Bundler::GemHelper.install_tasks
|
||||
|
||||
require 'rake/testtask'
|
||||
|
||||
Rake::TestTask.new(:test) do |t|
|
||||
t.libs << 'lib'
|
||||
t.libs << 'test'
|
||||
t.pattern = 'test/**/*_test.rb'
|
||||
t.verbose = false
|
||||
end
|
||||
|
||||
|
||||
task default: :test
|
|
@ -0,0 +1 @@
|
|||
//= require jquery_ujs
|
|
@ -0,0 +1,13 @@
|
|||
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||
// listed below.
|
||||
//
|
||||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
||||
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
||||
//
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// compiled file.
|
||||
//
|
||||
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
//= require_tree .
|
|
@ -0,0 +1,49 @@
|
|||
.profile-wrapper{
|
||||
text-align: center;
|
||||
}
|
||||
.select-profile{
|
||||
width: auto;
|
||||
height: 200px;
|
||||
border: 1px dotted #cecece;
|
||||
|
||||
.profile-button{
|
||||
border: 1px solid #cecece;
|
||||
border-radius: 10px;
|
||||
padding: 50px 75px;
|
||||
display: inline-block;
|
||||
margin-top: 33px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
#dashboard-wrapper{
|
||||
.jobs-table{
|
||||
margin-top: 20px;
|
||||
.no-jobs{
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.nav {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.radio-label{
|
||||
margin-right: 15px;
|
||||
}
|
||||
.btn{
|
||||
color : #fff;
|
||||
}
|
||||
|
||||
.jobs-table {
|
||||
// color : #fff;
|
||||
a.btn {
|
||||
&:visited{
|
||||
color : #fff;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
class Admin::RecruitmentsController < OrbitAdminController
|
||||
def index
|
||||
end
|
||||
end
|
|
@ -0,0 +1,110 @@
|
|||
class RecruitmentsController < PseudoSessionController
|
||||
|
||||
before_filter :set_key_for_this
|
||||
before_filter :load_profile, :except => ["newprofile", "createprofile"]
|
||||
before_filter :is_user_authorized?
|
||||
layout :get_layout
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
def firstruncheck
|
||||
if @profile.nil?
|
||||
redirect_to select_profile_path
|
||||
else
|
||||
redirect_to mydashboard_path
|
||||
end
|
||||
end
|
||||
|
||||
def select_profile
|
||||
end
|
||||
|
||||
def newprofile
|
||||
@profile = RecruitProfile.new
|
||||
if params[:type] == "1"
|
||||
@profile.build_employee_profile
|
||||
elsif params[:type] == "2"
|
||||
@profile.build_employer_profile
|
||||
end
|
||||
end
|
||||
|
||||
def createprofile
|
||||
profile = RecruitProfile.create(profile_params)
|
||||
redirect_to mydashboard_path
|
||||
end
|
||||
|
||||
def recruitment_dashboard
|
||||
@jobsposted = @profile.profile.recruitment_jobs
|
||||
@page = "/#{I18n.locale.to_s}" + Page.where(:module => "recruitment").first.url rescue "#"
|
||||
end
|
||||
|
||||
def editprofile
|
||||
end
|
||||
|
||||
def updateprofile
|
||||
@profile.update_attributes(profile_params)
|
||||
redirect_to mydashboard_path
|
||||
end
|
||||
|
||||
def addjob
|
||||
@job = RecruitmentJob.new
|
||||
end
|
||||
|
||||
def editjob
|
||||
@job = RecruitmentJob.find(params[:id])
|
||||
end
|
||||
|
||||
def createjob
|
||||
job = RecruitmentJob.create(recruitment_job_params)
|
||||
redirect_to mydashboard_path
|
||||
end
|
||||
|
||||
def updatejob
|
||||
job = RecruitmentJob.find(params[:id])
|
||||
job.update_attributes(recruitment_job_params)
|
||||
redirect_to mydashboard_path
|
||||
end
|
||||
|
||||
def markfilled
|
||||
job = RecruitmentJob.find(params[:id])
|
||||
if job.employer_profile_id.to_s == @profile.profile.id.to_s
|
||||
job.filled = true
|
||||
job.save
|
||||
end
|
||||
redirect_to mydashboard_path
|
||||
end
|
||||
|
||||
def unmarkfilled
|
||||
job = RecruitmentJob.find(params[:id])
|
||||
if job.employer_profile_id.to_s == @profile.profile.id.to_s
|
||||
job.filled = false
|
||||
job.save
|
||||
end
|
||||
redirect_to mydashboard_path
|
||||
end
|
||||
|
||||
def deletejob
|
||||
job = RecruitmentJob.find(params[:id])
|
||||
job.destroy
|
||||
redirect_to mydashboard_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def get_layout
|
||||
"recruit"
|
||||
end
|
||||
|
||||
def load_profile
|
||||
@profile = RecruitProfile.where(:pseudo_member_id => current_pseudo_user.user_name).first rescue nil
|
||||
end
|
||||
|
||||
def profile_params
|
||||
params.require(:recruit_profile).permit!
|
||||
end
|
||||
|
||||
def recruitment_job_params
|
||||
params.require(:recruitment_job).permit!
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
module Recruitment
|
||||
module ApplicationHelper
|
||||
end
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
class EmployeeProfile
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
belongs_to :recruit_profile
|
||||
end
|
|
@ -0,0 +1,23 @@
|
|||
class EmployerProfile
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :company_name, localize: true
|
||||
field :contact_person, localize: true
|
||||
field :office_address, localize: true
|
||||
field :company_profile, localize: true
|
||||
field :website
|
||||
field :country
|
||||
field :state
|
||||
field :city
|
||||
field :zipcode
|
||||
field :country_code
|
||||
field :phone_number
|
||||
field :mobile_number
|
||||
|
||||
mount_uploader :avatar, ImageUploader
|
||||
|
||||
belongs_to :recruit_profile
|
||||
has_many :recruitment_jobs, :dependent => :destroy
|
||||
|
||||
end
|
|
@ -0,0 +1,275 @@
|
|||
class MiscList
|
||||
COUNTRIES = {
|
||||
"AF" => "Afghanistan",
|
||||
"AL" => "Albania",
|
||||
"DZ" => "Algeria",
|
||||
"AS" => "American Samoa",
|
||||
"AD" => "Andorra",
|
||||
"AO" => "Angola",
|
||||
"AI" => "Anguilla",
|
||||
"AQ" => "Antarctica",
|
||||
"AG" => "Antigua and Barbuda",
|
||||
"AR" => "Argentina",
|
||||
"AM" => "Armenia",
|
||||
"AW" => "Aruba",
|
||||
"AU" => "Australia",
|
||||
"AT" => "Austria",
|
||||
"AZ" => "Azerbaijan",
|
||||
"BS" => "Bahamas",
|
||||
"BH" => "Bahrain",
|
||||
"BD" => "Bangladesh",
|
||||
"BB" => "Barbados",
|
||||
"BY" => "Belarus",
|
||||
"BE" => "Belgium",
|
||||
"BZ" => "Belize",
|
||||
"BJ" => "Benin",
|
||||
"BM" => "Bermuda",
|
||||
"BT" => "Bhutan",
|
||||
"BO" => "Bolivia",
|
||||
"BA" => "Bosnia and Herzegovina",
|
||||
"BW" => "Botswana",
|
||||
"BV" => "Bouvet Island",
|
||||
"BR" => "Brazil",
|
||||
"BQ" => "British Antarctic Territory",
|
||||
"IO" => "British Indian Ocean Territory",
|
||||
"VG" => "British Virgin Islands",
|
||||
"BN" => "Brunei",
|
||||
"BG" => "Bulgaria",
|
||||
"BF" => "Burkina Faso",
|
||||
"BI" => "Burundi",
|
||||
"KH" => "Cambodia",
|
||||
"CM" => "Cameroon",
|
||||
"CA" => "Canada",
|
||||
"CT" => "Canton and Enderbury Islands",
|
||||
"CV" => "Cape Verde",
|
||||
"KY" => "Cayman Islands",
|
||||
"CF" => "Central African Republic",
|
||||
"TD" => "Chad",
|
||||
"CL" => "Chile",
|
||||
"CN" => "China",
|
||||
"CX" => "Christmas Island",
|
||||
"CC" => "Cocos [Keeling] Islands",
|
||||
"CO" => "Colombia",
|
||||
"KM" => "Comoros",
|
||||
"CG" => "Congo - Brazzaville",
|
||||
"CD" => "Congo - Kinshasa",
|
||||
"CK" => "Cook Islands",
|
||||
"CR" => "Costa Rica",
|
||||
"HR" => "Croatia",
|
||||
"CU" => "Cuba",
|
||||
"CY" => "Cyprus",
|
||||
"CZ" => "Czech Republic",
|
||||
"CI" => "Côte d’Ivoire",
|
||||
"DK" => "Denmark",
|
||||
"DJ" => "Djibouti",
|
||||
"DM" => "Dominica",
|
||||
"DO" => "Dominican Republic",
|
||||
"NQ" => "Dronning Maud Land",
|
||||
"DD" => "East Germany",
|
||||
"EC" => "Ecuador",
|
||||
"EG" => "Egypt",
|
||||
"SV" => "El Salvador",
|
||||
"GQ" => "Equatorial Guinea",
|
||||
"ER" => "Eritrea",
|
||||
"EE" => "Estonia",
|
||||
"ET" => "Ethiopia",
|
||||
"FK" => "Falkland Islands",
|
||||
"FO" => "Faroe Islands",
|
||||
"FJ" => "Fiji",
|
||||
"FI" => "Finland",
|
||||
"FR" => "France",
|
||||
"GF" => "French Guiana",
|
||||
"PF" => "French Polynesia",
|
||||
"TF" => "French Southern Territories",
|
||||
"FQ" => "French Southern and Antarctic Territories",
|
||||
"GA" => "Gabon",
|
||||
"GM" => "Gambia",
|
||||
"GE" => "Georgia",
|
||||
"DE" => "Germany",
|
||||
"GH" => "Ghana",
|
||||
"GI" => "Gibraltar",
|
||||
"GR" => "Greece",
|
||||
"GL" => "Greenland",
|
||||
"GD" => "Grenada",
|
||||
"GP" => "Guadeloupe",
|
||||
"GU" => "Guam",
|
||||
"GT" => "Guatemala",
|
||||
"GG" => "Guernsey",
|
||||
"GN" => "Guinea",
|
||||
"GW" => "Guinea-Bissau",
|
||||
"GY" => "Guyana",
|
||||
"HT" => "Haiti",
|
||||
"HM" => "Heard Island and McDonald Islands",
|
||||
"HN" => "Honduras",
|
||||
"HK" => "Hong Kong SAR China",
|
||||
"HU" => "Hungary",
|
||||
"IS" => "Iceland",
|
||||
"IN" => "India",
|
||||
"ID" => "Indonesia",
|
||||
"IR" => "Iran",
|
||||
"IQ" => "Iraq",
|
||||
"IE" => "Ireland",
|
||||
"IM" => "Isle of Man",
|
||||
"IL" => "Israel",
|
||||
"IT" => "Italy",
|
||||
"JM" => "Jamaica",
|
||||
"JP" => "Japan",
|
||||
"JE" => "Jersey",
|
||||
"JT" => "Johnston Island",
|
||||
"JO" => "Jordan",
|
||||
"KZ" => "Kazakhstan",
|
||||
"KE" => "Kenya",
|
||||
"KI" => "Kiribati",
|
||||
"KW" => "Kuwait",
|
||||
"KG" => "Kyrgyzstan",
|
||||
"LA" => "Laos",
|
||||
"LV" => "Latvia",
|
||||
"LB" => "Lebanon",
|
||||
"LS" => "Lesotho",
|
||||
"LR" => "Liberia",
|
||||
"LY" => "Libya",
|
||||
"LI" => "Liechtenstein",
|
||||
"LT" => "Lithuania",
|
||||
"LU" => "Luxembourg",
|
||||
"MO" => "Macau SAR China",
|
||||
"MK" => "Macedonia",
|
||||
"MG" => "Madagascar",
|
||||
"MW" => "Malawi",
|
||||
"MY" => "Malaysia",
|
||||
"MV" => "Maldives",
|
||||
"ML" => "Mali",
|
||||
"MT" => "Malta",
|
||||
"MH" => "Marshall Islands",
|
||||
"MQ" => "Martinique",
|
||||
"MR" => "Mauritania",
|
||||
"MU" => "Mauritius",
|
||||
"YT" => "Mayotte",
|
||||
"FX" => "Metropolitan France",
|
||||
"MX" => "Mexico",
|
||||
"FM" => "Micronesia",
|
||||
"MI" => "Midway Islands",
|
||||
"MD" => "Moldova",
|
||||
"MC" => "Monaco",
|
||||
"MN" => "Mongolia",
|
||||
"ME" => "Montenegro",
|
||||
"MS" => "Montserrat",
|
||||
"MA" => "Morocco",
|
||||
"MZ" => "Mozambique",
|
||||
"MM" => "Myanmar [Burma]",
|
||||
"NA" => "Namibia",
|
||||
"NR" => "Nauru",
|
||||
"NP" => "Nepal",
|
||||
"NL" => "Netherlands",
|
||||
"AN" => "Netherlands Antilles",
|
||||
"NT" => "Neutral Zone",
|
||||
"NC" => "New Caledonia",
|
||||
"NZ" => "New Zealand",
|
||||
"NI" => "Nicaragua",
|
||||
"NE" => "Niger",
|
||||
"NG" => "Nigeria",
|
||||
"NU" => "Niue",
|
||||
"NF" => "Norfolk Island",
|
||||
"KP" => "North Korea",
|
||||
"VD" => "North Vietnam",
|
||||
"MP" => "Northern Mariana Islands",
|
||||
"NO" => "Norway",
|
||||
"OM" => "Oman",
|
||||
"PC" => "Pacific Islands Trust Territory",
|
||||
"PK" => "Pakistan",
|
||||
"PW" => "Palau",
|
||||
"PS" => "Palestinian Territories",
|
||||
"PA" => "Panama",
|
||||
"PZ" => "Panama Canal Zone",
|
||||
"PG" => "Papua New Guinea",
|
||||
"PY" => "Paraguay",
|
||||
"YD" => "People's Democratic Republic of Yemen",
|
||||
"PE" => "Peru",
|
||||
"PH" => "Philippines",
|
||||
"PN" => "Pitcairn Islands",
|
||||
"PL" => "Poland",
|
||||
"PT" => "Portugal",
|
||||
"PR" => "Puerto Rico",
|
||||
"QA" => "Qatar",
|
||||
"RO" => "Romania",
|
||||
"RU" => "Russia",
|
||||
"RW" => "Rwanda",
|
||||
"RE" => "Réunion",
|
||||
"BL" => "Saint Barthélemy",
|
||||
"SH" => "Saint Helena",
|
||||
"KN" => "Saint Kitts and Nevis",
|
||||
"LC" => "Saint Lucia",
|
||||
"MF" => "Saint Martin",
|
||||
"PM" => "Saint Pierre and Miquelon",
|
||||
"VC" => "Saint Vincent and the Grenadines",
|
||||
"WS" => "Samoa",
|
||||
"SM" => "San Marino",
|
||||
"SA" => "Saudi Arabia",
|
||||
"SN" => "Senegal",
|
||||
"RS" => "Serbia",
|
||||
"CS" => "Serbia and Montenegro",
|
||||
"SC" => "Seychelles",
|
||||
"SL" => "Sierra Leone",
|
||||
"SG" => "Singapore",
|
||||
"SK" => "Slovakia",
|
||||
"SI" => "Slovenia",
|
||||
"SB" => "Solomon Islands",
|
||||
"SO" => "Somalia",
|
||||
"ZA" => "South Africa",
|
||||
"GS" => "South Georgia and the South Sandwich Islands",
|
||||
"KR" => "South Korea",
|
||||
"ES" => "Spain",
|
||||
"LK" => "Sri Lanka",
|
||||
"SD" => "Sudan",
|
||||
"SR" => "Suriname",
|
||||
"SJ" => "Svalbard and Jan Mayen",
|
||||
"SZ" => "Swaziland",
|
||||
"SE" => "Sweden",
|
||||
"CH" => "Switzerland",
|
||||
"SY" => "Syria",
|
||||
"ST" => "São Tomé and Príncipe",
|
||||
"TW" => "Taiwan",
|
||||
"TJ" => "Tajikistan",
|
||||
"TZ" => "Tanzania",
|
||||
"TH" => "Thailand",
|
||||
"TL" => "Timor-Leste",
|
||||
"TG" => "Togo",
|
||||
"TK" => "Tokelau",
|
||||
"TO" => "Tonga",
|
||||
"TT" => "Trinidad and Tobago",
|
||||
"TN" => "Tunisia",
|
||||
"TR" => "Turkey",
|
||||
"TM" => "Turkmenistan",
|
||||
"TC" => "Turks and Caicos Islands",
|
||||
"TV" => "Tuvalu",
|
||||
"UM" => "U.S. Minor Outlying Islands",
|
||||
"PU" => "U.S. Miscellaneous Pacific Islands",
|
||||
"VI" => "U.S. Virgin Islands",
|
||||
"UG" => "Uganda",
|
||||
"UA" => "Ukraine",
|
||||
"SU" => "Union of Soviet Socialist Republics",
|
||||
"AE" => "United Arab Emirates",
|
||||
"GB" => "United Kingdom",
|
||||
"US" => "United States",
|
||||
"ZZ" => "Unknown or Invalid Region",
|
||||
"UY" => "Uruguay",
|
||||
"UZ" => "Uzbekistan",
|
||||
"VU" => "Vanuatu",
|
||||
"VA" => "Vatican City",
|
||||
"VE" => "Venezuela",
|
||||
"VN" => "Vietnam",
|
||||
"WK" => "Wake Island",
|
||||
"WF" => "Wallis and Futuna",
|
||||
"EH" => "Western Sahara",
|
||||
"YE" => "Yemen",
|
||||
"ZM" => "Zambia",
|
||||
"ZW" => "Zimbabwe",
|
||||
"AX" => "Åland Islands",
|
||||
}
|
||||
|
||||
def self.countries_for_select
|
||||
self::COUNTRIES.collect do |k,v|
|
||||
[v,k]
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,44 @@
|
|||
class RecruitProfile
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
EMPLOYEE=1
|
||||
EMPLOYER=2
|
||||
|
||||
field :pseudo_member_id
|
||||
field :email
|
||||
field :first_name
|
||||
field :last_name
|
||||
field :user_type, type: Integer, default: 1
|
||||
|
||||
scope :employers, ->{ where(user_type: self::EMPLOYER) }
|
||||
scope :employees, ->{ where(user_type: self::EMPLOYEE) }
|
||||
|
||||
has_one :employee_profile, :autosave => true, :dependent => :destroy
|
||||
accepts_nested_attributes_for :employee_profile, :allow_destroy => true
|
||||
|
||||
has_one :employer_profile, :autosave => true, :dependent => :destroy
|
||||
accepts_nested_attributes_for :employer_profile, :allow_destroy => true
|
||||
|
||||
|
||||
def name
|
||||
self.first_name + " " + self.last_name rescue self.email
|
||||
end
|
||||
|
||||
def profile
|
||||
if self.is_employer?
|
||||
self.employer_profile
|
||||
elsif self.is_employee?
|
||||
self.employee_profile
|
||||
end
|
||||
end
|
||||
|
||||
def is_employer?
|
||||
self.user_type == RecruitProfile::EMPLOYER
|
||||
end
|
||||
|
||||
def is_employee?
|
||||
self.user_type == RecruitProfile::EMPLOYEE
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,33 @@
|
|||
class RecruitmentJob
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Slug
|
||||
|
||||
|
||||
field :job_title, as: :slug_title, localize: true
|
||||
field :job_description, localize: true
|
||||
field :responsibility, localize: true
|
||||
field :other_conditions, localize: true
|
||||
field :salary #type1 => negotiable type2 => according to company rules type3 => monthly salary
|
||||
field :travel_assignment #type1 => Need to travel, type2 => occasionally, type3 => travelling not required
|
||||
field :working_time #type1 => Day Shift, type2 => Night Shift
|
||||
field :holiday_system #type1 => According to Company Rules, type2 => other
|
||||
field :holiday_system_other
|
||||
field :joining_time #type1 => Immediate, type2 => withing week, type3 => within a month, type4 => more than a month
|
||||
field :work_type #type1 => Office worker, type2 => graduate, type3 => foreigner, type4 => internship, type5 => SOHO
|
||||
field :work_experience_years, type: Integer
|
||||
field :work_experience_months, type: Integer
|
||||
field :academic_requirement
|
||||
field :language_requirement
|
||||
field :tools_requirement
|
||||
field :category
|
||||
field :location_of_work
|
||||
field :industrial_area
|
||||
|
||||
|
||||
field :filled, type: Boolean, :default => false
|
||||
|
||||
belongs_to :employer_profile
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
backend index
|
|
@ -0,0 +1,32 @@
|
|||
<!doctype html>
|
||||
<html lang="<%= I18n.locale.to_s %>" class="orbit">
|
||||
<head>
|
||||
<%= render_partial("head") %>
|
||||
<%= stylesheet_link_tag "recruitment/recruitment" %>
|
||||
<%= javascript_include_tag "recruitment" %>
|
||||
</head>
|
||||
<body class="internal-page">
|
||||
<%= render_orbit_bar %>
|
||||
<%= render_header %>
|
||||
<section class="layout-slide no-print single-child-datapp" data-pp="300"></section>
|
||||
<div class="layout-content">
|
||||
<div class="layout-content-inner container">
|
||||
<div class="breadcrumb-wrap" data-pp="500"></div>
|
||||
<div class="sitemenu-wrap" data-pp="400"></div>
|
||||
<div class="row">
|
||||
<section class="layout-content-box left-column col-sm-9">
|
||||
<div class="extra" data-pp="600"></div>
|
||||
<main id="main-content" class="main-content" data-content="true">
|
||||
<%= yield %>
|
||||
</main>
|
||||
<%#= render_every_page_sharer %>
|
||||
<div class="extra" data-pp="700"></div>
|
||||
</section>
|
||||
<aside class="layout-content-box aside right-column col-sm-3" data-pp="13"></aside>
|
||||
</div>
|
||||
<div class="extra" data-pp="800"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render_footer %>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<h3>Welcome <strong><%= @profile.name %></strong>!</h3>
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" class="<%= params[:action] == "recruitment_dashboard" ? "active" : "" %>"><a href="<%= mydashboard_path %>">Jobs</a></li>
|
||||
<li role="presentation" class="<%= params[:action] == "editprofile" ? "active" : "" %>"><a href="<%= editprofile_path %>">Profile</a></li>
|
||||
</ul>
|
||||
<% if params[:action] == "recruitment_dashboard" %>
|
||||
<div class="add-job">
|
||||
<a href="<%= addjob_path %>" class="pull-right btn btn-primary">Add Job</a>
|
||||
</div>
|
||||
<% end %>
|
|
@ -0,0 +1,167 @@
|
|||
<%# 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-fileupload" %>
|
||||
<%= javascript_include_tag "lib/file-type" %>
|
||||
<%# end %>
|
||||
<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 :employer_profile do |fe| %>
|
||||
<!-- company name -->
|
||||
<%= fe.fields_for :company_name_translations do |fe| %>
|
||||
<div class="form-group">
|
||||
<%= fe.label locale, "Company Name", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_field locale, :class => "form-control", :value => @profile.employer_profile.company_name_translations[locale] %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- contact person -->
|
||||
<%= fe.fields_for :contact_person_translations do |fe| %>
|
||||
<div class="form-group">
|
||||
<%= fe.label locale, "Contact Person", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_field locale, :class => "form-control", :value => @profile.employer_profile.contact_person_translations[locale] %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- office address -->
|
||||
<%= fe.fields_for :office_address_translations do |fe| %>
|
||||
<div class="form-group">
|
||||
<%= fe.label locale, "Office Address", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_field locale, :class => "form-control", :value => @profile.employer_profile.office_address_translations[locale] %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- Company Profile -->
|
||||
<%= fe.fields_for :company_profile_translations do |fe| %>
|
||||
<div class="form-group">
|
||||
<%= fe.label locale, "Company Profile", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_area locale, :class => "form-control", :value => @profile.employer_profile.company_profile_translations[locale] %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= f.fields_for :employer_profile do |fe| %>
|
||||
<!-- Country -->
|
||||
<div class="form-group">
|
||||
<%= fe.label :country, "Country", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.select :country, MiscList.countries_for_select, :class => "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- State -->
|
||||
<div class="form-group">
|
||||
<%= fe.label :state, "State", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_field :state, :class => "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- City -->
|
||||
<div class="form-group">
|
||||
<%= fe.label :city, "City", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_field :city, :class => "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Zipcode -->
|
||||
<div class="form-group">
|
||||
<%= fe.label :zipcode, "Zipcode", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_field :zipcode, :class => "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- country code -->
|
||||
<div class="form-group">
|
||||
<%= fe.label :country_code, "Country Code", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-1">
|
||||
<%= fe.text_field :country_code, :class => "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- phone number -->
|
||||
<div class="form-group">
|
||||
<%= fe.label :phone_number, "Phone Number", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-2">
|
||||
<%= fe.text_field :phone_number, :class => "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- country code -->
|
||||
<div class="form-group">
|
||||
<%= fe.label :mobile_number, "Mobile Number", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-2">
|
||||
<%= fe.text_field :mobile_number, :class => "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Website -->
|
||||
<div class="form-group">
|
||||
<%= fe.label :website, "Website", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_field :website, :class => "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= fe.label :avatar, "Avatar", :class => "col-sm-2 control-label" %>
|
||||
<div class="controls">
|
||||
<div class="fileupload fileupload-new clearfix <%= 'fileupload-edit' if !@profile.new_record? && @profile.employer_profile.avatar.file %>" data-provides="fileupload">
|
||||
<div class="fileupload-new thumbnail pull-left">
|
||||
<% if !@profile.new_record? && @profile.employer_profile.avatar.file %>
|
||||
<%= image_tag @profile.employer_profile.avatar %>
|
||||
<% else %>
|
||||
<img src="http://www.placehold.it/50x50/EFEFEF/AAAAAA" />
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
||||
<span class="btn btn-file">
|
||||
<span class="fileupload-new"><%= t(:select_image) %></span>
|
||||
<span class="fileupload-exists"><%= t(:change) %></span>
|
||||
<%= fe.file_field :avatar %>
|
||||
</span>
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
|
||||
<div class="controls" data-toggle="buttons-checkbox">
|
||||
<label class="checkbox inline btn btn-danger fileupload-remove">
|
||||
<%= fe.check_box :remove_avatar %><%= t(:remove) %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<%= f.hidden_field :pseudo_member_id, :value => current_pseudo_user.user_name %>
|
||||
<%= f.hidden_field :email, :value => current_pseudo_user.email %>
|
||||
<%= f.hidden_field :first_name, :value => current_pseudo_user.first_name %>
|
||||
<%= f.hidden_field :last_name, :value => current_pseudo_user.last_name %>
|
||||
<%= f.hidden_field :user_type, :value => "2" %>
|
||||
<%= f.submit "Submit", :class =>"btn btn-primary" %>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,241 @@
|
|||
<%# 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-fileupload" %>
|
||||
<%= javascript_include_tag "lib/file-type" %>
|
||||
<%# end %>
|
||||
<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" : '' %>">
|
||||
<!-- Job Title -->
|
||||
<%= f.fields_for :job_title_translations do |fe| %>
|
||||
<div class="form-group">
|
||||
<%= fe.label locale, "Job Title", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_field locale, :class => "form-control", :value => @job.job_title_translations[locale] %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- Job Description -->
|
||||
<%= f.fields_for :job_description_translations do |fe| %>
|
||||
<div class="form-group">
|
||||
<%= fe.label locale, "Job Description", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_area locale, :class => "form-control", :value => @job.job_description_translations[locale] %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- Responsibility -->
|
||||
<%= f.fields_for :responsibility_translations do |fe| %>
|
||||
<div class="form-group">
|
||||
<%= fe.label locale, "Job Responsibility", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_area locale, :class => "form-control", :value => @job.responsibility_translations[locale] %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- Other Conditions -->
|
||||
<%= f.fields_for :other_conditions_translations do |fe| %>
|
||||
<div class="form-group">
|
||||
<%= fe.label locale, "Other Conditions", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= fe.text_area locale, :class => "form-control", :value => @job.other_conditions_translations[locale] %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<hr>
|
||||
|
||||
<!-- salary type -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Salary</label>
|
||||
<div class="col-sm-8">
|
||||
<label for="recruitment_job_salary_type1" class="control-label radio-label">
|
||||
<%= f.radio_button :salary, "type1" %> Negotiable
|
||||
</label>
|
||||
<label for="recruitment_job_salary_type2" class="control-label radio-label">
|
||||
<%= f.radio_button :salary, "type2" %> According to Company Rules
|
||||
</label>
|
||||
<label for="recruitment_job_salary_type3" class="control-label radio-label">
|
||||
<%= f.radio_button :salary, "type3" %> Monthly Salary
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- location of work -->
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :location_of_work, "Location of Work", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= f.text_field :location_of_work, :class => "form-control"%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Industrial area -->
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :industrial_area, "Industrial Area", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= f.text_field :industrial_area, :class => "form-control"%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- travel assignment type -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Travel Assignment</label>
|
||||
<div class="col-sm-8">
|
||||
<label for="recruitment_job_travel_assignment_type1" class="control-label radio-label">
|
||||
<%= f.radio_button :travel_assignment, "type1" %> Need to Travel
|
||||
</label>
|
||||
<label for="recruitment_job_travel_assignment_type2" class="control-label radio-label">
|
||||
<%= f.radio_button :travel_assignment, "type2" %> Occasionally
|
||||
</label>
|
||||
<label for="recruitment_job_travel_assignment_type3" class="control-label radio-label">
|
||||
<%= f.radio_button :travel_assignment, "type3" %> Travelling not required
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Working Hours -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Working Hours</label>
|
||||
<div class="col-sm-8">
|
||||
<label for="recruitment_job_working_time_type1" class="control-label radio-label">
|
||||
<%= f.radio_button :working_time, "type1" %> Day Shift
|
||||
</label>
|
||||
<label for="recruitment_job_working_time_type2" class="control-label radio-label">
|
||||
<%= f.radio_button :working_time, "type2" %> Night Shift
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Holidays -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Holidays</label>
|
||||
<div class="col-sm-8">
|
||||
<label for="recruitment_job_holiday_system_type1" class="control-label radio-label">
|
||||
<%= f.radio_button :holiday_system, "type1" %> According to Company Rules
|
||||
</label>
|
||||
<label for="recruitment_job_holiday_system_type2" class="control-label radio-label">
|
||||
<%= f.radio_button :holiday_system, "type2" %> Others
|
||||
<%= f.text_field :holiday_system_other, :disabled => true %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Joining Day -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Joining Time</label>
|
||||
<div class="col-sm-8">
|
||||
<label for="recruitment_job_joining_time_type1" class="control-label radio-label">
|
||||
<%= f.radio_button :joining_time, "type1" %> Immediate
|
||||
</label>
|
||||
<label for="recruitment_job_joining_time_type2" class="control-label radio-label">
|
||||
<%= f.radio_button :joining_time, "type2" %> Within a week
|
||||
</label>
|
||||
<label for="recruitment_job_joining_time_type3" class="control-label radio-label">
|
||||
<%= f.radio_button :joining_time, "type3" %> Within a month
|
||||
</label>
|
||||
<label for="recruitment_job_joining_time_type4" class="control-label radio-label">
|
||||
<%= f.radio_button :joining_time, "type4" %> More than a month
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<!-- Work Type -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Work Type</label>
|
||||
<div class="col-sm-8">
|
||||
<label for="recruitment_job_work_type_type1" class="control-label radio-label">
|
||||
<%= f.radio_button :work_type, "type1" %> Office Worker
|
||||
</label>
|
||||
<label for="recruitment_job_work_type_type2" class="control-label radio-label">
|
||||
<%= f.radio_button :work_type, "type2" %> Graduate
|
||||
</label>
|
||||
<label for="recruitment_job_work_type_type3" class="control-label radio-label">
|
||||
<%= f.radio_button :work_type, "type3" %> Foreigner
|
||||
</label>
|
||||
<label for="recruitment_job_work_type_type4" class="control-label radio-label">
|
||||
<%= f.radio_button :work_type, "type4" %> Internship
|
||||
</label>
|
||||
<label for="recruitment_job_work_type_type5" class="control-label radio-label">
|
||||
<%= f.radio_button :work_type, "type5" %> SOHO
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Work Experience -->
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :work_experience_years, "Work Experience", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-7">
|
||||
<label for="recruitment_job_work_experience_years">
|
||||
<%= f.number_field :work_experience_years, :class => "col-sm-3", :max => 50, :min => 0, :value => 0 %> Years
|
||||
</label>
|
||||
<label for="recruitment_job_work_experience_months">
|
||||
<%= f.number_field :work_experience_months, :class => "col-sm-3", :max => 11, :min => 0, :value => 0 %> Months
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Academic Req -->
|
||||
<div class="form-group">
|
||||
<%= f.label :academic_requirement, "Academic Requirement", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= f.text_area :academic_requirement, :class => "form-control"%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Language Req -->
|
||||
<div class="form-group">
|
||||
<%= f.label :language_requirement, "Language Requirement", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= f.text_field :language_requirement, :class => "form-control", :placeholder => "Seperate with (,) ex; English, Chinese" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tools Req -->
|
||||
<div class="form-group">
|
||||
<%= f.label :tools_requirement, "Tools Requirement", :class => "col-sm-2 control-label" %>
|
||||
<div class="col-sm-5">
|
||||
<%= f.text_field :tools_requirement, :class => "form-control", :placeholder => "Seperate with (,) ex; Word, Excel" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<%= f.hidden_field :employer_profile_id, :value => @profile.profile.id %>
|
||||
<%= f.submit "Submit", :class =>"btn btn-primary" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#recruitment_job_holiday_system_type2").on("click",function(){
|
||||
if($(this).is(":checked")){
|
||||
$("#recruitment_job_holiday_system_other").prop("disabled",false);
|
||||
$("#recruitment_job_holiday_system_other").focus();
|
||||
}
|
||||
})
|
||||
$("#recruitment_job_holiday_system_type1").on("click",function(){
|
||||
$("#recruitment_job_holiday_system_other").prop("disabled",true).val("");
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @job, url: {:action => "createjob"}, html: {:class => "form-horizontal main-forms"} do |f| %>
|
||||
<%= render :partial => "job_form", locals: {f: f} %>
|
||||
<% end %>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @job, url: "/recruit/#{@job.id.to_s}/updatejob", html: {:class => "form-horizontal main-forms"} do |f| %>
|
||||
<%= render :partial => "job_form", locals: {f: f} %>
|
||||
<% end %>
|
|
@ -0,0 +1,10 @@
|
|||
<div id="dashboard-wrapper">
|
||||
<%= render :partial => "dashboard_header" %>
|
||||
<%= form_for @profile, url: {:action => "updateprofile"}, html: {:class => "form-horizontal main-forms"} do |f| %>
|
||||
<% if @profile.is_employee? %>
|
||||
<%= render :partial => "employee_form", locals: {f: f} %>
|
||||
<% elsif @profile.is_employer? %>
|
||||
<%= render :partial => "employer_form", locals: {f: f} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
index frontend
|
|
@ -0,0 +1,7 @@
|
|||
<%= form_for @profile, url: {:action => "createprofile"}, html: {:class => "form-horizontal main-forms"} do |f| %>
|
||||
<% if params[:type] == "1" %>
|
||||
<%= render :partial => "employee_form", locals: {f: f} %>
|
||||
<% elsif params[:type] == "2" %>
|
||||
<%= render :partial => "employer_form", locals: {f: f} %>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -0,0 +1,41 @@
|
|||
<%= csrf_meta_tag %>
|
||||
<div id="dashboard-wrapper">
|
||||
<%= render :partial => "dashboard_header" %>
|
||||
<table class="table table-striped jobs-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Job Title</th>
|
||||
<th>Job Posted</th>
|
||||
<th>Position Filled</th>
|
||||
<th>Applied Candidates</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if @jobsposted.blank? %>
|
||||
<tr><td class="no-jobs" colspan="5">No jobs posted.</td></tr>
|
||||
<% else %>
|
||||
<% @jobsposted.each do |job| %>
|
||||
<tr>
|
||||
<td><a href="<%= @page + "/" + job.to_param %>" target="_blank"><%= job.job_title %></a></td>
|
||||
<td><%= job.created_at.strftime("%Y-%m-%d") %></td>
|
||||
<td><%= job.filled ? "Yes" : "No" %></td>
|
||||
<td><button class="btn btn-info">Show</button></td>
|
||||
<td>
|
||||
<a href="/recruit/<%= job.id.to_s %>/editjob" class="btn btn-warning">Edit</a>
|
||||
<% if !job.filled %>
|
||||
<a href="/recruit/<%= job.id.to_s %>/markfilled" class="btn btn-primary">Mark Filled</a>
|
||||
<% else %>
|
||||
<a href="/recruit/<%= job.id.to_s %>/unmarkfilled" class="btn btn-success">Not Filled</a>
|
||||
<% end %>
|
||||
<a data-method="delete" href="/recruit/<%= job.id.to_s %>/deletejob" data-confirm="Are you sure?" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="add-job">
|
||||
<a href="<%= addjob_path %>" class="pull-right btn btn-primary">Add Job</a>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
<div class="profile-wrapper">
|
||||
<h3><%= t("recruitment.select_a_profile") %></h3>
|
||||
<div class="select-profile">
|
||||
<a href="<%= newprofile_path(:type => "1") %>" class="btn btn-default profile-button"><%= t("recruitment.employee") %></a>
|
||||
<a href="<%= newprofile_path(:type => "2") %>" class="btn btn-default profile-button"><%= t("recruitment.employer") %></a>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env ruby
|
||||
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
||||
|
||||
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
||||
ENGINE_PATH = File.expand_path('../../lib/recruitment/engine', __FILE__)
|
||||
|
||||
# Set up gems listed in the Gemfile.
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
||||
|
||||
require 'rails/all'
|
||||
require 'rails/engine/commands'
|
|
@ -0,0 +1,8 @@
|
|||
en:
|
||||
module_name:
|
||||
recruitment: Recruitment
|
||||
recruitment:
|
||||
recruitment: Recruitment
|
||||
select_a_profile: Please select a profile
|
||||
employee: Employee
|
||||
employer: Employer
|
|
@ -0,0 +1,8 @@
|
|||
zh_tw:
|
||||
module_name:
|
||||
recruitment: Recruitment
|
||||
recruitment:
|
||||
recruitment: Recruitment
|
||||
select_a_profile: Please select a profile
|
||||
employee: Employee
|
||||
employer: Employer
|
|
@ -0,0 +1,26 @@
|
|||
Rails.application.routes.draw do
|
||||
|
||||
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
|
||||
scope "(:locale)", locale: Regexp.new(locales.join("|")) do
|
||||
namespace :admin do
|
||||
resources :recruitments do
|
||||
end
|
||||
end
|
||||
scope "recruit" do
|
||||
get "/firstruncheck", to: "recruitments#firstruncheck"
|
||||
get "/select_profile", to: "recruitments#select_profile"
|
||||
get "/newprofile", to: "recruitments#newprofile"
|
||||
get "/editprofile", to: "recruitments#editprofile"
|
||||
post "/createprofile", to: "recruitments#createprofile"
|
||||
patch "/updateprofile", to: "recruitments#updateprofile"
|
||||
get "/mydashboard", to: "recruitments#recruitment_dashboard"
|
||||
get "/addjob", to: "recruitments#addjob"
|
||||
get "/:id/editjob", to: "recruitments#editjob"
|
||||
post "/createjob", to: "recruitments#createjob"
|
||||
patch "/:id/updatejob", to: "recruitments#updatejob"
|
||||
get "/:id/markfilled", to: "recruitments#markfilled"
|
||||
get "/:id/unmarkfilled", to: "recruitments#unmarkfilled"
|
||||
delete "/:id/deletejob", to: "recruitments#deletejob"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
require "recruitment/engine"
|
||||
|
||||
module Recruitment
|
||||
end
|
|
@ -0,0 +1,26 @@
|
|||
module Recruitment
|
||||
class Engine < ::Rails::Engine
|
||||
initializer "recruitment" do
|
||||
OrbitApp.registration "Recruitment", :type => "ModuleApp" do
|
||||
module_label "recruitment.recruitment"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
frontend_enabled
|
||||
data_count 1..30
|
||||
set_keyword_contstraints ["/recruit/"]
|
||||
side_bar do
|
||||
head_label_i18n 'recruitment.recruitment', icon_class: "icons-briefcase"
|
||||
available_for "admin"
|
||||
active_for_controllers (['admin/recruitments'])
|
||||
head_link_path "admin_recruitments_path"
|
||||
|
||||
context_link 'recruitment.members',
|
||||
:link_path=>"admin_recruitments_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/recruitments'=>"index"},
|
||||
:available_for => 'admin'
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
module Recruitment
|
||||
VERSION = "0.0.1"
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
# desc "Explaining what the task does"
|
||||
# task :recruitment do
|
||||
# # Task goes here
|
||||
# end
|
|
@ -0,0 +1,19 @@
|
|||
$:.push File.expand_path("../lib", __FILE__)
|
||||
|
||||
# Maintain your gem's version:
|
||||
require "recruitment/version"
|
||||
|
||||
# Describe your gem and declare its dependencies:
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "recruitment"
|
||||
s.version = Recruitment::VERSION
|
||||
s.authors = ["Harry Bomrah"]
|
||||
s.email = ["harry@rulingcom.com"]
|
||||
s.homepage = "http://www.rulingcom.com"
|
||||
s.summary = "Module for recruitment"
|
||||
s.description = "Module for recruitment"
|
||||
s.license = "MIT"
|
||||
|
||||
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
|
||||
s.test_files = Dir["test/**/*"]
|
||||
end
|
|
@ -0,0 +1,28 @@
|
|||
== README
|
||||
|
||||
This README would normally document whatever steps are necessary to get the
|
||||
application up and running.
|
||||
|
||||
Things you may want to cover:
|
||||
|
||||
* Ruby version
|
||||
|
||||
* System dependencies
|
||||
|
||||
* Configuration
|
||||
|
||||
* Database creation
|
||||
|
||||
* Database initialization
|
||||
|
||||
* How to run the test suite
|
||||
|
||||
* Services (job queues, cache servers, search engines, etc.)
|
||||
|
||||
* Deployment instructions
|
||||
|
||||
* ...
|
||||
|
||||
|
||||
Please feel free to use a different markup language if you do not plan to run
|
||||
<tt>rake doc:app</tt>.
|
|
@ -0,0 +1,6 @@
|
|||
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
||||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
||||
|
||||
require File.expand_path('../config/application', __FILE__)
|
||||
|
||||
Rails.application.load_tasks
|
|
@ -0,0 +1,13 @@
|
|||
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||
// listed below.
|
||||
//
|
||||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
||||
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
||||
//
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// compiled file.
|
||||
//
|
||||
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
//= require_tree .
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
||||
* listed below.
|
||||
*
|
||||
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
||||
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
||||
*
|
||||
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
||||
* compiled file so the styles you add here take precedence over styles defined in any styles
|
||||
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
||||
* file per style scope.
|
||||
*
|
||||
*= require_tree .
|
||||
*= require_self
|
||||
*/
|
|
@ -0,0 +1,5 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
protect_from_forgery with: :exception
|
||||
end
|
|
@ -0,0 +1,2 @@
|
|||
module ApplicationHelper
|
||||
end
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Dummy</title>
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
||||
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<%= yield %>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env ruby
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||
load Gem.bin_path('bundler', 'bundle')
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env ruby
|
||||
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||
require_relative '../config/boot'
|
||||
require 'rails/commands'
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env ruby
|
||||
require_relative '../config/boot'
|
||||
require 'rake'
|
||||
Rake.application.run
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env ruby
|
||||
require 'pathname'
|
||||
|
||||
# path to your application root.
|
||||
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
||||
|
||||
Dir.chdir APP_ROOT do
|
||||
# This script is a starting point to setup your application.
|
||||
# Add necessary setup steps to this file:
|
||||
|
||||
puts "== Installing dependencies =="
|
||||
system "gem install bundler --conservative"
|
||||
system "bundle check || bundle install"
|
||||
|
||||
# puts "\n== Copying sample files =="
|
||||
# unless File.exist?("config/database.yml")
|
||||
# system "cp config/database.yml.sample config/database.yml"
|
||||
# end
|
||||
|
||||
puts "\n== Preparing database =="
|
||||
system "bin/rake db:setup"
|
||||
|
||||
puts "\n== Removing old logs and tempfiles =="
|
||||
system "rm -f log/*"
|
||||
system "rm -rf tmp/cache"
|
||||
|
||||
puts "\n== Restarting application server =="
|
||||
system "touch tmp/restart.txt"
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
# This file is used by Rack-based servers to start the application.
|
||||
|
||||
require ::File.expand_path('../config/environment', __FILE__)
|
||||
run Rails.application
|
|
@ -0,0 +1,26 @@
|
|||
require File.expand_path('../boot', __FILE__)
|
||||
|
||||
require 'rails/all'
|
||||
|
||||
Bundler.require(*Rails.groups)
|
||||
require "recruitment"
|
||||
|
||||
module Dummy
|
||||
class Application < Rails::Application
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
# Application configuration should go into files in config/initializers
|
||||
# -- all .rb files in that directory are automatically loaded.
|
||||
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
# config.time_zone = 'Central Time (US & Canada)'
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
|
||||
# Do not swallow errors in after_commit/after_rollback callbacks.
|
||||
config.active_record.raise_in_transactional_callbacks = true
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# Set up gems listed in the Gemfile.
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
||||
|
||||
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
||||
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
|
|
@ -0,0 +1,25 @@
|
|||
# SQLite version 3.x
|
||||
# gem install sqlite3
|
||||
#
|
||||
# Ensure the SQLite 3 gem is defined in your Gemfile
|
||||
# gem 'sqlite3'
|
||||
#
|
||||
default: &default
|
||||
adapter: sqlite3
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
database: db/development.sqlite3
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
<<: *default
|
||||
database: db/test.sqlite3
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
database: db/production.sqlite3
|
|
@ -0,0 +1,5 @@
|
|||
# Load the Rails application.
|
||||
require File.expand_path('../application', __FILE__)
|
||||
|
||||
# Initialize the Rails application.
|
||||
Rails.application.initialize!
|
|
@ -0,0 +1,41 @@
|
|||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
# In the development environment your application's code is reloaded on
|
||||
# every request. This slows down response time but is perfect for development
|
||||
# since you don't have to restart the web server when you make code changes.
|
||||
config.cache_classes = false
|
||||
|
||||
# Do not eager load code on boot.
|
||||
config.eager_load = false
|
||||
|
||||
# Show full error reports and disable caching.
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Print deprecation notices to the Rails logger.
|
||||
config.active_support.deprecation = :log
|
||||
|
||||
# Raise an error on page load if there are pending migrations.
|
||||
config.active_record.migration_error = :page_load
|
||||
|
||||
# Debug mode disables concatenation and preprocessing of assets.
|
||||
# This option may cause significant delays in view rendering with a large
|
||||
# number of complex assets.
|
||||
config.assets.debug = true
|
||||
|
||||
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
||||
# yet still be able to expire them through the digest params.
|
||||
config.assets.digest = true
|
||||
|
||||
# Adds additional error checking when serving assets at runtime.
|
||||
# Checks for improperly declared sprockets dependencies.
|
||||
# Raises helpful error messages.
|
||||
config.assets.raise_runtime_errors = true
|
||||
|
||||
# Raises error for missing translations
|
||||
# config.action_view.raise_on_missing_translations = true
|
||||
end
|
|
@ -0,0 +1,79 @@
|
|||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
# Code is not reloaded between requests.
|
||||
config.cache_classes = true
|
||||
|
||||
# Eager load code on boot. This eager loads most of Rails and
|
||||
# your application in memory, allowing both threaded web servers
|
||||
# and those relying on copy on write to perform better.
|
||||
# Rake tasks automatically ignore this option for performance.
|
||||
config.eager_load = true
|
||||
|
||||
# Full error reports are disabled and caching is turned on.
|
||||
config.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
||||
# Add `rack-cache` to your Gemfile before enabling this.
|
||||
# For large-scale production use, consider using a caching reverse proxy like
|
||||
# NGINX, varnish or squid.
|
||||
# config.action_dispatch.rack_cache = true
|
||||
|
||||
# Disable serving static files from the `/public` folder by default since
|
||||
# Apache or NGINX already handles this.
|
||||
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
||||
|
||||
# Compress JavaScripts and CSS.
|
||||
config.assets.js_compressor = :uglifier
|
||||
# config.assets.css_compressor = :sass
|
||||
|
||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||
config.assets.compile = false
|
||||
|
||||
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
||||
# yet still be able to expire them through the digest params.
|
||||
config.assets.digest = true
|
||||
|
||||
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
||||
|
||||
# Specifies the header that your server uses for sending files.
|
||||
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
# config.force_ssl = true
|
||||
|
||||
# Use the lowest log level to ensure availability of diagnostic information
|
||||
# when problems arise.
|
||||
config.log_level = :debug
|
||||
|
||||
# Prepend all log lines with the following tags.
|
||||
# config.log_tags = [ :subdomain, :uuid ]
|
||||
|
||||
# Use a different logger for distributed setups.
|
||||
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||
|
||||
# Use a different cache store in production.
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||
# config.action_controller.asset_host = 'http://assets.example.com'
|
||||
|
||||
# Ignore bad email addresses and do not raise email delivery errors.
|
||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
# Use default logging formatter so that PID and timestamp are not suppressed.
|
||||
config.log_formatter = ::Logger::Formatter.new
|
||||
|
||||
# Do not dump schema after migrations.
|
||||
config.active_record.dump_schema_after_migration = false
|
||||
end
|
|
@ -0,0 +1,42 @@
|
|||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
# The test environment is used exclusively to run your application's
|
||||
# test suite. You never need to work with it otherwise. Remember that
|
||||
# your test database is "scratch space" for the test suite and is wiped
|
||||
# and recreated between test runs. Don't rely on the data there!
|
||||
config.cache_classes = true
|
||||
|
||||
# Do not eager load code on boot. This avoids loading your whole application
|
||||
# just for the purpose of running a single test. If you are using a tool that
|
||||
# preloads Rails for running tests, you may have to set it to true.
|
||||
config.eager_load = false
|
||||
|
||||
# Configure static file server for tests with Cache-Control for performance.
|
||||
config.serve_static_files = true
|
||||
config.static_cache_control = 'public, max-age=3600'
|
||||
|
||||
# Show full error reports and disable caching.
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
# Raise exceptions instead of rendering exception templates.
|
||||
config.action_dispatch.show_exceptions = false
|
||||
|
||||
# Disable request forgery protection in test environment.
|
||||
config.action_controller.allow_forgery_protection = false
|
||||
|
||||
# Tell Action Mailer not to deliver emails to the real world.
|
||||
# The :test delivery method accumulates sent emails in the
|
||||
# ActionMailer::Base.deliveries array.
|
||||
config.action_mailer.delivery_method = :test
|
||||
|
||||
# Randomize the order test cases are executed.
|
||||
config.active_support.test_order = :random
|
||||
|
||||
# Print deprecation notices to the stderr.
|
||||
config.active_support.deprecation = :stderr
|
||||
|
||||
# Raises error for missing translations
|
||||
# config.action_view.raise_on_missing_translations = true
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Version of your assets, change this if you want to expire all your assets.
|
||||
Rails.application.config.assets.version = '1.0'
|
||||
|
||||
# Add additional assets to the asset load path
|
||||
# Rails.application.config.assets.paths << Emoji.images_path
|
||||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||
# Rails.application.config.assets.precompile += %w( search.js )
|
|
@ -0,0 +1,7 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||||
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
||||
|
||||
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
||||
# Rails.backtrace_cleaner.remove_silencers!
|
|
@ -0,0 +1,3 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Rails.application.config.action_dispatch.cookies_serializer = :json
|
|
@ -0,0 +1,4 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
Rails.application.config.filter_parameters += [:password]
|
|
@ -0,0 +1,16 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format. Inflections
|
||||
# are locale specific, and you may define rules for as many different
|
||||
# locales as you wish. All of these examples are active by default:
|
||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person', 'people'
|
||||
# inflect.uncountable %w( fish sheep )
|
||||
# end
|
||||
|
||||
# These inflection rules are supported but not enabled by default:
|
||||
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||
# inflect.acronym 'RESTful'
|
||||
# end
|
|
@ -0,0 +1,4 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
# Mime::Type.register "text/richtext", :rtf
|
|
@ -0,0 +1,3 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Rails.application.config.session_store :cookie_store, key: '_dummy_session'
|
|
@ -0,0 +1,10 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Preserve the timezone of the receiver when calling to `to_time`.
|
||||
# Ruby 2.4 will change the behavior of `to_time` to preserve the timezone
|
||||
# when converting to an instance of `Time` instead of the previous behavior
|
||||
# of converting to the local system timezone.
|
||||
#
|
||||
# Rails 5.0 introduced this config option so that apps made with earlier
|
||||
# versions of Rails are not affected when upgrading.
|
||||
ActiveSupport.to_time_preserves_timezone = true
|
|
@ -0,0 +1,14 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# This file contains settings for ActionController::ParamsWrapper which
|
||||
# is enabled by default.
|
||||
|
||||
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
||||
ActiveSupport.on_load(:action_controller) do
|
||||
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
||||
end
|
||||
|
||||
# To enable root element in JSON for ActiveRecord objects.
|
||||
# ActiveSupport.on_load(:active_record) do
|
||||
# self.include_root_in_json = true
|
||||
# end
|
|
@ -0,0 +1,23 @@
|
|||
# Files in the config/locales directory are used for internationalization
|
||||
# and are automatically loaded by Rails. If you want to use locales other
|
||||
# than English, add the necessary files in this directory.
|
||||
#
|
||||
# To use the locales, use `I18n.t`:
|
||||
#
|
||||
# I18n.t 'hello'
|
||||
#
|
||||
# In views, this is aliased to just `t`:
|
||||
#
|
||||
# <%= t('hello') %>
|
||||
#
|
||||
# To use a different locale, set it with `I18n.locale`:
|
||||
#
|
||||
# I18n.locale = :es
|
||||
#
|
||||
# This would use the information in config/locales/es.yml.
|
||||
#
|
||||
# To learn more, please read the Rails Internationalization guide
|
||||
# available at http://guides.rubyonrails.org/i18n.html.
|
||||
|
||||
en:
|
||||
hello: "Hello world"
|
|
@ -0,0 +1,4 @@
|
|||
Rails.application.routes.draw do
|
||||
|
||||
mount Recruitment::Engine => "/recruitment"
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Your secret key is used for verifying the integrity of signed cookies.
|
||||
# If you change this key, all old signed cookies will become invalid!
|
||||
|
||||
# Make sure the secret is at least 30 characters and all random,
|
||||
# no regular words or you'll be exposed to dictionary attacks.
|
||||
# You can use `rake secret` to generate a secure secret key.
|
||||
|
||||
# Make sure the secrets in this file are kept private
|
||||
# if you're sharing your code publicly.
|
||||
|
||||
development:
|
||||
secret_key_base: 9a948ca2397170e8c4e961536bdb75361b632344d1c106f64aa7c312c34a50bc5fae6a64b79e539c765c447767d70d24b67890a9a54360def746022adeeae522
|
||||
|
||||
test:
|
||||
secret_key_base: 9b9cf197b80ac35549621d60d0d10895ec775c388480f11669d22939d1dca1c33551ab41b0c14d1a435886451077caa7636e5e335a207cc56db6d8632a6221a1
|
||||
|
||||
# Do not keep production secrets in the repository,
|
||||
# instead read values from the environment.
|
||||
production:
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
|
@ -0,0 +1,67 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>The page you were looking for doesn't exist (404)</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<style>
|
||||
body {
|
||||
background-color: #EFEFEF;
|
||||
color: #2E2F30;
|
||||
text-align: center;
|
||||
font-family: arial, sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.dialog {
|
||||
width: 95%;
|
||||
max-width: 33em;
|
||||
margin: 4em auto 0;
|
||||
}
|
||||
|
||||
div.dialog > div {
|
||||
border: 1px solid #CCC;
|
||||
border-right-color: #999;
|
||||
border-left-color: #999;
|
||||
border-bottom-color: #BBB;
|
||||
border-top: #B00100 solid 4px;
|
||||
border-top-left-radius: 9px;
|
||||
border-top-right-radius: 9px;
|
||||
background-color: white;
|
||||
padding: 7px 12% 0;
|
||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 100%;
|
||||
color: #730E15;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
div.dialog > p {
|
||||
margin: 0 0 1em;
|
||||
padding: 1em;
|
||||
background-color: #F7F7F7;
|
||||
border: 1px solid #CCC;
|
||||
border-right-color: #999;
|
||||
border-left-color: #999;
|
||||
border-bottom-color: #999;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-top-color: #DADADA;
|
||||
color: #666;
|
||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- This file lives in public/404.html -->
|
||||
<div class="dialog">
|
||||
<div>
|
||||
<h1>The page you were looking for doesn't exist.</h1>
|
||||
<p>You may have mistyped the address or the page may have moved.</p>
|
||||
</div>
|
||||
<p>If you are the application owner check the logs for more information.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,67 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>The change you wanted was rejected (422)</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<style>
|
||||
body {
|
||||
background-color: #EFEFEF;
|
||||
color: #2E2F30;
|
||||
text-align: center;
|
||||
font-family: arial, sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.dialog {
|
||||
width: 95%;
|
||||
max-width: 33em;
|
||||
margin: 4em auto 0;
|
||||
}
|
||||
|
||||
div.dialog > div {
|
||||
border: 1px solid #CCC;
|
||||
border-right-color: #999;
|
||||
border-left-color: #999;
|
||||
border-bottom-color: #BBB;
|
||||
border-top: #B00100 solid 4px;
|
||||
border-top-left-radius: 9px;
|
||||
border-top-right-radius: 9px;
|
||||
background-color: white;
|
||||
padding: 7px 12% 0;
|
||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 100%;
|
||||
color: #730E15;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
div.dialog > p {
|
||||
margin: 0 0 1em;
|
||||
padding: 1em;
|
||||
background-color: #F7F7F7;
|
||||
border: 1px solid #CCC;
|
||||
border-right-color: #999;
|
||||
border-left-color: #999;
|
||||
border-bottom-color: #999;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-top-color: #DADADA;
|
||||
color: #666;
|
||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- This file lives in public/422.html -->
|
||||
<div class="dialog">
|
||||
<div>
|
||||
<h1>The change you wanted was rejected.</h1>
|
||||
<p>Maybe you tried to change something you didn't have access to.</p>
|
||||
</div>
|
||||
<p>If you are the application owner check the logs for more information.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>We're sorry, but something went wrong (500)</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<style>
|
||||
body {
|
||||
background-color: #EFEFEF;
|
||||
color: #2E2F30;
|
||||
text-align: center;
|
||||
font-family: arial, sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.dialog {
|
||||
width: 95%;
|
||||
max-width: 33em;
|
||||
margin: 4em auto 0;
|
||||
}
|
||||
|
||||
div.dialog > div {
|
||||
border: 1px solid #CCC;
|
||||
border-right-color: #999;
|
||||
border-left-color: #999;
|
||||
border-bottom-color: #BBB;
|
||||
border-top: #B00100 solid 4px;
|
||||
border-top-left-radius: 9px;
|
||||
border-top-right-radius: 9px;
|
||||
background-color: white;
|
||||
padding: 7px 12% 0;
|
||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 100%;
|
||||
color: #730E15;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
div.dialog > p {
|
||||
margin: 0 0 1em;
|
||||
padding: 1em;
|
||||
background-color: #F7F7F7;
|
||||
border: 1px solid #CCC;
|
||||
border-right-color: #999;
|
||||
border-left-color: #999;
|
||||
border-bottom-color: #999;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-top-color: #DADADA;
|
||||
color: #666;
|
||||
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- This file lives in public/500.html -->
|
||||
<div class="dialog">
|
||||
<div>
|
||||
<h1>We're sorry, but something went wrong.</h1>
|
||||
</div>
|
||||
<p>If you are the application owner check the logs for more information.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,8 @@
|
|||
require 'test_helper'
|
||||
|
||||
class NavigationTest < ActionDispatch::IntegrationTest
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RecruitmentTest < ActiveSupport::TestCase
|
||||
test "truth" do
|
||||
assert_kind_of Module, Recruitment
|
||||
end
|
||||
end
|
|
@ -0,0 +1,21 @@
|
|||
# Configure Rails Environment
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
|
||||
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
||||
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
||||
ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
|
||||
require "rails/test_help"
|
||||
|
||||
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
||||
# to be shown.
|
||||
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
||||
|
||||
# Load support files
|
||||
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
||||
|
||||
# Load fixtures from the engine
|
||||
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
||||
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
||||
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
||||
ActiveSupport::TestCase.fixtures :all
|
||||
end
|
Loading…
Reference in New Issue