Commit ce5928f4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'profile-settings'

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	app/views/profiles/accounts/show.html.haml
parents ad346233 9e50f28e
- page_title "Profile"
- header_title "Profile", profile_path
- page_title "Settings"
- header_title "Settings", profile_path
- sidebar "profile"
= render template: "layouts/application"
- page_title "Account"
%h3.page-title
= page_title
%p.light
Change your username and basic account settings.
%hr
- if current_user.ldap_user?
.alert.alert-info
Some options are unavailable for LDAP accounts
.account-page
%fieldset.update-token
%legend
.panel.panel-default.update-token
.panel-heading
Reset Private token
%div
.panel-body
= form_for @user, url: reset_private_token_profile_path, method: :put do |f|
.data
%p
......@@ -27,12 +32,11 @@
= f.submit 'Generate', class: "btn success btn-build-token"
- unless current_user.ldap_user?
%fieldset
- if current_user.otp_required_for_login
%legend.text-success
= icon('check')
.panel.panel-success
.panel-heading
Two-factor Authentication enabled
%div
.panel-body
.pull-right
= link_to 'Disable Two-factor Authentication', profile_two_factor_auth_path, method: :delete, class: 'btn btn-close btn-sm',
data: { confirm: 'Are you sure?' }
......@@ -44,8 +48,10 @@
invalidating all previous codes.
- else
%legend Two-factor Authentication
%div
.panel.panel-default
.panel-heading
Two-factor Authentication
.panel-body
%p
Increase your account's security by enabling two-factor authentication (2FA).
%p
......@@ -55,8 +61,10 @@
= link_to 'Enable Two-factor Authentication', new_profile_two_factor_auth_path, class: 'btn btn-success'
- if show_profile_social_tab?
%fieldset
%legend Connected Accounts
.panel.panel-default
.panel-heading
Connected Accounts
.panel-body
.oauth-buttons.append-bottom-10
%p Click on icon to activate signin with one of the following services
- enabled_social_providers.each do |provider|
......@@ -68,9 +76,10 @@
= icon('close')
- if show_profile_username_tab?
%fieldset.update-username
%legend
.panel.panel-warning.update-username
.panel-heading
Change Username
.panel-body
= form_for @user, url: update_username_profile_path, method: :put, remote: true do |f|
%p
Changing your username will change path to all personal projects!
......@@ -87,10 +96,10 @@
= f.submit 'Save username', class: "btn btn-warning"
- if show_profile_remove_tab?
%fieldset.remove-account
%legend
.panel.panel-danger.remove-account
.panel-heading
Remove account
%div
.panel-body
- if @user.can_be_removed?
%p Deleting an account has the following effects:
%ul
......@@ -106,4 +115,3 @@
%strong #{@user.solo_owned_groups.map(&:name).join(', ')}
%p
You must transfer ownership or delete these groups before you can delete yur account.
- page_title "Applications"
%h3.page-title
Application Settings
= page_title
%p.light
OAuth2 protocol settings below.
%hr
%fieldset.oauth-applications
%legend Your applications
%p= link_to 'New Application', new_oauth_application_path, class: 'btn btn-success'
.oauth-applications
%h3
Your applications
.pull-right
= link_to 'New Application', new_oauth_application_path, class: 'btn btn-success'
- if @applications.any?
%table.table.table-striped
%thead
......@@ -27,8 +30,9 @@
%td= link_to 'Edit', edit_oauth_application_path(application), class: 'btn btn-link btn-sm'
%td= render 'doorkeeper/applications/delete_form', application: application
%fieldset.oauth-authorized-applications.prepend-top-20
%legend Authorized applications
.oauth-authorized-applications.prepend-top-20
%h3
Authorized applications
- if @authorized_tokens.any?
%table.table.table-striped
......
- page_title "Design"
%h3.page-title
Design Settings
= page_title
%p.light
Appearance settings will be saved to your profile and made available across all devices.
%hr
= form_for @user, url: profile_path, remote: true, method: :put do |f|
%fieldset.application-theme
%legend
.panel.panel-default.application-theme
.panel-heading
Application theme
.panel-body
.themes_opts
= label_tag do
.prev.default
......@@ -42,9 +43,10 @@
%br
.clearfix
%fieldset.code-preview-theme
%legend
.panel.panel-default.code-preview-theme
.panel-heading
Code preview theme
.panel-body
.code_highlight_opts
- color_schemes.each do |color_scheme_id, color_scheme|
= label_tag do
......
- page_title "Emails"
%h3.page-title
Email Settings
= page_title
%p.light
Control emails linked to your account
%hr
%ul
%li
Your
%b Primary Email
will be used for avatar detection and web based operations, such as edits and merges.
%p.light
%li
Your
%b Notification Email
will be used for account notifications.
%p.light
%li
Your
%b Public Email
will be displayed on your public profile.
%p.light
%li
All email addresses will be used to identify your commits.
%hr
.panel.panel-default
.panel-heading
Emails (#{@emails.count + 1})
......
- page_title "SSH Keys"
%h3.page-title
SSH Keys Settings
= page_title
.pull-right
= link_to "Add SSH Key", new_profile_key_path, class: "btn btn-new"
%p.light
......
- page_title "Notifications"
%h3.page-title
Notifications Settings
= page_title
%p.light
These are your global notification settings.
%hr
......
- page_title "Password"
%h3.page-title Password Settings
%h3.page-title
= page_title
%p.light
- if @user.password_automatically_set?
Set your password.
......
- page_title "Settings"
- page_title "Profile"
%h3.page-title
Profile Settings
= page_title
%p.light
This information will appear on your profile.
- if current_user.ldap_user?
......
......@@ -7,6 +7,6 @@ class Spinach::Features::ProfileNotifications < Spinach::FeatureSteps
end
step 'I should see global notifications settings' do
page.should have_content "Notifications Settings"
page.should have_content "Notifications"
end
end
......@@ -3,7 +3,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
include SharedPaths
step 'I should see my profile info' do
page.should have_content "Profile Settings"
page.should have_content "This information will appear on your profile"
end
step 'I change my profile info' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment