rosa-build/app/views/users/_form.html.haml

74 lines
2.0 KiB
Plaintext
Raw Normal View History

2012-03-20 18:11:28 +00:00
- if current_user.admin?
.leftlist
= f.label :role, t("activerecord.attributes.user.role"), :class => :label
.rightlist
2012-03-22 14:50:15 +00:00
= f.select :role, User::ROLES, {}, {:name => 'role'}
2012-03-21 20:05:27 +00:00
- if @user.new_record?
.leftlist
= f.label :uname, t("activerecord.attributes.user.uname")
.rightlist
2012-03-22 11:17:11 +00:00
= f.text_field :uname, :name => 'uname'
2012-03-21 20:05:27 +00:00
.leftlist
= f.label :password, t("activerecord.attributes.user.password")
.rightlist
= f.password_field :password
.both
.leftlist
2012-03-21 20:10:40 +00:00
= f.label :password_confirmation, t("activerecord.attributes.user.password_confirm")
2012-03-21 20:05:27 +00:00
.rightlist
= f.password_field :password_confirmation
.both
.leftlist
= f.label :name, t("activerecord.attributes.user.name")
.rightlist
= f.text_field :name
.both
.leftlist
= f.label :email, t("activerecord.attributes.user.email")
.rightlist
= f.text_field :email
.both
.leftlist
= f.label :site, t("activerecord.attributes.user.site")
.rightlist
= f.text_field :site
.both
.leftlist
= f.label :language, t("activerecord.attributes.user.language")
.rightlist
= f.select :language, User::LANGUAGES_FOR_SELECT
.both
.leftlist
= f.label :company, t("activerecord.attributes.user.company")
.rightlist
= f.text_field :company
.both
.leftlist
= f.label :location, t("activerecord.attributes.user.location")
.rightlist
= f.text_field :location
.both
.leftlist
= f.label :avatar, t("layout.users.avatar_with_size", :max => number_to_human_size(User::MAX_AVATAR_SIZE))
.rightlist
= image_tag(avatar_url(@user, :medium))
.leftlist
.rightlist
.check
%span#niceCheckbox1.niceCheck-main
= check_box_tag "delete_avatar", 1, false, :class => 'niceCheckbox1'
.forcheck= t('layout.users.delete_avatar')
.both
= f.file_field :avatar
.both
.leftlist
= f.label :professional_experience, t("activerecord.attributes.user.professional_experience")
.rightlist
= f.text_area :professional_experience
.both
.leftlist
\ 
.rightlist
= submit_tag t("layout.save")
.both