针对课程370的精品课程样式设计
This commit is contained in:
parent
3d73a3c243
commit
893e5dc7f3
|
@ -1,92 +1,99 @@
|
|||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<% teacher_num = searchTeacherAndAssistant(@course).count %>
|
||||
<% student_num = studentCount(@course) %>
|
||||
<% course_file_num = visable_attachemnts_incourse(@course).count%>
|
||||
<div class="pr_info_logo fl mr10 mb5">
|
||||
<!--<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 ? "私有课程" : "公开课程" %></div>
|
||||
<div class="pr_info_id fl f14">
|
||||
ID:<%= @course.id%>
|
||||
</div>
|
||||
<!--<div class="pr_info_id fl mb5 f14">
|
||||
ID:<%#= @course.id%>
|
||||
</div>
|
||||
<div class="pr_info_join fl">
|
||||
<%# if is_teacher%>
|
||||
<%#= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, {:controller => 'courses', :action => 'settings', :id => @course}, :class => "pr_join_a" %>
|
||||
<%#= set_course_time @course%>
|
||||
<%#= link_to "<span class='pr_copy'></span>#{l(:button_copy)}".html_safe, copy_course_course_path(@course.id), :class => "pr_join_a" %>
|
||||
<%# else%>
|
||||
<div id="join_in_course_header"><%#= join_in_course_header(@course, User.current) %></div>
|
||||
<%# end%>
|
||||
</div>-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<!--<div >-->
|
||||
<!--<a class="pr_info_name fl c_dark fb break_word" href="http://<%#= Setting.host_course%>/courses/<%#= @course.id%>" target="_blank">-->
|
||||
<!--<%#= @course.name %>-->
|
||||
<!--</a>-->
|
||||
<!--<%# if @course.is_public == 0%>-->
|
||||
<!--<span class="img_private ">-->
|
||||
<!--<%#= l(:field_is_private)%>-->
|
||||
<!--</span>-->
|
||||
<!--<%# end %>-->
|
||||
<!--<%#if @course.tea_id == User.current.id && @course.outline == 0 %>-->
|
||||
<!--<span>-->
|
||||
<!--<a href="javascript:void(0)" onclick="course_outline('<%#= @course.id%>');">设置大纲</a>-->
|
||||
<!--</span>-->
|
||||
<!--<%# else%>-->
|
||||
<!--<span>-->
|
||||
<!--<a href="javascript:void(0)" onclick="course_outline('<%#= @course.id%>');">设置大纲</a>-->
|
||||
<!--</span>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</div>-->
|
||||
<div >
|
||||
<a class="pr_info_name fl c_dark fb break_word" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank"></a>
|
||||
<div>
|
||||
<a class="pr_info_name c_dark fb break_word fl" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank">
|
||||
<%= @course.name %>
|
||||
</a>
|
||||
<%# if @course.is_public == 0%>
|
||||
<!--<span class="img_private "></span>-->
|
||||
<!--<span class="img_private mr5 fl">
|
||||
<%#= l(:field_is_private)%>
|
||||
</span>-->
|
||||
<%# end %>
|
||||
<span id="course_outline_bar">
|
||||
<%if User.current && @course.tea_id == User.current.id && (@course.outline == 0 || BlogComment.where(:id=>@course.outline).count == 0) %>
|
||||
<a href="javascript:void(0);" title="设置课程大纲" onclick="course_outline('<%= @course.id%>')" class="mr5 syllabusSetting fl"> </a>
|
||||
<% elsif User.current && @course.tea_id == User.current.id && @course.outline != 0 && BlogComment.where(:id=>@course.outline).count != 0%>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<% elsif User.current && @course.tea_id != User.current.id && !@course.is_public? && User.current.member_of_course?(@course) && @course.outline != 0%>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<% elsif User.current && @course.tea_id != User.current.id && @course.is_public? && @course.outline != 0%>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<%else%>
|
||||
<%end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="pr_info_foot ">
|
||||
<%= l(:label_account_identity_teacher)%>(<%= course_teacher_link teacher_num %>)
|
||||
<span>| </span>
|
||||
<%= l(:label_account_identity_student)%>(<%= course_student_link student_num %>)
|
||||
<span>| </span>
|
||||
<%= l(:project_module_attachments)%>(<%= link_to course_file_num, course_files_path(@course), :class => 'info_foot_num c_blue',:id=>'courses_files_count_info' %>)</div>
|
||||
<div class="cl"></div>
|
||||
<% if is_teacher %>
|
||||
<div class="homepagePostSetting mt5 mr5">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText boxShadow">
|
||||
<li><%= link_to "课程配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
||||
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %></li>
|
||||
<li><%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<% teacher_num = searchTeacherAndAssistant(@course).count %>
|
||||
<% student_num = studentCount(@course) %>
|
||||
<% course_file_num = visable_attachemnts_incourse(@course).count%>
|
||||
<div class="pr_info_logo fl mr10 mb5">
|
||||
<% if @course.id == 370 %>
|
||||
<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 %>
|
||||
<img src="/images/course/medal.png" alt="精品课程" style="vertical-align:bottom;" class="ml5" />
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pr_info_id fl f14">
|
||||
ID:<%= @course.id%>
|
||||
</div>
|
||||
<!--<div class="pr_info_id fl mb5 f14">
|
||||
ID:<%#= @course.id%>
|
||||
</div>
|
||||
<div class="pr_info_join fl">
|
||||
<%# if is_teacher%>
|
||||
<%#= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, {:controller => 'courses', :action => 'settings', :id => @course}, :class => "pr_join_a" %>
|
||||
<%#= set_course_time @course%>
|
||||
<%#= link_to "<span class='pr_copy'></span>#{l(:button_copy)}".html_safe, copy_course_course_path(@course.id), :class => "pr_join_a" %>
|
||||
<%# else%>
|
||||
<div id="join_in_course_header"><%#= join_in_course_header(@course, User.current) %></div>
|
||||
<%# end%>
|
||||
</div>-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<!--<div >-->
|
||||
<!--<a class="pr_info_name fl c_dark fb break_word" href="http://<%#= Setting.host_course%>/courses/<%#= @course.id%>" target="_blank">-->
|
||||
<!--<%#= @course.name %>-->
|
||||
<!--</a>-->
|
||||
<!--<%# if @course.is_public == 0%>-->
|
||||
<!--<span class="img_private ">-->
|
||||
<!--<%#= l(:field_is_private)%>-->
|
||||
<!--</span>-->
|
||||
<!--<%# end %>-->
|
||||
<!--<%#if @course.tea_id == User.current.id && @course.outline == 0 %>-->
|
||||
<!--<span>-->
|
||||
<!--<a href="javascript:void(0)" onclick="course_outline('<%#= @course.id%>');">设置大纲</a>-->
|
||||
<!--</span>-->
|
||||
<!--<%# else%>-->
|
||||
<!--<span>-->
|
||||
<!--<a href="javascript:void(0)" onclick="course_outline('<%#= @course.id%>');">设置大纲</a>-->
|
||||
<!--</span>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</div>-->
|
||||
<div >
|
||||
<a class="pr_info_name fl c_dark fb break_word" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank"></a>
|
||||
<div>
|
||||
<a class="pr_info_name c_dark fb break_word fl" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank">
|
||||
<%= @course.name %>
|
||||
</a>
|
||||
<%# if @course.is_public == 0%>
|
||||
<!--<span class="img_private "></span>-->
|
||||
<!--<span class="img_private mr5 fl">
|
||||
<%#= l(:field_is_private)%>
|
||||
</span>-->
|
||||
<%# end %>
|
||||
<span id="course_outline_bar">
|
||||
<%if User.current && @course.tea_id == User.current.id && (@course.outline == 0 || BlogComment.where(:id=>@course.outline).count == 0) %>
|
||||
<a href="javascript:void(0);" title="设置课程大纲" onclick="course_outline('<%= @course.id%>')" class="mr5 syllabusSetting fl"> </a>
|
||||
<% elsif User.current && @course.tea_id == User.current.id && @course.outline != 0 && BlogComment.where(:id=>@course.outline).count != 0%>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<% elsif User.current && @course.tea_id != User.current.id && !@course.is_public? && User.current.member_of_course?(@course) && @course.outline != 0%>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<% elsif User.current && @course.tea_id != User.current.id && @course.is_public? && @course.outline != 0%>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<%else%>
|
||||
<%end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="pr_info_foot ">
|
||||
<%= l(:label_account_identity_teacher)%>(<%= course_teacher_link teacher_num %>)
|
||||
<span>| </span>
|
||||
<%= l(:label_account_identity_student)%>(<%= course_student_link student_num %>)
|
||||
<span>| </span>
|
||||
<%= l(:project_module_attachments)%>(<%= link_to course_file_num, course_files_path(@course), :class => 'info_foot_num c_blue',:id=>'courses_files_count_info' %>)</div>
|
||||
<div class="cl"></div>
|
||||
<% if is_teacher %>
|
||||
<div class="homepagePostSetting mt5 mr5">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText boxShadow">
|
||||
<li><%= link_to "课程配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
||||
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %></li>
|
||||
<li><%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -1255,3 +1255,4 @@ div.disable_link {background-color: #c1c1c1 !important;}
|
|||
.boxShadow {box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
|
||||
.fn {font-weight:normal}
|
||||
.boutiqueP {position:absolute; left:0px; top:0px;}
|
||||
|
|
Loading…
Reference in New Issue