Commit 4d7f00fd authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Apply new design for user profile page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent ab129f7b
...@@ -20,6 +20,7 @@ v 8.2.0 (unreleased) ...@@ -20,6 +20,7 @@ v 8.2.0 (unreleased)
- [API] Add ability to fetch the commit ID of the last commit that actually touched a file - [API] Add ability to fetch the commit ID of the last commit that actually touched a file
- Add "New file" link to dropdown on project page - Add "New file" link to dropdown on project page
- Include commit logs in project search - Include commit logs in project search
- New design for user profile page
v 8.1.1 v 8.1.1
- Fix cloning Wiki repositories via HTTP (Stan Hu) - Fix cloning Wiki repositories via HTTP (Stan Hu)
......
...@@ -25,7 +25,7 @@ class @Calendar ...@@ -25,7 +25,7 @@ class @Calendar
30 30
] ]
legendCellPadding: 3 legendCellPadding: 3
cellSize: $('.user-calendar').width() / 80 cellSize: $('.user-calendar').width() / 76
onClick: (date, count) -> onClick: (date, count) ->
formated_date = date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate() formated_date = date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate()
$.ajax $.ajax
......
...@@ -387,6 +387,16 @@ table { ...@@ -387,6 +387,16 @@ table {
} }
} }
.center-middle-menu {
@include nav-menu;
text-align: center;
margin: -$gl-padding;
height: auto;
margin-top: 0;
margin-bottom: 0;
border-bottom: 1px solid $border-color;
}
.dropzone .dz-preview .dz-progress { .dropzone .dz-preview .dz-progress {
border-color: $border-color !important; border-color: $border-color !important;
} }
......
...@@ -75,3 +75,7 @@ ...@@ -75,3 +75,7 @@
text-decoration: none; text-decoration: none;
} }
} }
.cal-heatmap-container {
margin: 0 auto;
}
- if local_assigns.has_key?(:contributed_projects) && contributed_projects.present?
.panel.panel-default.contributed-projects
.panel-heading Projects contributed to
= render 'shared/projects/list',
projects: contributed_projects.sort_by(&:star_count).reverse,
projects_limit: 5, stars: true, avatar: false
- if local_assigns.has_key?(:projects) && projects.present?
.panel.panel-default
.panel-heading Personal projects
= render 'shared/projects/list',
projects: projects.sort_by(&:star_count).reverse,
projects_limit: 10, stars: true, avatar: false
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
= link_to profile_path, class: 'btn btn-gray' do = link_to profile_path, class: 'btn btn-gray' do
= icon('pencil') = icon('pencil')
- elsif current_user - elsif current_user
.report-abuse %span.report-abuse
- if @user.abuse_report - if @user.abuse_report
%button.btn.btn-danger{ title: 'Already reported for abuse', %button.btn.btn-danger{ title: 'Already reported for abuse',
data: { toggle: 'tooltip', placement: 'left', container: 'body' }} data: { toggle: 'tooltip', placement: 'left', container: 'body' }}
...@@ -61,6 +61,10 @@ ...@@ -61,6 +61,10 @@
= link_to new_abuse_report_path(user_id: @user.id), class: 'btn btn-gray', = link_to new_abuse_report_path(user_id: @user.id), class: 'btn btn-gray',
title: 'Report abuse', data: {toggle: 'tooltip', placement: 'left', container: 'body'} do title: 'Report abuse', data: {toggle: 'tooltip', placement: 'left', container: 'body'} do
= icon('exclamation-circle') = icon('exclamation-circle')
- if current_user
&nbsp;
= link_to user_path(@user, :atom, { private_token: current_user.private_token }), class: 'btn btn-gray' do
= icon('rss')
.gray-content-block.second-block .gray-content-block.second-block
.user-calendar .user-calendar
...@@ -69,27 +73,47 @@ ...@@ -69,27 +73,47 @@
.user-calendar-activities .user-calendar-activities
.row.prepend-top-20 %ul.nav.center-middle-menu
%section.col-md-7 %li.active
= link_to "#activity", 'data-toggle' => 'tab' do
Activity
- if @groups.any? - if @groups.any?
.prepend-top-20 %li
%h4 Groups = link_to "#groups", 'data-toggle' => 'tab' do
= render 'groups', groups: @groups Groups
%hr - if @contributed_projects.present?
%li
%h4 = link_to "#contributed", 'data-toggle' => 'tab' do
User Activity Contributed projects
- if @projects.present?
- if current_user %li
%span.rss-icon.pull-right = link_to "#personal", 'data-toggle' => 'tab' do
= link_to user_path(@user, :atom, { private_token: current_user.private_token }) do Personal projects
%strong
%i.fa.fa-rss
.tab-content
.tab-pane.active#activity
.content_list .content_list
= spinner = spinner
%aside.col-md-5
= render 'projects', projects: @projects, contributed_projects: @contributed_projects - if @groups.any?
.tab-pane#groups
%ul.content-list
- @groups.each do |group|
= render 'shared/groups/group', group: group
- if @contributed_projects.present?
.tab-pane#contributed
.contributed-projects
= render 'shared/projects/list',
projects: @contributed_projects.sort_by(&:star_count).reverse,
projects_limit: 5, stars: true, avatar: false
- if @projects.present?
.tab-pane#personal
.personal-projects
= render 'shared/projects/list',
projects: @projects.sort_by(&:star_count).reverse,
projects_limit: 10, stars: true, avatar: false
:coffeescript :coffeescript
$(".user-calendar").load("#{user_calendar_path}") $(".user-calendar").load("#{user_calendar_path}")
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