拿掉了对人、问题、需求、项目的赞功能,去掉了一些使用这些功能的代码。

This commit is contained in:
william 2013-08-12 15:08:44 +08:00
parent cf9aa12727
commit be35324bbc
3 changed files with 5 additions and 7 deletions

View File

@ -31,7 +31,7 @@ class UsersController < ApplicationController
accept_api_auth :index, :show, :create, :update, :destroy,:tag_save
#william
before_filter :require_login,:only => :tag_save
before_filter :need_login,:only => :tag_save
helper :sort

View File

@ -1317,8 +1317,8 @@ module ApplicationHelper
# end
#added by william
def get_fans_num(user)
user.watcher_users.count
def need_login
redirect_to signin_path
end
#end
end

View File

@ -87,8 +87,7 @@
<div class="autoscroll">
<% for user in @users -%>
<div class="well">
<div class="well">
<%= content_tag "p", "#{format_date(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %>
<%= image_tag "/images/time_member.png", :class => "img_member_time"%>
<!-- <%= get_avatar?(user) ? (link_to image_tag(avatar_image(user), :class => 'avatar'), user_path(user), :class => "avatar") : (link_to image_tag("/images/12_50.png", :class => 'avatar'), user_path(user), :class => "avatar") %> -->
@ -99,9 +98,8 @@
<div style="margin-top: 20px;margin-left:66px">
<%= l(:label_has_fans,:count=>user.watcher_users.count)%>
<%= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %>
<%= l(:label_has_praisers,:count=>get_praise_num(user))%>
</div>
<!--<%= content_tag "span", content_tag("p", user.firstname), :class => "clear avatar_name" %>-->
<div class="user-bottom">
<% unless user.memberships.empty? %>
<%= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>