再提交一次
This commit is contained in:
parent
ffe6d5db97
commit
f91cfcdec2
|
@ -87,15 +87,15 @@ class ProjectsController < ApplicationController
|
|||
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
@projects = Project.visible
|
||||
@projects.each do |project|
|
||||
@admin = project.users_by_role[Role.find(3)]
|
||||
unless @admin.nil?
|
||||
@admin.each do |user|
|
||||
ProjectInfo.create(:user_id => user.id, :project_id => project.id)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
# @projects.each do |project|
|
||||
# @admin = project.users_by_role[Role.find(3)]
|
||||
# unless @admin.nil?
|
||||
# @admin.each do |user|
|
||||
# ProjectInfo.create(:user_id => user.id, :project_id => project.id)
|
||||
# end
|
||||
#
|
||||
# end
|
||||
# end
|
||||
@projects = Project.visible.like(params[:name]) if params[:name].present?
|
||||
@project_count = @projects.count
|
||||
@project_pages = Paginator.new @project_count, @limit, params['page']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# This controller was added by william
|
||||
class TagsController < ApplicationController
|
||||
layout "base_tags"
|
||||
# layout "base_tags"
|
||||
before_filter :require_admin,:only => :show
|
||||
include ProjectsHelper
|
||||
include IssuesHelper
|
||||
|
|
|
@ -1301,9 +1301,14 @@ module ApplicationHelper
|
|||
#added by nie
|
||||
# Display watcher picture
|
||||
def show_watcher_profile(obj)
|
||||
count = 0
|
||||
html = ''
|
||||
for user in User.watched_by(obj.id)
|
||||
html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}")
|
||||
count = count + 1
|
||||
if count >= 12
|
||||
break
|
||||
end
|
||||
end
|
||||
html.html_safe
|
||||
end
|
||||
|
@ -1311,8 +1316,13 @@ module ApplicationHelper
|
|||
#display fans picture
|
||||
def show_fans_picture(obj)
|
||||
html = ''
|
||||
count = 0
|
||||
for user in obj.watcher_users
|
||||
html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}")
|
||||
count = count + 1
|
||||
if count >= 12
|
||||
break
|
||||
end
|
||||
end
|
||||
html.html_safe
|
||||
end
|
||||
|
@ -1320,8 +1330,13 @@ module ApplicationHelper
|
|||
# add by huang
|
||||
def show_watcher_list(user)
|
||||
html = ''
|
||||
count = 0
|
||||
for user in User.watched_by(user.id)
|
||||
html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}")
|
||||
count = count + 1
|
||||
if count >= 12
|
||||
break
|
||||
end
|
||||
end
|
||||
html.html_safe
|
||||
end
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font"><%= h @bid.name %></td>
|
||||
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"> <%= watcher_link(@bid, User.current) %> </td>
|
||||
|
|
Loading…
Reference in New Issue