From 154cd7de6f681d3cd1abd038395131a8f8df9480 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Sep 2015 14:31:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E5=9F=9F=E5=90=8D=E7=9A=84=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 ++-- app/views/layouts/new_base_user.html.erb | 6 +++--- app/views/users/_course_homework.html.erb | 8 ++++---- app/views/users/_course_message.html.erb | 18 +++++++++--------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f085032c3..f507190ca 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2344,9 +2344,9 @@ module ApplicationHelper homework = default_opt[:homework] work = cur_user_works_for_homework homework if work.nil? && !is_teacher - link_to "提交("+homework.student_works.count.to_s+")", new_student_work_path(:homework => homework.id), :class=> default_opt[:class] + link_to "提交("+homework.student_works.count.to_s+")", new_student_work_path(:homework => homework.id,:host=> Setting.host_course), :class=> default_opt[:class] else - link_to "提交("+homework.student_works.count.to_s+")", student_work_index_path(:homework => homework.id), :class=> default_opt[:class] + link_to "提交("+homework.student_works.count.to_s+")", student_work_index_path(:homework => homework.id,:host=> Setting.host_course), :class=> default_opt[:class] end end diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 77d54b3c0..b86838c0b 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -103,7 +103,7 @@ 课程 <% if is_current_user%> <% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%> - <%=link_to "", new_course_path, :class => "homepageMenuSetting fr", :title => "新建课程"%> + <%=link_to "", new_course_path(:host=> Setting.host_course), :class => "homepageMenuSetting fr", :title => "新建课程"%> <% else%> <%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:remote => true, :title => "加入课程"%> <% end%> @@ -119,7 +119,7 @@ 项目 <% if is_current_user%> - <%=link_to "", new_project_path, :class => "homepageMenuSetting fr", :title => "新建项目"%> + <%=link_to "", new_project_path(:host=> Setting.host_name), :class => "homepageMenuSetting fr", :title => "新建项目"%> <% end%> <% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%> @@ -130,7 +130,7 @@
- <%= link_to '留言',feedback_path(@user),:class=>'homepageMenuText'%> + <%= link_to '留言',feedback_path(@user, :host=> Setting.host_user),:class=>'homepageMenuText'%>
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index b1ca2838a..58b29696c 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -6,14 +6,14 @@
<% if activity.try(:user).try(:realname) == ' ' %> - <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% else %> - <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% end %> TO - <%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id), :class => "newsBlue ml15"%> + <%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
- <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id), :class => "postGrey"%> + <%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index e98d8fe79..f0c03b904 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -1,23 +1,23 @@
- <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
<% if activity.try(:author).try(:realname) == ' ' %> - <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% else %> - <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <% end %> TO - <%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course), :class => "newsBlue ml15 mr5"%> + <%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
<% if activity.parent_id.nil? %> - <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey" %> + <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id,:host=> Setting.host_course), :class=> "postGrey" %> <% else %> - <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey"%> + <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id,:host=> Setting.host_course), :class=> "postGrey"%> <% end %>
@@ -75,14 +75,14 @@ <% replies_all_i=replies_all_i+1 %>
  • - <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
    <% if reply.try(:author).try(:realname) == ' ' %> - <%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> + <%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% else %> - <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> + <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% end %> <%= format_time(reply.created_on) %>