diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d666945cf..d916b8595 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1354,7 +1354,7 @@ module ApplicationHelper html << (content_tag "span", l(:label_no_current_watchers)) end for user in User.watched_by(obj.id) - html << (image_tag(url_to_avatar(user), :class => "avatar")) + 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 @@ -1379,7 +1379,7 @@ module ApplicationHelper html << (content_tag "span", l(:label_no_current_fans)) end for user in obj.watcher_users - html << (image_tag(url_to_avatar(user), :class => "avatar")) + 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 @@ -1393,7 +1393,7 @@ module ApplicationHelper html = '' count = 0 for user in User.watched_by(user.id) - html << (image_tag(url_to_avatar(user), :class => "avatar")) + 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 diff --git a/app/views/layouts/base_contest.html.erb b/app/views/layouts/base_contest.html.erb index 4801f3075..71ec2e7b0 100644 --- a/app/views/layouts/base_contest.html.erb +++ b/app/views/layouts/base_contest.html.erb @@ -93,8 +93,7 @@ <% if @bid.watcher_users.size>0 %> <% for user in @bid.watcher_users%> - <%= image_tag(url_to_avatar(user), :class => "avatar", :title => user.name ) %> - <% end %> + <%= link_to image_tag(url_to_avatar(user), :class => "avatar", :title => user.name ), user_path(user), :class => "avatar" %> <% end %> <% else %>

<%= l(:label_project_no_follow) %>

<% end%> @@ -115,7 +114,7 @@ <% if @bid.projects.size>0 %> <% for project in @bid.projects%> - <%= image_tag(url_to_avatar(project), :class => "avatar", :title => project.name) %> + <%= link_to image_tag(url_to_avatar(project), :class => "avatar", :title => project.name), project_path(project), :class => "avatar" %> <%= image_tag(url_to_avatar(project), :class => "avatar", :title => project.name) %> <% end%> <% else %>

<%= l(:label_no_bid_project) %>

diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 67cac4ad6..486f20aa9 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -104,8 +104,7 @@ <% if @bid.homework_type == 1%> <% if @bid.homeworks.size>0 %> <% for homework in @bid.homeworks %> - <%= image_tag(url_to_avatar(homework.user), :class => "avatar", :title => homework.user.name) %> - <% end %> + <%= link_to image_tag(url_to_avatar(homework.user), :class => "avatar", :title => homework.user.name), user_path(homework.user), :class => "avatar" %> <% end %> <% else %>

<%= l(:label_no_course_project) %> @@ -113,8 +112,7 @@ <% else %> <% if @bid.projects.size>0 %> <% for project in @bid.projects%> - <%= image_tag(url_to_avatar(project), :class => "avatar", :title => project.name) %> - <% end %> + <%= link_to image_tag(url_to_avatar(project), :class => "avatar", :title => project.name), project_path(project), :class => "avatar" %> <% end %> <% else %>

<%= l(:label_no_course_project) %> diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 851ffcd2a..e880b2e1b 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -35,7 +35,7 @@

- +
<%= image_tag(url_to_avatar(@user), :class => 'avatar2') %><%= image_tag(url_to_avatar(@user), :class => 'avatar2') %> diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index 4390240ff..2c8c6b18e 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -5,8 +5,8 @@
- -
<%= image_tag(url_to_avatar(user), :class => "avatar") %> + +
<%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %> diff --git a/app/views/users/user_watchlist.html.erb b/app/views/users/user_watchlist.html.erb index ade6a9a21..bb6b40c6d 100644 --- a/app/views/users/user_watchlist.html.erb +++ b/app/views/users/user_watchlist.html.erb @@ -4,8 +4,8 @@
<%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %>
- -
<%= image_tag(url_to_avatar(user), :class => "avatar") %> + +
<%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %>
<%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %>