Skip to content

Commit

Permalink
Refactor job worflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xibman committed Feb 5, 2012
1 parent 12ff17f commit 5f8511c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 26 deletions.
27 changes: 23 additions & 4 deletions app/assets/stylesheets/controllers/jobs.css.scss
Expand Up @@ -151,14 +151,33 @@
========================================================================== */
.jobForm{
background:image-url('here.png') right 352px no-repeat;
.block{
margin-top:10px;
text-align:center;
}
}

#jobFormLeft{
.jobFormLeft{
display:inline-block;
width:450px;
}

#jobFormRight{
@extend #jobFormLeft;
.jobFormRight{
@extend .jobFormLeft;
margin-left:55px;
}
}

#jobFormType{
ul{
list-style-type:none;
margin:0;
padding:0;
}
label{
display:inline-block;
margin-left:10px;
}
input{
display:inline-block;
}
}
54 changes: 32 additions & 22 deletions app/views/jobs/_form.html.haml
@@ -1,39 +1,49 @@
= simple_form_for @job , :html => {:multipart => true, :class => "jobForm"} do |f|
%fieldset
%legend= "Poster votre annonce"
#jobFormLeft
.jobFormLeft
= f.input :company, :autofocus => "autofocus"
= f.input :email, :label => "Email <span style='font-size:11px;'>(sera utilisé pour gérer votre annonce et vous faire contacter par un candidat)</span>".html_safe unless action_name == 'edit'
= f.input :url, :placeholder => "http://www.railsfrance.org"
%label
Logo de votre entreprise
%span{:style => 'font-size:11px;'}
(sera redimensionné en 200x100px)
%div
Envoyer un fichier
= f.input :logo, :as => :file, :label => false
%div
%label
Ou renseigner une url
= f.text_field :logo_url

= image_tag @job.logo.thumb('200x100').url if @job.logo_uid
= f.hidden_field :retained_logo
#jobFormRight
#jobFormType
%ul
%li
= f.input :cdi
%li
= f.input :cdd
%li
= f.input :freelance
%li
= f.input :internship
.jobFormRight
= f.input :title
= f.input :street
= f.input :city
= f.input :postal_code
= f.input :description, :as => :wysiwyg, :wrapper_html => { :class => "clear" }
%p.markdownLink La syntaxe #{link_to "Markdown", "http://github.github.com/github-flavored-markdown/","data-skip-pjax" => "true", :target => "_blank", :id => "markdownHelp"} est supportée
#jobFormType
= f.input :cdi
= f.input :cdd
= f.input :freelance
= f.input :internship
.jobFormLeft
%div
%label
Logo de votre entreprise
%span{:style => 'font-size:11px;'}
(sera redimensionné en 200x100px)
%div
Envoyer un fichier
= f.input :logo, :as => :file, :label => false
%div
%label
Ou renseigner une url
= f.text_field :logo_url

= image_tag @job.logo.thumb('200x100').url if @job.logo_uid
= f.hidden_field :retained_logo
.jobFormRight
= recaptcha_tags

- unless @job.errors[:contracts_error].empty?
%span.error= @job.errors[:contracts_error].first
= recaptcha_tags

- if @job.errors[:base].any?
%span.error= @job.errors[:base].join("<br/>")
.block
Expand Down

0 comments on commit 5f8511c

Please sign in to comment.