优化上周动态获取代码
This commit is contained in:
parent
dcc37ef847
commit
03d6afd1c4
|
@ -591,6 +591,26 @@ module CoursesHelper
|
|||
Course.tagged_with(tag_name).order('updated_at desc')
|
||||
end
|
||||
|
||||
# 获取动态列表名称
|
||||
def get_acts_list_type type
|
||||
case type
|
||||
when "homework"
|
||||
">" + l(:label_homework_acts)
|
||||
when "news"
|
||||
">" + l(:label_news_acts)
|
||||
when "attachment"
|
||||
">" + l(:label_attachment_acts)
|
||||
when "message"
|
||||
">" + l(:label_message_acts)
|
||||
when "journalsForMessage"
|
||||
">" + l(:label_journalsForMessage_acts)
|
||||
when "poll"
|
||||
">" + l(:label_poll_acts)
|
||||
else
|
||||
">" + l(:label_all_cats)
|
||||
end
|
||||
end
|
||||
|
||||
#分班下拉框
|
||||
def course_group_option course
|
||||
type = []
|
||||
|
|
|
@ -10,22 +10,7 @@
|
|||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">班级动态
|
||||
<% if params[:type] == "homework" %>
|
||||
<%= ">作业动态" %>
|
||||
<% elsif params[:type] == "news" %>
|
||||
<%= ">通知动态" %>
|
||||
<% elsif params[:type] == "attachment" %>
|
||||
<%= ">资源库动态" %>
|
||||
<% elsif params[:type] == "message" %>
|
||||
<%= ">论坛动态" %>
|
||||
<% elsif params[:type] == "journalsForMessage" %>
|
||||
<%= ">留言动态" %>
|
||||
<% elsif params[:type] == "poll" %>
|
||||
<%= ">问卷动态" %>
|
||||
<% else %>
|
||||
<%= ">全部动态" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= get_acts_list_type @type %></div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType">
|
||||
|
|
|
@ -29,6 +29,16 @@ zh:
|
|||
label_upload_files: 上传资源
|
||||
label_apply_join_course: 申请加入班级
|
||||
label_apply_for_homework: 申请引用作业
|
||||
|
||||
#动态名称
|
||||
label_homework_acts: 作业动态
|
||||
label_news_acts: 通知动态
|
||||
label_attachment_acts: 资源库动态
|
||||
label_message_acts: 论坛动态
|
||||
label_journalsForMessage_acts: 留言动态
|
||||
label_poll_acts: 问卷动态
|
||||
label_all_cats: 全部动态
|
||||
|
||||
#
|
||||
# 课程托管平台主页
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue