summaryrefslogtreecommitdiff
path: root/app/views/users/show.html.haml
diff options
context:
space:
mode:
authorJosh Frye <joshfng@gmail.com>2016-02-24 11:08:00 -0500
committerJosh Frye <joshfng@gmail.com>2016-02-29 08:24:07 -0500
commitcc9f93f9d26a18a7e867384e1e3cf34a3197ba5c (patch)
tree4ad72747512c4e29cb231cf9ace790f4ab5eb8b0 /app/views/users/show.html.haml
parentcd391b66e9d480c3143b63d32f893c6a1015f04e (diff)
downloadgitlab-ce-cc9f93f9d26a18a7e867384e1e3cf34a3197ba5c.tar.gz
Add routes and actions for dynamic tab loading
Diffstat (limited to 'app/views/users/show.html.haml')
-rw-r--r--app/views/users/show.html.haml64
1 files changed, 32 insertions, 32 deletions
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index d109635fa1e..33530ddd797 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -39,7 +39,7 @@
@#{@user.username}
%span.middle-dot-divider
Member since #{@user.created_at.to_s(:medium)}
-
+
- if @user.bio.present?
.cover-desc
%p.profile-user-bio
@@ -73,18 +73,15 @@
%li.active
= link_to "#activity", 'data-toggle' => 'tab' do
Activity
- - if @groups.any?
- %li
- = link_to "#groups", 'data-toggle' => 'tab' do
- Groups
- - if @contributed_projects.present?
- %li
- = link_to "#contributed", 'data-toggle' => 'tab' do
- Contributed projects
- - if @projects.present?
- %li
- = link_to "#personal", 'data-toggle' => 'tab' do
- Personal projects
+ %li
+ = link_to "#groups", 'data-toggle' => 'tab' do
+ Groups
+ %li
+ = link_to "#contributed", 'data-toggle' => 'tab' do
+ Contributed projects
+ %li
+ = link_to "#personal", 'data-toggle' => 'tab' do
+ Personal projects
%div{ class: container_class }
.tab-content
@@ -100,25 +97,28 @@
.content_list
= spinner
- - 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: 10, stars: true, avatar: true
-
- - 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: true
+ .tab-pane#groups
+ %ul.content-list.user-groups
+ %h4.center.light
+ %i.fa.fa-spinner.fa-spin
+
+ .tab-pane#contributed
+ .contributed-projects
+ %h4.center.light
+ %i.fa.fa-spinner.fa-spin
+
+ .tab-pane#personal
+ .personal-projects
+ %h4.center.light
+ %i.fa.fa-spinner.fa-spin
:javascript
+ $('.nav-links').stickyTabs();
$(".user-calendar").load("#{user_calendar_path}");
+ $(".user-groups").load("#{user_groups_path}");
+ $(".contributed-projects").load("#{user_contributed_projects_path}");
+ $(".personal-projects").load("#{user_projects_path}");
+
+ $("body").on("ajax:success", function(e, data, status, xhr) {
+ $(".personal-projects").html(xhr.responseText)
+ });