Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boshu first commit #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class Project
validates :people_count, :title, :intro, :province,:province_id, :stage, :presence =>true
validates_inclusion_of :has_patent, :in => [true, false]
validates_presence_of :project_field_ids

validates_numericality_of :people_count, :only_integer=>true, :greater_than=>0

accepts_nested_attributes_for :photos, :allow_destroy => true

def add_admin user
Expand Down
8 changes: 4 additions & 4 deletions app/views/ind_users/_navigation.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
%li{:class=>"#{params[:controller]=='ind_users' && params[:action]=='overview' ? 'active':''}"}
=link_to "工作圈主页", ind_user_overview_path

%li{:class=>is_active?('job_searches#show')}=link_to '搜职位',default_jobs_path
%li{:class=>is_active?('company_searches#show')}=link_to '搜公司',default_companies_path
%li{:class=>is_active?('job_searches#show')}=link_to '职位信息',default_jobs_path
%li{:class=>is_active?('company_searches#show')}=link_to '公司信息',default_companies_path


%li{:class=>"dropdown #{is_active?("job_posts#new")} #{is_active?("ind_users#job_posts")}",:"data-dropdown"=>"dropdown" }
=link_to_function "职位发布",'$(".dropdown-menu.job_navigation").toggle()', :class=>"dropdown-toggle"
=link_to_function "职位管理",'$(".dropdown-menu.job_navigation").toggle()', :class=>"dropdown-toggle"
%ul.dropdown-menu.job_navigation
%li=link_to "发布职位",new_job_post_path
%li=link_to "发布存档",ind_user_job_posts_path(current_user)
%li=link_to "查看历史",ind_user_job_posts_path(current_user)



Expand Down
17 changes: 11 additions & 6 deletions app/views/job_searches/_form.html.haml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
=semantic_form_for @search do |f|
=f.inputs do
.row
.span2=f.input :keywords
.span3
=f.input :keywords

=submit_tag "搜索",:class=>"btn"

%h4.span3 附加选项
.span3=f.input :industry_id, :as=>:select, :collection=>Industry.all
.span2=f.input :province_id, :as=>:select, :collection=>Province.all
.span2=f.input :salary, :as=>:select, :collection => JobPost.salaries_for_select(:value)
.span2=f.input :years_required, :as=>:select, :collection => JobPost.years_requireds_for_select(:value)
.span2
.span3=f.input :province_id, :as=>:select, :collection=>Province.all
.span3=f.input :salary, :as=>:select, :collection => JobPost.salaries_for_select(:value)
.span3=f.input :years_required, :as=>:select, :collection => JobPost.years_requireds_for_select(:value)
.span3
=submit_tag "搜索全部职位",:class=>"btn"
.span2
.span3
=link_to "查看默认匹配",default_jobs_path,:class=>"btn"

62 changes: 33 additions & 29 deletions app/views/job_searches/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
=render 'ind_users/navigation'
=render 'job_searches/form'
%h4
=@is_new ? "自动匹配职位" : "搜索结果"
.row
.span3.search
%h3 搜索选项
=render 'job_searches/form'
.span12
%h4
=@is_new ? "自动匹配职位" : "搜索结果"

-if @job_posts.empty?
-if @is_new
没有找到匹配您技能的职位。请添加技能获取匹配!
=link_to "添加技能",user_edit_path(current_user.id,"skill"),:class=>"btn"
-else
搜索结果为0,请试试别的搜索参数!
-else
%table.zebra-striped
%tr
%th 公司/机构
%th 职位
%th 月薪
%th 地点
%th 截止日期
%th
%th
- for job_post in @job_posts
%tr
%td= job_post.company_name
%td=link_to job_post.title,job_post
%td= job_post.salary ||'面议'
%td= job_post.city.name
%td= l job_post.expiration,:format=>:long unless job_post.expiration.nil?
%td.span3= bookmark_code job_post
%td= view_code job_post
=paginate @job_posts
-if @job_posts.empty?
-if @is_new
没有找到匹配您技能的职位。请添加技能获取匹配!
=link_to "添加技能",user_edit_path(current_user.id,"skill"),:class=>"btn"
-else
搜索结果为0,请试试别的搜索参数!
-else
%table.zebra-striped
%tr
%th 公司/机构
%th 职位
%th 月薪
%th 地点
%th 截止日期
%th
%th
- for job_post in @job_posts
%tr
%td= job_post.company_name
%td=link_to job_post.title,job_post
%td= job_post.salary ||'面议'
%td= job_post.city.name
%td= l job_post.expiration,:format=>:long unless job_post.expiration.nil?
%td.span3= bookmark_code job_post
%td= view_code job_post
=paginate @job_posts
2 changes: 1 addition & 1 deletion app/views/layouts/_header.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
=link_to image_tag('logo.png',height: 60),root_path, :class=>"brand"

%ul.nav
%li{:class=>is_active?("shouts#index")}=link_to "悟空微博",myshouts_path
%li{:class=>"#{is_active?("job#.")}#{is_active?("company_searches#.")}"}=link_to '工作圈',ind_user_overview_path || root_path


Expand Down Expand Up @@ -33,6 +32,7 @@
%li{:class=>"#{params[:action]=='bookmarked_jobs' ? 'active':''}"}=link_to "收藏的职位",bookmarked_jobs_path

%ul{class: "nav", style: "float: right;"}
%li{:class=>is_active?("shouts#index")}=link_to "悟空微博",myshouts_path
%li{:class=>"dropdown #{is_active?("users#edit")}",:"data-dropdown"=>"dropdown"}
=link_to_function "我的账户",'$(".dropdown-menu.setting").toggle()', :class=>"dropdown-toggle"
%ul.dropdown-menu.setting
Expand Down
2 changes: 1 addition & 1 deletion app/views/org_users/_side_nav.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
%li{:class=>"#{params[:info]=='account'? "active":""}"}=link_to "修改密码",org_user_edit_path(current_user.id,'account')
%ul.side_nav
%li 修改机构信息
%li{:class=>"#{params[:info]=='profile'? "active":""}"}=link_to "基本信息",org_user_edit_path(current_user.id,'profile')
%li{:class=>"#{params[:info]=='profile'? "active":""}"}=link_to "必填信息",org_user_edit_path(current_user.id,'profile')
/%li{:class=>"#{params[:info]=='skill'? "active":""}"}=link_to "寻求技能",org_user_edit_path(current_user.id,'skill')

5 changes: 4 additions & 1 deletion app/views/shared/_skill_picker.html.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.row
.span10
%b 技能选择:
您同时使用下方列表选择。如果您的技能不在列表之中,请用Tab键添加。
.help-block
%strong 提示
您同时使用下方列表选择。
如果您的技能不在列表之中,请用Tab键添加。
%br
%br
.span10.skills=text_field_tag :skills
Expand Down
6 changes: 3 additions & 3 deletions app/views/shouts/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
%ul{:class=>"tabs",:"data-tabs"=>"tabs"}

%li{:class=>"#{params[:type]==nil ? 'active':''}"}=link_to "大家的微博", myshouts_path
%li{:class=>"#{params[:type]=="follow" ? 'active':''}"}=link_to "我关注的微博", myshouts_path("follow")
%li{:class=>"#{params[:type]=="me" ? 'active':''}"}=link_to "我写的微博", myshouts_path("me")
%li{:class=>"#{params[:type]==nil ? 'active':''}"}=link_to "大家正在说", myshouts_path
%li{:class=>"#{params[:type]=="follow" ? 'active':''}"}=link_to "我的关注", myshouts_path("follow")
%li{:class=>"#{params[:type]=="me" ? 'active':''}"}=link_to "我的发言", myshouts_path("me")



Expand Down
Binary file removed config/.routes.rb.swp
Binary file not shown.
4 changes: 4 additions & 0 deletions config/locales/mongoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ ch:
messages:
blank:
不能为空
not_a_number:
需要填写数字
greater_than:
需要大于%{count}
callbacks:
"Calling %{method} on %{klass} resulted in a false return from a callback."
taken:
Expand Down
2 changes: 1 addition & 1 deletion db/seeds/school.seeds.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
School.populate
#School.populate
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:13px; margin:8px;}
body {background:#FFF;}
body.mceForceColors {background:#FFF; color:#000;}
body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
Expand Down