组织下链接改成https://www.形式
This commit is contained in:
parent
6e21229b4c
commit
5d1d56fbb3
|
@ -2905,3 +2905,73 @@ def user_url_in_org(user_id)
|
|||
return "https://www.trustie.net/users/" + user_id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
def project_issues_url_in_org(project_id)
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/projects/" + project_id.to_s + "/issues"
|
||||
elsif Rails.env.test?
|
||||
return "https://www.test.forge.trustie.net/projects/" + project_id.to_s + "/issues"
|
||||
else
|
||||
return "https://www.trustie.net/projects/" + project_id.to_s + "/issues"
|
||||
end
|
||||
end
|
||||
|
||||
def issue_url_in_org(id)
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/issues/" + id.to_s
|
||||
elsif Rails.env.test?
|
||||
return "https://www.test.forge.trustie.net/issues/" + id.to_s
|
||||
else
|
||||
return "https://www.trustie.net/issues/" + id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
def project_boards_url_in_org(id)
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/projects/" + id.to_s + "/boards"
|
||||
elsif Rails.env.test?
|
||||
return "https://www.test.forge.trustie.net/projects/" + id.to_s + "/boards"
|
||||
else
|
||||
return "https://www.trustie.net/projects/" + id.to_s + "/boards"
|
||||
end
|
||||
end
|
||||
|
||||
def board_message_url_in_org(board_id, message_id)
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/boards/" + board_id.to_s + "/topics/" + message_id.to_s
|
||||
elsif Rails.env.test?
|
||||
return "https://www.test.forge.trustie.net/boards/" + board_id.to_s + "/topics/" + message_id.to_s
|
||||
else
|
||||
return "https://www.trustie.net/boards/" + board_id.to_s + "/topics/" + message_id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
def project_url_in_org(id)
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/projects/" + id.to_s
|
||||
elsif Rails.env.test?
|
||||
return "https://test.forge.trustie.net/projects/" + id.to_s
|
||||
else
|
||||
return "https://www.trustie.net/projects/" + id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
def homework_common_index_url_in_org(course_id)
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/homework_common?course=" + course_id.to_s
|
||||
elsif Rails.env.test?
|
||||
return "https://test.forge.trustie.net/homework_common?course=" + course_id.to_s
|
||||
else
|
||||
return "https://www.trustie.net/homework_common?course=" + course_id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
def student_work_index_url_in_org(homework_id)
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/student_work?homework=" + homework_id.to_s
|
||||
elsif Rails.env.test?
|
||||
return "https://test.forge.trustie.net/student_work?homework=" + course_id.to_s
|
||||
else
|
||||
return "https://www.trustie.net/student_work?homework=" + course_id.to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
<% else %>
|
||||
<%= link_to activity.try(:user).try(:realname), user_url_in_org(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)" -->
|
||||
<%= 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.course.name.to_s+" | 课程作业", homework_common_index_url_in_org(activity.course.id), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden m_w505 fl"> <!--+"(作业名称)"-->
|
||||
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
||||
<%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :class => "postGrey"%>
|
||||
</div>
|
||||
<% if activity.homework_detail_manual%>
|
||||
<% if activity.homework_detail_manual.comment_status == 1%>
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
|
||||
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_url_in_org(activity.project.id), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %>
|
||||
<%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :class => "postGrey" %>
|
||||
<span class='<%#= get_issue_priority(activity.priority_id)[0] %>'>
|
||||
<%#= get_issue_priority(activity.priority_id)[1] %>
|
||||
</span>
|
||||
|
|
|
@ -3,21 +3,21 @@
|
|||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_url_in_org(user), :alt => "用户头像" %>
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_url_in_org(user.id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<% if user.try(:realname) == ' ' %>
|
||||
<%= link_to user, user_url_in_org(user), :class => "newsBlue mr15" %>
|
||||
<%= link_to user, user_url_in_org(user.id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to user.try(:realname), user_url_in_org(user), :class => "newsBlue mr15" %>
|
||||
<%= link_to user.try(:realname), user_url_in_org(user.id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to project.to_s+" | 项目", project_path(project.id,:host=>Setting.host_course), :class => "newsBlue ml15" %>
|
||||
<%= link_to project.to_s+" | 项目", project_url_in_org(project.id), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word" >
|
||||
<%= link_to project.name, project_path(project.id,:host=>Setting.host_course), :class => "postGrey" %>
|
||||
<%= link_to project.name, project_url_in_org(project.id), :class => "postGrey" %>
|
||||
</div>
|
||||
<div class="homepagePostDate">
|
||||
创建时间:<%= format_time(project.created_on) %>
|
||||
|
|
|
@ -12,16 +12,15 @@
|
|||
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
|
||||
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_url_in_org(activity.project.id), :class => "newsBlue ml15 mr5"%>
|
||||
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey"
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board.id,activity.id), :class=> "postGrey"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey"
|
||||
%>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board.id,activity.id), :class=> "postGrey" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDate fl">
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= act.id %>">
|
||||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current) %>
|
||||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div nhname='new_message_<%= act.id %>' style="display:none;">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="userCard boxShadow" style="<%= User.current == user ? 'top:-153px;':'' %>">
|
||||
<div class="userAvatarWrap fl">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_url_in_org(user), :alt => "用户头像", :target => '_blank' %>
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_url_in_org(user.id), :alt => "用户头像", :target => '_blank' %>
|
||||
<%#= image_tag(url_to_avatar(user), :width => "50", :height => "50") %>
|
||||
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="个人头像" />-->
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue