summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-04 10:53:39 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-04 10:53:39 +0300
commit98b7717df7e455b745c47582dcd5718f2ab904a2 (patch)
tree9da36ad23a455e169256318accbc9dfc0c689fa9 /app
parent568ce1edd7df2eaf511878ccc3b202fcad7931a3 (diff)
downloadgitlab-ce-98b7717df7e455b745c47582dcd5718f2ab904a2.tar.gz
Remove user decorator
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/common.scss18
-rw-r--r--app/controllers/admin/teams/members_controller.rb1
-rw-r--r--app/controllers/milestones_controller.rb2
-rw-r--r--app/controllers/teams/members_controller.rb1
-rw-r--r--app/decorators/user_decorator.rb11
-rw-r--r--app/models/user.rb4
-rw-r--r--app/views/issues/_issue.html.haml2
-rw-r--r--app/views/milestones/show.html.haml3
8 files changed, 10 insertions, 32 deletions
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index 0f66536b2b4..7d315a184a1 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -111,22 +111,10 @@ span.update-author {
}
.label {
- padding: 0px 4px;
- font-size: 10px;
+ padding: 1px 4px;
+ font-size: 12px;
font-style: normal;
- background-color: $link_color;
-
- &.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;
- }
+ font-weight: normal;
}
form {
diff --git a/app/controllers/admin/teams/members_controller.rb b/app/controllers/admin/teams/members_controller.rb
index e6469874419..a5a60307b51 100644
--- a/app/controllers/admin/teams/members_controller.rb
+++ b/app/controllers/admin/teams/members_controller.rb
@@ -1,7 +1,6 @@
class Admin::Teams::MembersController < Admin::Teams::ApplicationController
def new
@users = User.potential_team_members(user_team)
- @users = UserDecorator.decorate_collection @users
end
def create
diff --git a/app/controllers/milestones_controller.rb b/app/controllers/milestones_controller.rb
index cdac28c1bde..135281bd28d 100644
--- a/app/controllers/milestones_controller.rb
+++ b/app/controllers/milestones_controller.rb
@@ -32,7 +32,7 @@ class MilestonesController < ProjectResourceController
def show
@issues = @milestone.issues
- @users = UserDecorator.decorate_collection(@milestone.participants)
+ @users = @milestone.participants
@merge_requests = @milestone.merge_requests
respond_to do |format|
diff --git a/app/controllers/teams/members_controller.rb b/app/controllers/teams/members_controller.rb
index f87d422f84e..8af27e0aeec 100644
--- a/app/controllers/teams/members_controller.rb
+++ b/app/controllers/teams/members_controller.rb
@@ -8,7 +8,6 @@ class Teams::MembersController < Teams::ApplicationController
def new
@users = User.potential_team_members(user_team)
- @users = UserDecorator.decorate_collection @users
end
def create
diff --git a/app/decorators/user_decorator.rb b/app/decorators/user_decorator.rb
deleted file mode 100644
index af9c6a63e75..00000000000
--- a/app/decorators/user_decorator.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-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
diff --git a/app/models/user.rb b/app/models/user.rb
index 455936321ff..a835e528dbd 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -373,4 +373,8 @@ class User < ActiveRecord::Base
def name_with_username
"#{name} (#{username})"
end
+
+ def tm_of(project)
+ project.team_member_by_id(self.id)
+ end
end
diff --git a/app/views/issues/_issue.html.haml b/app/views/issues/_issue.html.haml
index 3d1ecd43881..ab34116b42f 100644
--- a/app/views/issues/_issue.html.haml
+++ b/app/views/issues/_issue.html.haml
@@ -34,6 +34,6 @@
= render 'votes/votes_inline', votable: issue
%span
- issue.labels.each do |label|
- %span.label
+ %span.label.label-info
%i.icon-tag
= label.name
diff --git a/app/views/milestones/show.html.haml b/app/views/milestones/show.html.haml
index e1808a2003f..747ce74a6a7 100644
--- a/app/views/milestones/show.html.haml
+++ b/app/views/milestones/show.html.haml
@@ -88,7 +88,6 @@
%div
- @users.each do |user|
= link_to user, class: 'float-link' do
- = user.avatar_image
- = user.name
+ = link_to_member(@project, user)
.clearfix