优化base_head代码
This commit is contained in:
parent
5c4a9ac1f8
commit
14da0c7d73
|
@ -1,6 +1,6 @@
|
||||||
<% if hasCourse %>
|
<% if hasCourse %>
|
||||||
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||||
<%=link_to l(:label_my_course), "http://" + Setting.host_course + user_courses_user_path(User.current.id) %>
|
<%=link_to l(:label_my_course), user_courses_user_path(User.current.id) %>
|
||||||
<ul class="course_sub_menu">
|
<ul class="course_sub_menu">
|
||||||
<% course_index = 0 %>
|
<% course_index = 0 %>
|
||||||
<% User.current.courses.each do |course| %>
|
<% User.current.courses.each do |course| %>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<% if course %>
|
<% if course %>
|
||||||
<li id="homework_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=course.name%>" onmouseover="homeworkSlipMenuOver(<%= course.id%>);" onmouseout="homeworkSlipMenuOut(<%= course.id%>);">
|
<li id="homework_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%=course.name%>" onmouseover="homeworkSlipMenuOver(<%= course.id%>);" onmouseout="homeworkSlipMenuOut(<%= course.id%>);">
|
||||||
<%= link_to course.name, "http://" + Setting.host_course + course_path(course.id) %>
|
<%= link_to course.name, course_path(course.id, host: Setting.host_course) %>
|
||||||
<ul class="homework_sub_menu" id="homework_loggedas_ul_<%= course.id%>" style="top:<%= course_index * 28.1%>px;">
|
<ul class="homework_sub_menu" id="homework_loggedas_ul_<%= course.id%>" style="top:<%= course_index * 28.1%>px;">
|
||||||
<% course.homework_for_courses.map(&:bid).each do |bid| %>
|
<% course.homework_for_courses.map(&:bid).each do |bid| %>
|
||||||
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=bid.name%>">
|
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=bid.name%>">
|
||||||
<%= link_to bid.name, "http://" + Setting.host_course + course_for_bid_path(bid), :target => "_blank" %>
|
<%= link_to bid.name, course_for_bid_path(bid, host: Setting.host_course), :target => "_blank" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue