mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Clean up user profile layouts
This commit is contained in:
parent
c870b00f65
commit
6e22e84081
8 changed files with 59 additions and 84 deletions
|
@ -1,4 +1,3 @@
|
|||
- provide(:title, user_title(@user))
|
||||
- no_header = unless @user.profile_header.exists? then "profile--no-header" else "" end
|
||||
#profile--header{class: no_header}
|
||||
%img.profile--header-img{src: @user.profile_header.url(:web)}
|
||||
|
@ -8,21 +7,10 @@
|
|||
= render 'user/profile_info'
|
||||
.hidden-xs= render 'shared/links'
|
||||
.col-md-9.col-xs-12.col-sm-8.j2-col-reset
|
||||
.profile--panel-push-inner.hidden-xs{class: no_header}
|
||||
= render 'shared/questionbox'
|
||||
- unless @user.banned?
|
||||
#answers
|
||||
- @answers.each do |a|
|
||||
= render 'shared/answerbox', a: a
|
||||
|
||||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @answers_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @answers_last_id }}
|
||||
= t 'views.actions.load'
|
||||
= yield
|
||||
.visible-xs= render 'shared/links'
|
||||
- if user_signed_in?
|
||||
= render 'modal/group'
|
||||
- if current_user.mod? and @user != current_user
|
||||
= render 'modal/privileges'
|
||||
= render 'modal/ban'
|
||||
= render 'modal/ban'
|
12
app/views/user/groups.haml
Normal file
12
app/views/user/groups.haml
Normal file
|
@ -0,0 +1,12 @@
|
|||
%h1.j2-lh.hidden-xs Groups
|
||||
%h1.visible-xs Groups
|
||||
|
||||
%ul
|
||||
- @groups.each do |group|
|
||||
%li
|
||||
- if group.private?
|
||||
%i.fa.fa-lock
|
||||
= group.display_name
|
||||
|
||||
- provide(:title, user_title(@user, "groups"))
|
||||
- parent_layout "user/profile"
|
|
@ -1,23 +0,0 @@
|
|||
- provide(:title, user_title(@user, "groups"))
|
||||
- no_header = unless @user.profile_header.exists? then "profile--no-header" else "" end
|
||||
#profile--header{class: no_header}
|
||||
%img.profile--header-img{src: @user.profile_header.url(:web)}
|
||||
.container.j2-page.headerable{class: no_header}
|
||||
.row
|
||||
.col-md-3.col-xs-12.col-sm-4
|
||||
= render 'user/profile_info'
|
||||
.hidden-xs= render 'shared/links'
|
||||
.col-md-9.col-xs-12.col-sm-8
|
||||
%h1.j2-lh.hidden-xs Groups
|
||||
%h1.visible-xs Groups
|
||||
|
||||
%ul
|
||||
- @groups.each do |group|
|
||||
%li
|
||||
- if group.private?
|
||||
%i.fa.fa-lock
|
||||
= group.display_name
|
||||
|
||||
.visible-xs= render 'shared/links'
|
||||
- if user_signed_in?
|
||||
= render 'user/modal_group_memberships'
|
14
app/views/user/questions.haml
Normal file
14
app/views/user/questions.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
%h1.j2-lh.hidden-xs= @title
|
||||
%h1.visible-xs= @title
|
||||
#questions
|
||||
- @questions.each do |q|
|
||||
= render 'shared/question', q: q, type: nil
|
||||
|
||||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @questions_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @questions_last_id }}
|
||||
= t 'views.actions.load'
|
||||
|
||||
- provide(:title, questions_title(@user))
|
||||
- parent_layout "user/profile"
|
|
@ -1,22 +0,0 @@
|
|||
- provide(:title, questions_title(@user))
|
||||
- no_header = unless @user.profile_header.exists? then "profile--no-header" else "" end
|
||||
#profile--header{class: no_header}
|
||||
%img.profile--header-img{src: @user.profile_header.url(:web)}
|
||||
.container.j2-page.headerable{class: no_header}
|
||||
.row
|
||||
.col-md-3.col-xs-12.col-sm-4.j2-col-reset
|
||||
= render 'user/profile_info'
|
||||
.hidden-xs= render 'shared/links'
|
||||
.col-md-9.col-xs-12.col-sm-8.j2-col-reset
|
||||
%h1.j2-lh.hidden-xs= @title
|
||||
%h1.visible-xs= @title
|
||||
#questions
|
||||
- @questions.each do |q|
|
||||
= render 'shared/question', q: q, type: nil
|
||||
|
||||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @questions_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @questions_last_id }}
|
||||
= t 'views.actions.load'
|
||||
.visible-xs= render 'shared/links'
|
16
app/views/user/show.haml
Normal file
16
app/views/user/show.haml
Normal file
|
@ -0,0 +1,16 @@
|
|||
- no_header = unless @user.profile_header.exists? then "profile--no-header" else "" end
|
||||
.profile--panel-push-inner.hidden-xs{class: no_header}
|
||||
= render 'shared/questionbox'
|
||||
- unless @user.banned?
|
||||
#answers
|
||||
- @answers.each do |a|
|
||||
= render 'shared/answerbox', a: a
|
||||
|
||||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @answers_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @answers_last_id }}
|
||||
= t 'views.actions.load'
|
||||
|
||||
- provide(:title, user_title(@user))
|
||||
- parent_layout "user/profile"
|
15
app/views/user/show_follow.haml
Normal file
15
app/views/user/show_follow.haml
Normal file
|
@ -0,0 +1,15 @@
|
|||
%h1.j2-lh.hidden-xs= @title
|
||||
%h1.visible-xs= @title
|
||||
#users
|
||||
- @users.each do |user|
|
||||
.col-md-4.col-sm-6.col-xs-12
|
||||
= render 'shared/userbox', user: user
|
||||
|
||||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @users_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @users_last_id }}
|
||||
= t 'views.actions.load'
|
||||
|
||||
- provide(:title, user_title(@user, "friends and followers"))
|
||||
- parent_layout "user/profile"
|
|
@ -1,25 +0,0 @@
|
|||
- provide(:title, user_title(@user, "friends and followers"))
|
||||
- no_header = unless @user.profile_header.exists? then "profile--no-header" else "" end
|
||||
#profile--header{class: no_header}
|
||||
%img.profile--header-img{src: @user.profile_header.url(:web)}
|
||||
.container.j2-page.headerable{class: no_header}
|
||||
.row
|
||||
.col-md-3.col-xs-12.col-sm-4.j2-col-reset
|
||||
= render 'user/profile_info'
|
||||
.hidden-xs= render 'shared/links'
|
||||
.col-md-9.col-xs-12.col-sm-8.j2-col-reset
|
||||
%h1.j2-lh.hidden-xs= @title
|
||||
%h1.visible-xs= @title
|
||||
#users
|
||||
- @users.each do |user|
|
||||
.col-md-4.col-sm-6.col-xs-12
|
||||
= render 'shared/userbox', user: user
|
||||
|
||||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @users_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @users_last_id }}
|
||||
= t 'views.actions.load'
|
||||
.visible-xs= render 'shared/links'
|
||||
- if user_signed_in?
|
||||
= render 'user/modal_group_memberships'
|
Loading…
Reference in a new issue