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
Kazuhiko Shiozaki
gitlab-ce
Commits
9fa4df16
Commit
9fa4df16
authored
Oct 21, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
now you can view comrade profile info #134
parent
b3279b9b
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
8 deletions
+58
-8
app/views/projects/_top_menu.html.haml
app/views/projects/_top_menu.html.haml
+1
-1
app/views/team_members/_show.html.haml
app/views/team_members/_show.html.haml
+4
-2
app/views/team_members/show.html.haml
app/views/team_members/show.html.haml
+28
-0
db/migrate/20111021101550_change_social_fields_in_users.rb
db/migrate/20111021101550_change_social_fields_in_users.rb
+10
-0
db/schema.rb
db/schema.rb
+4
-4
spec/requests/team_members_spec.rb
spec/requests/team_members_spec.rb
+9
-0
spec/support/login.rb
spec/support/login.rb
+2
-1
No files found.
app/views/projects/_top_menu.html.haml
View file @
9fa4df16
...
...
@@ -5,7 +5,7 @@
%span
=
link_to
"Tree"
,
tree_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"tree"
,
:id
=>
@project
)
?
"current"
:
nil
%span
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"commits"
,
:action
=>
"index"
,
:project_id
=>
@project
)
?
"current"
:
nil
%span
=
link_to
team_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"team"
,
:id
=>
@project
)
?
"current"
:
nil
do
=
link_to
team_project_path
(
@project
),
:class
=>
(
current_page?
(
:controller
=>
"projects"
,
:action
=>
"team"
,
:id
=>
@project
)
||
controller
.
controller_name
==
"team_members"
)
?
"current"
:
nil
do
Team
-
if
@project
.
users_projects
.
count
>
0
%span
{
:class
=>
"top_menu_count"
}=
@project
.
users_projects
.
count
...
...
app/views/team_members/_show.html.haml
View file @
9fa4df16
-
user
=
member
.
user
%tr
{
:id
=>
dom_id
(
member
)}
%td
=
image_tag
gravatar_icon
(
user
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding:0 5px;"
=
truncate
user
.
name
,
:lenght
=>
16
=
link_to
image_tag
(
gravatar_icon
(
user
.
email
),
:class
=>
"left"
,
:width
=>
40
,
:style
=>
"padding:0 5px;"
),
project_team_member_path
(
@project
,
member
)
=
link_to
truncate
(
user
.
name
,
:lenght
=>
16
),
project_team_member_path
(
@project
,
member
)
%td
=
truncate
user
.
email
,
:lenght
=>
16
-
if
can?
current_user
,
:admin_project
,
@project
=
form_for
(
member
,
:as
=>
:team_member
,
:url
=>
project_team_member_path
(
@project
,
member
))
do
|
f
|
...
...
app/views/team_members/show.html.haml
0 → 100644
View file @
9fa4df16
-
user
=
@team_member
.
user
.span-2
=
image_tag
gravatar_icon
(
user
.
email
),
:class
=>
"left"
,
:width
=>
60
,
:style
=>
"padding-right:5px;"
%p
%b
Name:
=
user
.
name
%p
%b
Email:
=
user
.
email
%br
-
unless
user
.
skype
.
empty?
.div
%b
Skype:
=
user
.
skype
-
unless
user
.
linkedin
.
empty?
.div
%b
LinkedIn:
=
user
.
linkedin
-
unless
user
.
twitter
.
empty?
.div
%b
Twitter:
=
user
.
twitter
db/migrate/20111021101550_change_social_fields_in_users.rb
0 → 100644
View file @
9fa4df16
class
ChangeSocialFieldsInUsers
<
ActiveRecord
::
Migration
def
up
change_column
(
:users
,
:skype
,
:string
,
{
:null
=>
false
,
:default
=>
''
})
change_column
(
:users
,
:linkedin
,
:string
,
{
:null
=>
false
,
:default
=>
''
})
change_column
(
:users
,
:twitter
,
:string
,
{
:null
=>
false
,
:default
=>
''
})
end
def
down
end
end
db/schema.rb
View file @
9fa4df16
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
201110
19212429
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
201110
21101550
)
do
create_table
"issues"
,
:force
=>
true
do
|
t
|
t
.
string
"title"
...
...
@@ -82,9 +82,9 @@ ActiveRecord::Schema.define(:version => 20111019212429) do
t
.
string
"name"
t
.
boolean
"admin"
,
:default
=>
false
,
:null
=>
false
t
.
integer
"projects_limit"
,
:default
=>
10
t
.
string
"skype"
t
.
string
"linkedin"
t
.
string
"twitter"
t
.
string
"skype"
,
:default
=>
""
,
:null
=>
false
t
.
string
"linkedin"
,
:default
=>
""
,
:null
=>
false
t
.
string
"twitter"
,
:default
=>
""
,
:null
=>
false
end
add_index
"users"
,
[
"email"
],
:name
=>
"index_users_on_email"
,
:unique
=>
true
...
...
spec/requests/team_members_spec.rb
View file @
9fa4df16
...
...
@@ -7,6 +7,15 @@ describe "TeamMembers" do
@project
.
add_access
(
@user
,
:read
,
:admin
)
end
describe
"View profile"
do
it
"should be available"
do
visit
(
team_project_path
(
@project
))
find
(
:xpath
,
"//table[@id='team-table']//a[1]"
).
click
page
.
should
have_content
@user
.
skype
page
.
should_not
have_content
'Twitter'
end
end
describe
"New Team member"
,
:js
=>
true
do
before
do
@user_1
=
Factory
:user
...
...
spec/support/login.rb
View file @
9fa4df16
...
...
@@ -3,7 +3,8 @@ module LoginMacros
@user
=
User
.
create
(
:email
=>
"user
#{
User
.
count
}
@mail.com"
,
:name
=>
"John Smith"
,
:password
=>
"123456"
,
:password_confirmation
=>
"123456"
)
:password_confirmation
=>
"123456"
,
:skype
=>
'user_skype'
)
if
role
==
:admin
@user
.
admin
=
true
...
...
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