Commit 98b7717d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove user decorator

parent 568ce1ed
......@@ -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 {
......
class Admin::Teams::MembersController < Admin::Teams::ApplicationController
def new
@users = User.potential_team_members(user_team)
@users = UserDecorator.decorate_collection @users
end
def create
......
......@@ -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|
......
......@@ -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
......
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
......@@ -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
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment