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
Léo-Paul Géneau
gitlab-ce
Commits
98b7717d
Commit
98b7717d
authored
Apr 04, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove user decorator
parent
568ce1ed
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
32 deletions
+10
-32
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+3
-15
app/controllers/admin/teams/members_controller.rb
app/controllers/admin/teams/members_controller.rb
+0
-1
app/controllers/milestones_controller.rb
app/controllers/milestones_controller.rb
+1
-1
app/controllers/teams/members_controller.rb
app/controllers/teams/members_controller.rb
+0
-1
app/decorators/user_decorator.rb
app/decorators/user_decorator.rb
+0
-11
app/models/user.rb
app/models/user.rb
+4
-0
app/views/issues/_issue.html.haml
app/views/issues/_issue.html.haml
+1
-1
app/views/milestones/show.html.haml
app/views/milestones/show.html.haml
+1
-2
No files found.
app/assets/stylesheets/common.scss
View file @
98b7717d
...
@@ -111,22 +111,10 @@ span.update-author {
...
@@ -111,22 +111,10 @@ span.update-author {
}
}
.label
{
.label
{
padding
:
0
px
4px
;
padding
:
1
px
4px
;
font-size
:
1
0
px
;
font-size
:
1
2
px
;
font-style
:
normal
;
font-style
:
normal
;
background-color
:
$link_color
;
font-weight
:
normal
;
&
.label-success
{
background-color
:
#8D8
;
color
:
#333
;
text-shadow
:
0
1px
1px
white
;
}
&
.label-error
{
background-color
:
#D88
;
color
:
#333
;
text-shadow
:
0
1px
1px
white
;
}
}
}
form
{
form
{
...
...
app/controllers/admin/teams/members_controller.rb
View file @
98b7717d
class
Admin::Teams::MembersController
<
Admin
::
Teams
::
ApplicationController
class
Admin::Teams::MembersController
<
Admin
::
Teams
::
ApplicationController
def
new
def
new
@users
=
User
.
potential_team_members
(
user_team
)
@users
=
User
.
potential_team_members
(
user_team
)
@users
=
UserDecorator
.
decorate_collection
@users
end
end
def
create
def
create
...
...
app/controllers/milestones_controller.rb
View file @
98b7717d
...
@@ -32,7 +32,7 @@ class MilestonesController < ProjectResourceController
...
@@ -32,7 +32,7 @@ class MilestonesController < ProjectResourceController
def
show
def
show
@issues
=
@milestone
.
issues
@issues
=
@milestone
.
issues
@users
=
UserDecorator
.
decorate_collection
(
@milestone
.
participants
)
@users
=
@milestone
.
participants
@merge_requests
=
@milestone
.
merge_requests
@merge_requests
=
@milestone
.
merge_requests
respond_to
do
|
format
|
respond_to
do
|
format
|
...
...
app/controllers/teams/members_controller.rb
View file @
98b7717d
...
@@ -8,7 +8,6 @@ class Teams::MembersController < Teams::ApplicationController
...
@@ -8,7 +8,6 @@ class Teams::MembersController < Teams::ApplicationController
def
new
def
new
@users
=
User
.
potential_team_members
(
user_team
)
@users
=
User
.
potential_team_members
(
user_team
)
@users
=
UserDecorator
.
decorate_collection
@users
end
end
def
create
def
create
...
...
app/decorators/user_decorator.rb
deleted
100644 → 0
View file @
568ce1ed
class
UserDecorator
<
ApplicationDecorator
decorates
:user
def
avatar_image
size
=
16
h
.
image_tag
h
.
gravatar_icon
(
self
.
email
,
size
),
class:
"avatar
#{
"s
#{
size
}
"
}
"
,
width:
size
end
def
tm_of
(
project
)
project
.
team_member_by_id
(
self
.
id
)
end
end
app/models/user.rb
View file @
98b7717d
...
@@ -373,4 +373,8 @@ class User < ActiveRecord::Base
...
@@ -373,4 +373,8 @@ class User < ActiveRecord::Base
def
name_with_username
def
name_with_username
"
#{
name
}
(
#{
username
}
)"
"
#{
name
}
(
#{
username
}
)"
end
end
def
tm_of
(
project
)
project
.
team_member_by_id
(
self
.
id
)
end
end
end
app/views/issues/_issue.html.haml
View file @
98b7717d
...
@@ -34,6 +34,6 @@
...
@@ -34,6 +34,6 @@
=
render
'votes/votes_inline'
,
votable:
issue
=
render
'votes/votes_inline'
,
votable:
issue
%span
%span
-
issue
.
labels
.
each
do
|
label
|
-
issue
.
labels
.
each
do
|
label
|
%span
.label
%span
.label
.label-info
%i
.icon-tag
%i
.icon-tag
=
label
.
name
=
label
.
name
app/views/milestones/show.html.haml
View file @
98b7717d
...
@@ -88,7 +88,6 @@
...
@@ -88,7 +88,6 @@
%div
%div
-
@users
.
each
do
|
user
|
-
@users
.
each
do
|
user
|
=
link_to
user
,
class:
'float-link'
do
=
link_to
user
,
class:
'float-link'
do
=
user
.
avatar_image
=
link_to_member
(
@project
,
user
)
=
user
.
name
.clearfix
.clearfix
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