修正二级菜单名称显示问题
This commit is contained in:
parent
13a3725b06
commit
3254c4a237
|
@ -108,6 +108,11 @@ class Course < ActiveRecord::Base
|
||||||
#description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
|
#description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 课程的短名称信息
|
||||||
|
def short_name(length = 8)
|
||||||
|
name.gsub(/<\/?.*?>/,"").html_safe if name
|
||||||
|
end
|
||||||
|
|
||||||
def strip_html(html)
|
def strip_html(html)
|
||||||
return html if html.empty? || !html.include?('<')
|
return html if html.empty? || !html.include?('<')
|
||||||
output = ""
|
output = ""
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<ul class="course_sub_menu">
|
<ul class="course_sub_menu">
|
||||||
<% User.current.courses.each do |course| %>
|
<% User.current.courses.each do |course| %>
|
||||||
<% if !course_endTime_timeout?(course) %>
|
<% if !course_endTime_timeout?(course) %>
|
||||||
<li><%= link_to course.name, course_path(course) %></li>
|
<li><%= link_to course.name.truncate(10, omission: '...'), course_path(course) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<li id="project_loggedas_li"><%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
<li id="project_loggedas_li"><%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||||
<ul class="project_sub_menu">
|
<ul class="project_sub_menu">
|
||||||
<% User.current.projects.each do |project| %>
|
<% User.current.projects.each do |project| %>
|
||||||
<li><%= link_to project.name, project_path(project) %></li>
|
<li><%= link_to project.name.truncate(10, omission: '...'), project_path(project) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -2170,7 +2170,7 @@ ul.messages-for-user-reply li {
|
||||||
left: 115px;
|
left: 115px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 40px;
|
top: 0px;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
padding: 0px 0px;
|
padding: 0px 0px;
|
||||||
|
|
Loading…
Reference in New Issue