Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
6ef20926
Commit
6ef20926
authored
Mar 20, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add location to user profile
parent
476199e0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
2 deletions
+14
-2
CHANGELOG
CHANGELOG
+1
-0
app/controllers/profiles_controller.rb
app/controllers/profiles_controller.rb
+1
-1
app/views/profiles/show.html.haml
app/views/profiles/show.html.haml
+3
-0
db/migrate/20150320234437_add_location_to_user.rb
db/migrate/20150320234437_add_location_to_user.rb
+5
-0
db/schema.rb
db/schema.rb
+2
-1
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+2
-0
No files found.
CHANGELOG
View file @
6ef20926
...
...
@@ -9,6 +9,7 @@ v 7.10.0 (unreleased)
- Improve diff UI
- Fix alignment of navbar toggle button (Cody Mize)
- Identical look of selectboxes in UI
- Add location field to user profile
v 7.9.0 (unreleased)
- Add HipChat integration documentation (Stan Hu)
...
...
app/controllers/profiles_controller.rb
View file @
6ef20926
...
...
@@ -68,7 +68,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
app/views/profiles/show.html.haml
View file @
6ef20926
...
...
@@ -53,6 +53,9 @@
.form-group
=
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
...
...
db/migrate/20150320234437_add_location_to_user.rb
0 → 100644
View file @
6ef20926
class
AddLocationToUser
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:location
,
:string
end
end
db/schema.rb
View file @
6ef20926
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201503
13012111
)
do
ActiveRecord
::
Schema
.
define
(
version:
201503
20234437
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -473,6 +473,7 @@ ActiveRecord::Schema.define(version: 20150313012111) do
t
.
boolean
"password_automatically_set"
,
default:
false
t
.
string
"bitbucket_access_token"
t
.
string
"bitbucket_access_token_secret"
t
.
string
"location"
end
add_index
"users"
,
[
"admin"
],
name:
"index_users_on_admin"
,
using: :btree
...
...
features/steps/profile/profile.rb
View file @
6ef20926
...
...
@@ -11,6 +11,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
fill_in
"user_linkedin"
,
with:
"testlinkedin"
fill_in
"user_twitter"
,
with:
"testtwitter"
fill_in
"user_website_url"
,
with:
"testurl"
fill_in
"user_location"
,
with:
"Ukraine"
click_button
"Save changes"
@user
.
reload
end
...
...
@@ -20,6 +21,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
@user
.
linkedin
.
should
==
'testlinkedin'
@user
.
twitter
.
should
==
'testtwitter'
@user
.
website_url
.
should
==
'testurl'
find
(
"#user_location"
).
value
.
should
==
"Ukraine"
end
step
'I change my avatar'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment