标记精品课程,精品课程推荐
This commit is contained in:
parent
8b815f95bb
commit
f52b0c1cc6
|
@ -49,6 +49,11 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
# 判断课程是否为精品课程
|
||||
def is_excellent_course course
|
||||
course.is_excellent? ? true : false
|
||||
end
|
||||
|
||||
# 获取项目/课程总分
|
||||
# 发布缺陷 4分 回复缺陷 1分 提交一次 4分 讨论帖子 2分 回复帖子 1分 发布新闻 1分
|
||||
def static_project_score obj
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<ul class="courseR">
|
||||
<p class="fontGrey2 f14"><%= l(:label_homework_recommendation) %></p>
|
||||
<li class="mt15"> <%= image_tag(url_to_avatar(course), :width => "40", :height => "40", :class => "fl mr10 rankPortrait", :alt => "logo") %>
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170"><%=link_to course.name, course_path(course) %> </a></p>
|
||||
<p class="f12">
|
||||
<span class="fl mr15 fontGrey4"><%= l(:project_module_attachments) %>(<a href="javascript:void:(0);" class="linkBlue2"><%= course.attachments.count %></a>)</span>
|
||||
<span class="fl fontGrey4"><%= l(:label_homework_commont) %>(<a href="javascript:void:(0);" class="linkBlue2"><%= course.homework_commons.count %></a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">前端技术II(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">数据库(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">离散数学(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">组成原理(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
|
@ -3,14 +3,14 @@
|
|||
<% student_num = studentCount(@course) %>
|
||||
<% course_file_num = visable_attachemnts_incourse(@course).count%>
|
||||
<div class="pr_info_logo fl mr10 mb5">
|
||||
<% if @course.id == 370 %>
|
||||
<% if is_excellent_course(@course) %>
|
||||
<img src="/images/course/boutique.png" width="50" height="auto" alt="精品" class="boutiqueP" />
|
||||
<% end %>
|
||||
<!--<a href="#"><img src="images/courses/pic_courses.jpg" width="60" height="60" alt="logo" /></a>-->
|
||||
<%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %>
|
||||
</div>
|
||||
<div class="pr_info_id fl mb5 f14"><%= @course.is_public == 0 ? "私有课程" : "公开课程" %>
|
||||
<% if @course.id == 370 %>
|
||||
<% if is_excellent_course(@course) %>
|
||||
<img src="/images/course/medal.png" alt="精品课程" style="vertical-align:bottom;" class="ml5" />
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -205,45 +205,7 @@
|
|||
<div class="cl"></div>
|
||||
</div><!--项目标签 end-->
|
||||
<!--课程推荐-->
|
||||
<ul class="courseR">
|
||||
<p class="fontGrey2 f14">课程推荐</p>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">前端技术(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">前端技术II(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">数据库(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">离散数学(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="mt15"> <img src="images/courses/pic_courses.jpg" width="40" height="40" alt="logo" class="fl mr10 rankPortrait" />
|
||||
<div class="fl">
|
||||
<p class="f12 mb5"><a href="javascript:void:(0);" class="hidden fl w170">组成原理(2015秋季学期)</a></p>
|
||||
<p class="f12"><span class="fl mr15 fontGrey4">资源(<a href="javascript:void:(0);" class="linkBlue2">29</a>)</span><span class="fl fontGrey4">作业(<a href="javascript:void:(0);" class="linkBlue2">8</a>)</span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
|
||||
</div><!--LSide end-->
|
||||
|
||||
<div id="RSide" class="fl">
|
||||
|
|
|
@ -2106,4 +2106,6 @@ zh:
|
|||
label_org_name: 组织名称:
|
||||
label_blank_user_lists_for_org: 用户不能为空
|
||||
|
||||
|
||||
# 课程推荐
|
||||
label_homework_commont: 作业
|
||||
label_homework_recommendation: 课程推荐
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160115125217) do
|
||||
ActiveRecord::Schema.define(:version => 20160118014219) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -499,6 +499,7 @@ ActiveRecord::Schema.define(:version => 20160115125217) do
|
|||
t.integer "is_delete", :default => 0
|
||||
t.integer "end_time"
|
||||
t.string "end_term"
|
||||
t.integer "is_excellent", :default => 0
|
||||
end
|
||||
|
||||
create_table "custom_fields", :force => true do |t|
|
||||
|
|
Loading…
Reference in New Issue