-
-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathedit.slim
33 lines (31 loc) · 1.41 KB
/
edit.slim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
section
h3= t "profile.edit"
ul= render 'users/list', users: [user]
= simple_form_for user do |f|
= f.input :name
- unless user.with_provider? :twitter
= f.input :twitter, input_html: { placeholder: 'Twitter handle' }
- unless user.with_provider? :github
= f.input :github, input_html: { placeholder: 'GitHub handle' }
= f.input :linkedin, input_html: { placeholder: 'Linkedin handle' }
= f.input :email
= f.input :url
= f.input :description, type: :text_area
.info== t("topic.markdown")
br
= f.input :freelancer
= f.input :available
= f.input :hide_jobs
= f.button :submit, class: 'btn-primary'
p= button_to t("profile.remove_account"), current_user, method: :delete, class: 'btn btn-danger', data: { confirm: t("profile.remove_confirm") }
section
h3= t('profile.authorizations')
ul
- existing_providers = user.authorizations.map(&:provider)
- login_providers.each do |provider|
li
= button_to label_auth_url(provider), title: t("login.#{provider}_login"), class: "btn btn-#{existing_providers.include?(provider) ? 'disabled' : 'secondary'}", disabled: existing_providers.include?(provider) do
= fa_icon icon_for_provider(provider), class: 'fa-fw dropdown-list-icon'
=> t("login.#{provider}_login")
- if existing_providers.include? provider
= fa_icon 'check', class: 'fa-fw dropdown-list-icon'