profile page: use old-style canvas layout
Change-Id: Ie0a2f074c3a8b498195f7c9508e9e33a2db90d72
This commit is contained in:
parent
3da42266a8
commit
55297d05d3
|
@ -31,6 +31,7 @@ class ProfileController < ApplicationController
|
|||
@user ||= @current_user
|
||||
|
||||
@use_new_styles = true
|
||||
|
||||
@active_tab = "profile"
|
||||
@context = UserProfile.new(@current_user) if @user == @current_user
|
||||
|
||||
|
@ -52,16 +53,16 @@ class ProfileController < ApplicationController
|
|||
|
||||
if @user.private? && @user != @current_user
|
||||
if @user.grants_right?(@current_user, :view_statistics)
|
||||
return render :action => :show, :layout => "new_application"
|
||||
return render :action => :show
|
||||
elsif @current_user.messageable_users(:ids => [@user.id]) == [@user]
|
||||
return render :action => :show_limited, :layout => "new_application"
|
||||
return render :action => :show_limited
|
||||
# TODO: also show full profile if user is following other user?
|
||||
else
|
||||
return render :action => :unauthorized, :layout => "new_application"
|
||||
return render :action => :unauthorized
|
||||
end
|
||||
end
|
||||
|
||||
render :action => :show, :layout => "new_application"
|
||||
render :action => :show
|
||||
end
|
||||
|
||||
# @API Get user profile
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<%
|
||||
jammit_css :profile
|
||||
js_bundle :profile_show
|
||||
@body_classes << 'no-page-block'
|
||||
%>
|
||||
<% content_for :page_title do %>
|
||||
<%= @user.short_name %>
|
||||
<% end %>
|
||||
<div class="container">
|
||||
<div class="row v-gutter">
|
||||
<div class="span2 profile-pic-container">
|
||||
<%= image_tag avatar_image_url(User.avatar_key @user.id), :class => 'profile-pic' %>
|
||||
|
@ -17,7 +17,9 @@
|
|||
<p><button id="follow_user" class="button">Follow</button></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="span3">
|
||||
</div>
|
||||
|
||||
<% content_for :right_side do %>
|
||||
<table class="stats">
|
||||
<tr class="stats-header">
|
||||
<th colspan="2">Stats</th>
|
||||
|
@ -41,6 +43,4 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue