Commit 70690e19 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

base implementation

parent e0fb0703
...@@ -95,6 +95,7 @@ img.avatar { float: left; margin-right: 12px; width: 40px; border: 1px solid #dd ...@@ -95,6 +95,7 @@ img.avatar { float: left; margin-right: 12px; width: 40px; border: 1px solid #dd
img.avatar.s16 { width: 16px; height: 16px; margin-right: 6px; } img.avatar.s16 { width: 16px; height: 16px; margin-right: 6px; }
img.avatar.s24 { width: 24px; height: 24px; margin-right: 8px; } img.avatar.s24 { width: 24px; height: 24px; margin-right: 8px; }
img.avatar.s32 { width: 32px; height: 32px; margin-right: 10px; } img.avatar.s32 { width: 32px; height: 32px; margin-right: 10px; }
img.avatar.s90 { width: 90px; height: 90px; margin-right: 15px; }
img.lil_av { padding-left: 4px; padding-right: 3px; } img.lil_av { padding-left: 4px; padding-right: 3px; }
img.small { width: 80px; } img.small { width: 80px; }
......
...@@ -13,7 +13,7 @@ header { ...@@ -13,7 +13,7 @@ header {
color: $style_color; color: $style_color;
text-shadow: 0 1px 0 #fff; text-shadow: 0 1px 0 #fff;
font-size: 18px; font-size: 18px;
padding: 11px; padding: 12px;
} }
/** NAV block with links and profile **/ /** NAV block with links and profile **/
......
class UsersController < ApplicationController
def show
@user = User.find_by_username(params[:username])
@projects = @user.authorized_projects.where('projects.id in (?)', current_user.authorized_projects.map(&:id))
@events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20)
end
end
module EventsHelper module EventsHelper
def link_to_author(event) def link_to_author(event)
project = event.project author = event.author
tm = project.team_member_by_id(event.author_id) if project
if tm if author
link_to event.author_name, project_team_member_path(project, tm) link_to author.name, user_path(author.username)
else else
event.author_name event.author_name
end end
......
.row
.span8
%h3.page_title
= image_tag gravatar_icon(@user.email, 90), class: "avatar s90"
= @user.name
%span.light (@#{@user.username})
.clearfix
%hr
%h5 Recent events
= render @events
.span4
.ui-box
%h5.title Profile
%ul.well-list
%li
%strong Email
%span.right= mail_to @user.email
- unless @user.skype.blank?
%li
%strong Skype
%span.right= @user.skype
- unless @user.linkedin.blank?
%li
%strong LinkedIn
%span.right= @user.linkedin
- unless @user.twitter.blank?
%li
%strong Twitter
%span.right= @user.twitter
- unless @user.bio.blank?
%li
%strong Bio
%span.right= @user.bio
.ui-box
%h5.title Projects
%ul.well-list
- @projects.each do |project|
%li
= link_to project_path(project), class: dom_class(project) do
- if project.namespace
= project.namespace.human_name
\/
%strong.well-title
= truncate(project.name, length: 45)
...@@ -97,6 +97,9 @@ Gitlab::Application.routes.draw do ...@@ -97,6 +97,9 @@ Gitlab::Application.routes.draw do
end end
resources :keys resources :keys
match "/u/:username" => "users#show", as: :user
# #
# Dashboard Area # Dashboard Area
......
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