修复《顶部搜索“分析”报404错误》
This commit is contained in:
parent
5818860a4d
commit
1f5c90185a
|
@ -38,10 +38,19 @@
|
|||
</li>
|
||||
<li class="fontGrey3 mb5"><%= item.try(:highlight).try(:description) ? item.highlight.description[0].html_safe : item.description %></li>
|
||||
<li class="f12 fontGrey2">
|
||||
<span class="mr30">教师:<%= User.find(item.tea_id).realname %></span>
|
||||
<span class="mr30">授课时间:<%= item.time.to_s + item.term%></span>
|
||||
<span class="mr30">更新时间:<%= format_date(item.updated_at)%></span>
|
||||
<span class="mr30"><%= User.find(item.tea_id).user_extensions.occupation.present? ? '单位:'+User.find(item.tea_id).user_extensions.occupation : ''%></span></li>
|
||||
<%= course_teacher = User.where("id = ?", item.tea_id).first if item.tea_id? %>
|
||||
<% if course_teacher.nil? %>
|
||||
<span class="mr30">教师:无</span>
|
||||
<span class="mr30">授课时间:<%= item.time.to_s + item.term%></span>
|
||||
<span class="mr30">更新时间:<%= format_date(item.updated_at)%></span>
|
||||
<span class="mr30">单位:无</span>
|
||||
<%= else %>
|
||||
<span class="mr30">教师:<%= User.find(item.tea_id).realname %></span>
|
||||
<span class="mr30">授课时间:<%= item.time.to_s + item.term%></span>
|
||||
<span class="mr30">更新时间:<%= format_date(item.updated_at)%></span>
|
||||
<span class="mr30"><%= course_teacher.user_extensions.occupation.present? ? '单位:'+ course_teacher.user_extensions.occupation : ''%></span>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -56,7 +65,8 @@
|
|||
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">资源</span></div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="f12 fontGrey2"><span class="mr30">发布者:<%= User.find(item.author_id).login%>(<%= User.find(item.author_id).realname%>)</span>
|
||||
<%= item_author = User.where("id = ?", item.author_id).first if item.author_id? %>
|
||||
<li class="f12 fontGrey2"><span class="mr30">发布者:<%= item_author.nil? ? '无' : item_author.login%>(<%= item_author.realname unless item_author.nil? %>)</span>
|
||||
<!--<span class="mr30">职称:<%#= get_technical_title User.find(item.author_id) %></span>-->
|
||||
<span class="mr30">发布时间:<%= format_date(item.created_on)%></span>
|
||||
<span class="mr30">下载次数:<%= item.downloads%>次</span>
|
||||
|
@ -76,7 +86,8 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="fontGrey3 mb5"><%= item.try(:highlight).try(:description) ? item.highlight.description[0].html_safe : item.description%></li>
|
||||
<li class="f12 fontGrey2"><span class="mr30">管理人员:<%= item.user_id ? User.find(item.user_id).login : '无' %></span><span class="mr30">更新时间:<%= date_format_local( Project.find(item.id).updated_on) %></span></li>
|
||||
<%= project_admin = User.where("id = ?", item.user_id).first if item.user_id? %>
|
||||
<li class="f12 fontGrey2"><span class="mr30">管理人员:<%= project_admin.nil? ? '无' : project_admin.login %></span><span class="mr30">更新时间:<%= date_format_local( Project.find(item.id).updated_on) %></span></li>
|
||||
</ul>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -92,7 +103,8 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="fontGrey3 mb5"><%= item.try(:highlight).try(:content) ? item.highlight.content[0].html_safe : item.content.html_safe%></li>
|
||||
<li class="f12 fontGrey2"><span class="mr30">发帖人:<%= item.author_id ? User.find(item.author_id).login : '无' %></span><span class="mr30">更新时间:<%= format_date( item.updated_at) %></span></li>
|
||||
<%= memo_author = User.where("id = ?", item.author_id).first if item.author_id? %>
|
||||
<li class="f12 fontGrey2"><span class="mr30">发帖人:<%= memo_author.nil? ? '无' : memo_author.login %></span><span class="mr30">更新时间:<%= format_date( item.updated_at) %></span></li>
|
||||
</ul>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
|
Loading…
Reference in New Issue