用户登录后点左侧个人主页url路径问题及用课程动态中url转换成login
This commit is contained in:
parent
846ef5f72c
commit
4d1d6506fe
|
@ -2,7 +2,7 @@
|
||||||
<% if User.current.logged?%>
|
<% if User.current.logged?%>
|
||||||
<% if User.current == target%>
|
<% if User.current == target%>
|
||||||
<li style="width: 119px; float: left; border-right: 1px solid #ddd;"><%= link_to("个人资料", my_account_path, :class => "user_editinfo") %></li>
|
<li style="width: 119px; float: left; border-right: 1px solid #ddd;"><%= link_to("个人资料", my_account_path, :class => "user_editinfo") %></li>
|
||||||
<li style="width: 118px; float: left;"><%= link_to '个人主页', homepage_user_path(@user.login), :class => "user_editinfo", :target => '_blank' %></li>
|
<li style="width: 118px; float: left;"><%= link_to '个人主页', homepage_user_path(@user), :class => "user_editinfo", :target => '_blank' %></li>
|
||||||
<li class="cl"></li>
|
<li class="cl"></li>
|
||||||
<% else%>
|
<% else%>
|
||||||
<li style="width: 119px; float: left; border-right: 1px solid #ddd;">
|
<li style="width: 119px; float: left; border-right: 1px solid #ddd;">
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<div class="resources mt10">
|
<div class="resources mt10">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(activity.teacher), :width => "50", :height => "50"), user_path(activity.tea_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.teacher), :width => "50", :height => "50"), user_path(activity.teacher), :alt => "用户头像" %>
|
||||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.teacher} %>
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.teacher} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo break_word">
|
<div class="homepagePostTo break_word">
|
||||||
<% if activity.try(:teacher).try(:realname) == ' ' %>
|
<% if activity.try(:teacher).try(:realname) == ' ' %>
|
||||||
<%= link_to activity.try(:teacher), user_path(activity.tea_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:teacher), user_path(activity.teacher), :class => "newsBlue mr15" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to activity.try(:teacher).try(:realname), user_path(activity.tea_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:teacher).try(:realname), user_path(activity.teacher), :class => "newsBlue mr15" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
TO
|
TO
|
||||||
<%=link_to activity.syllabus.title, syllabus_path(activity.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
<%=link_to activity.syllabus.title, syllabus_path(activity.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %>
|
||||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo break_word">
|
<div class="homepagePostTo break_word">
|
||||||
<%= link_to activity.user.show_name, user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
<%= link_to activity.user.show_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||||
TO <!--+"(课程名称)" -->
|
TO <!--+"(课程名称)" -->
|
||||||
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
||||||
<span class="fb" style="color: #269ac9"> • </span>
|
<span class="fb" style="color: #269ac9"> • </span>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %>
|
||||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo break_word">
|
<div class="homepagePostTo break_word">
|
||||||
<%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.user.show_name, user_path(activity.user), :class => "newsBlue mr15" %>
|
||||||
TO
|
TO
|
||||||
<% course=Course.find(activity.jour_id) %>
|
<% course=Course.find(activity.jour_id) %>
|
||||||
<%=link_to course.syllabus.title, syllabus_path(course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
<%=link_to course.syllabus.title, syllabus_path(course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" onmouseover="$('#message_setting_<%= user_activity_id%>').show();" onmouseout="$('#message_setting_<%= user_activity_id%>').hide();">
|
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" onmouseover="$('#message_setting_<%= user_activity_id%>').show();" onmouseout="$('#message_setting_<%= user_activity_id%>').hide();">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author, :host => Setting.host_user), :alt => "用户头像" %>
|
||||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo break_word">
|
<div class="homepagePostTo break_word">
|
||||||
<%= link_to activity.author.show_name, user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
<%= link_to activity.author.show_name, user_path(activity.author, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||||
TO
|
TO
|
||||||
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
||||||
<span class="fb" style="color: #269ac9"> • </span>
|
<span class="fb" style="color: #269ac9"> • </span>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
<%= 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), :alt => "用户头像" %>
|
||||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo break_word">
|
<div class="homepagePostTo break_word">
|
||||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.author.show_name, user_path(activity.author), :class => "newsBlue mr15" %>
|
||||||
TO <!--+"(课程名称)"-->
|
TO <!--+"(课程名称)"-->
|
||||||
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
<%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %>
|
||||||
<span class="fb" style="color: #269ac9"> • </span>
|
<span class="fb" style="color: #269ac9"> • </span>
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
|
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
|
||||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %>
|
||||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo break_word">
|
<div class="homepagePostTo break_word">
|
||||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
<% 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), :class => "newsBlue mr15" %>
|
||||||
<% else %>
|
<% 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), :class => "newsBlue mr15" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
TO
|
TO
|
||||||
<% course = Course.find(activity.polls_group_id) %>
|
<% course = Course.find(activity.polls_group_id) %>
|
||||||
|
|
Loading…
Reference in New Issue