Retrospring/app/views/user/edit.html.haml

61 lines
2.4 KiB
Plaintext
Raw Normal View History

2015-05-10 10:48:47 -07:00
- provide(:title, "Profile Settings | #{APP_CONFIG['site_name']}")
2014-11-02 11:52:19 -08:00
.container.j2-page
= render 'settings_tabs'
.col-md-9.col-xs-12.col-sm-9
= render 'layouts/messages'
2014-11-11 11:01:24 -08:00
.panel.panel-default
.panel-body
2014-12-29 02:21:43 -08:00
= bootstrap_form_for(current_user, url: {action: "edit"}, :html => { :multipart => true }, method: "patch") do |f|
2014-11-11 11:01:24 -08:00
= f.text_field :display_name, label: "Your name"
2014-12-29 04:52:19 -08:00
.media
.pull-left
2014-12-29 07:29:46 -08:00
%img.img-rounded.profile--img{src: current_user.profile_picture.url(:medium)}
2014-12-29 04:52:19 -08:00
.media-body
= f.file_field :profile_picture
2014-12-29 07:29:46 -08:00
.row#profile-picture-crop-controls{style: 'display: none;'}
.col-sm-10.col-md-8
2015-05-08 08:44:16 -07:00
%strong Adjust your new avatar
2014-12-29 07:29:46 -08:00
%img#profile-picture-cropper{src: current_user.profile_picture.url(:medium)}
.col-sm-2.col-md-4
.btn-group
%button#cropper-zoom-out.btn.btn-inverse{type: :button}
%i.fa.fa-search-minus
%button#cropper-zoom-in.btn.btn-inverse{type: :button}
%i.fa.fa-search-plus
2014-12-29 02:21:43 -08:00
2015-05-08 08:44:16 -07:00
.media
.pull-left
%img.img-rounded.header--img{src: current_user.profile_header.url(:mobile)}
.media-body
= f.file_field :profile_header
.row#profile-header-crop-controls{style: 'display: none;'}
.col-sm-10.col-md-8
%strong Adjust your new header
%img#profile-header-cropper{src: current_user.profile_header.url(:web)}
.col-sm-2.col-md-4
.btn-group
2015-05-08 09:14:54 -07:00
%button#cropper-header-zoom-out.btn.btn-inverse{type: :button}
2015-05-08 08:44:16 -07:00
%i.fa.fa-search-minus
2015-05-08 09:14:54 -07:00
%button#cropper-header-zoom-in.btn.btn-inverse{type: :button}
2015-05-08 08:44:16 -07:00
%i.fa.fa-search-plus
2014-12-26 15:19:55 -08:00
= f.text_field :motivation_header, label: "Motivation header", placeholder: 'Ask me anything!'
2014-11-29 13:34:11 -08:00
2015-02-01 11:07:52 -08:00
= f.text_field :website, label: "Website", placeholder: 'http://example.com'
2015-02-01 11:07:52 -08:00
= f.text_field :location, label: "Location", placeholder: 'Where are you?'
2015-02-01 11:07:52 -08:00
= f.text_area :bio, label: "Bio", placeholder: 'Tell us something nice about you!'
2014-12-29 05:50:25 -08:00
- for attrib in %i(crop_x crop_y crop_w crop_h)
= f.hidden_field attrib, id: attrib
2015-05-08 08:44:16 -07:00
- for attrib in %i(crop_h_x crop_h_y crop_h_w crop_h_h)
= f.hidden_field attrib, id: attrib
= f.submit "Save settings", class: 'btn btn-primary'