diff --git a/app/models/project.rb b/app/models/project.rb index 721ae55..063b1ca 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 diff --git a/app/views/ind_users/_navigation.html.haml b/app/views/ind_users/_navigation.html.haml index c513c61..5bc8941 100644 --- a/app/views/ind_users/_navigation.html.haml +++ b/app/views/ind_users/_navigation.html.haml @@ -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) diff --git a/app/views/job_searches/_form.html.haml b/app/views/job_searches/_form.html.haml index 88aa917..2dd6ab7 100644 --- a/app/views/job_searches/_form.html.haml +++ b/app/views/job_searches/_form.html.haml @@ -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" diff --git a/app/views/job_searches/show.html.haml b/app/views/job_searches/show.html.haml index 85f2d91..6e4cec2 100644 --- a/app/views/job_searches/show.html.haml +++ b/app/views/job_searches/show.html.haml @@ -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 diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 50733bc..d1bfd4d 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -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 @@ -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 diff --git a/app/views/org_users/_side_nav.html.haml b/app/views/org_users/_side_nav.html.haml index c7a332c..3939bc7 100644 --- a/app/views/org_users/_side_nav.html.haml +++ b/app/views/org_users/_side_nav.html.haml @@ -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') diff --git a/app/views/shared/_skill_picker.html.haml b/app/views/shared/_skill_picker.html.haml index 89cd680..01e7b36 100644 --- a/app/views/shared/_skill_picker.html.haml +++ b/app/views/shared/_skill_picker.html.haml @@ -1,7 +1,10 @@ .row .span10 %b 技能选择: - 您同时使用下方列表选择。如果您的技能不在列表之中,请用Tab键添加。 + .help-block + %strong 提示 + 您同时使用下方列表选择。 + 如果您的技能不在列表之中,请用Tab键添加。 %br %br .span10.skills=text_field_tag :skills diff --git a/app/views/shouts/index.html.haml b/app/views/shouts/index.html.haml index ba54910..52256f4 100644 --- a/app/views/shouts/index.html.haml +++ b/app/views/shouts/index.html.haml @@ -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") diff --git a/config/.routes.rb.swp b/config/.routes.rb.swp deleted file mode 100644 index 995d167..0000000 Binary files a/config/.routes.rb.swp and /dev/null differ diff --git a/config/locales/mongoid.yml b/config/locales/mongoid.yml index 71e65b1..c6583d9 100644 --- a/config/locales/mongoid.yml +++ b/config/locales/mongoid.yml @@ -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: diff --git a/db/seeds/school.seeds.rb b/db/seeds/school.seeds.rb index ca563ff..3df2582 100644 --- a/db/seeds/school.seeds.rb +++ b/db/seeds/school.seeds.rb @@ -1 +1 @@ -School.populate +#School.populate diff --git a/public/assets/tinymce/themes/advanced/skins/default/content.css b/public/assets/tinymce/themes/advanced/skins/default/content.css index 2fd94a1..3370366 100644 --- a/public/assets/tinymce/themes/advanced/skins/default/content.css +++ b/public/assets/tinymce/themes/advanced/skins/default/content.css @@ -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;}