diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-21 00:54:03 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-21 00:54:03 +0000 |
commit | f0d052b6e73066ad451685f5a3dfdb1032cf95ea (patch) | |
tree | fc4da12d719c7e41a98a66c10a8a05163d726e50 /app | |
parent | 52c3a3a0d29c37275e22da71dbabead7b3dd0609 (diff) | |
parent | d85f396fe55e0c8d6593bbd2dcb06990da48d9b7 (diff) | |
download | gitlab-ce-f0d052b6e73066ad451685f5a3dfdb1032cf95ea.tar.gz |
Merge branch 'user-location' into 'master'
Location field in user profile
Twitter allows you to set string with location information.
I find it very useful in work to know where user from. It allows to communicate with knowing time difference and cultural things.
See merge request !411
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/profiles_controller.rb | 2 | ||||
-rw-r--r-- | app/views/profiles/show.html.haml | 3 | ||||
-rw-r--r-- | app/views/users/_profile.html.haml | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 3c7f45d559b..9252e85e8cc 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -69,7 +69,7 @@ class ProfilesController < ApplicationController params.require(:user).permit( :email, :password, :password_confirmation, :bio, :name, :username, :skype, :linkedin, :twitter, :website_url, :color_scheme_id, :theme_id, - :avatar, :hide_no_ssh_key, :hide_no_password + :avatar, :hide_no_ssh_key, :hide_no_password, :location ) end end diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 409b6b5a193..5a501e43149 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -54,6 +54,9 @@ = f.label :website_url, 'Website', class: "control-label" .col-sm-10= f.text_field :website_url, class: "form-control" .form-group + = f.label :location, 'Location', class: "control-label" + .col-sm-10= f.text_field :location, class: "form-control" + .form-group = f.label :bio, class: "control-label" .col-sm-10 = f.text_area :bio, rows: 4, class: "form-control", maxlength: 250 diff --git a/app/views/users/_profile.html.haml b/app/views/users/_profile.html.haml index 0a70b738071..a073e5048e7 100644 --- a/app/views/users/_profile.html.haml +++ b/app/views/users/_profile.html.haml @@ -21,6 +21,10 @@ %li %span.light Website: %strong= link_to user.short_website_url, user.full_website_url + - unless user.location.blank? + %li + %span.light Location: + %strong= user.location - unless user.bio.blank? %li %span.light Bio: |