班级头部的调整

This commit is contained in:
cxt 2016-12-13 16:16:32 +08:00
parent 3402c011f8
commit ec476cbd74
3 changed files with 20 additions and 24 deletions

View File

@ -3,7 +3,7 @@
<% student_num = studentCount(@course) %>
<% course_file_num = visable_attachemnts_incourse(@course).count %>
<p class="sy_cgrey mb10 mr20">
<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cgrey') %>
<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :title => '主讲老师', :class => 'sy_cgrey') %>
&nbsp;&gt;&nbsp;
<% if @course.syllabus %>
<%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey', :title => '课程名称' %>
@ -22,6 +22,12 @@
<% if @course.syllabus %>
<li><%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "sy_class_option", :target => "_blank" %></li>
<% end %>
<% if @course.invite_code_halt == 0 %>
<li><a href="javascript:void(0);" class="sy_class_option" onclick="alert_halt_code();">暂停加入</a></li>
<% elsif @course.invite_code_halt == 1 %>
<li><a href="<%=set_invite_code_halt_course_path(@course) %>" data-remote="true" class="sy_class_option">放开加入</a></li>
<% end %>
<li><%= link_to "设置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "sy_class_option" %></li>
</ul>
</li>
</ul>
@ -54,7 +60,7 @@
</div>
</div>
<div class="sy_class_id fl">
<p style="margin: <%=is_teacher ? '8px auto' : '24px auto 0px' %>">邀 请 码<br />
<p>邀 请 码<br />
<span class="sy_corange">
<% if @course.invite_code_halt == 0 %>
<% if User.current.admin? || User.current.member_of_course?(@course) %>
@ -66,11 +72,6 @@
已停用
<% end %>
</span>
<% if is_teacher && @course.invite_code_halt == 0 %>
<a href="javascript:void(0);" class="btn_grey_mid" style="margin-bottom: 12px;" onclick="alert_halt_code();">停&nbsp;&nbsp;&nbsp;&nbsp;用</a>
<% elsif is_teacher && @course.invite_code_halt == 1 %>
<a href="<%=set_invite_code_halt_course_path(@course) %>" data-remote="true" class="btn_grey_mid" style="margin-bottom: 12px;">启&nbsp;&nbsp;&nbsp;&nbsp;用</a>
<% end %>
</p>
</div>
<div class="sy_class_info fl ml15">
@ -79,22 +80,16 @@
<%=@course.name %>
</h3>
<span class="<%= @course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
<p class="sy_cgrey fl mt3">
<span class=" mr15">教师:<%= course_teacher_link teacher_num %></span>
<span class=" mr15">学生:<%= course_student_link student_num %></span>
<span class=" mr15">资源:<%= link_to course_file_num, course_files_path(@course), :class => 'sy_cblue',:id=>'courses_files_count_info' %></span>
</p>
<div class="cl"></div>
</div>
<p class="sy_cgrey mb5">
<span class=" mr15">主讲老师:<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cblue') %></span>
<span class=" mr15">学时:<span class="sy_cblack"><%= @course.class_period %>学时</span></span>
<span class=" mr15">学期:<span class="sy_cblack"><%= current_time_and_term @course %></span></span>
<span class=" mr15">单位:<span class="sy_cblack"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span></span>
<span class="mr25">学期:<span class="sy_cblack"><%= current_time_and_term @course %></span></span>
<span class="mr25">教师:<%= course_teacher_link teacher_num %></span>
<span class="mr25">学生:<%= course_student_link student_num %></span>
</p>
<p class="sy_cgrey fl mt5">
<span class="mr25">单位:<span class="sy_cblack"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span></span>
</p>
<% if is_teacher %>
<%= link_to "班级设置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "sy_btn_grey mr10 fl" %>
<% end %>
<% is_TA = get_user_member_roles_course @course, User.current, 7 %>
<% is_TE = get_user_member_roles_course @course, User.current, 9 %>
<% is_ST = get_user_member_roles_course @course, User.current, 10 %>
@ -114,7 +109,7 @@
<div class="invite_code_tip_box fontGrey2" id="invite_code_tip_box">
<em></em>
<span></span>
<p class="mt10 mb5"><%= @course.invite_code_halt == 0 ? "请将邀请码告诉学生和教辅" : "邀请码已停用,学生和教辅" %></p>
<p class="mb10"><%= @course.invite_code_halt == 0 ? "他们可以主动加入班级" : "不可以主动加入班级了" %></p>
<p class="mt10 mb5"><%= @course.invite_code_halt == 0 ? "请将邀请码告诉成员" : "邀请码已停用" %></p>
<p class="mb10"><%= @course.invite_code_halt == 0 ? "他们可以主动加入" : "暂时停止成员主动加入" %></p>
</div>
<% end %>

View File

@ -1441,7 +1441,7 @@ a.syllabusbox_a_blue {
.resource_tip_box span {display:block; border-width:10px; position:absolute;top:35px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}
/*邀请码提示框*/
.invite_code_tip_box {position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-185px; top:50px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
.invite_code_tip_box {position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-160px; top:50px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
.invite_code_tip_box em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.invite_code_tip_box span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}

View File

@ -289,10 +289,11 @@ a.sy_class_option:hover {
}
.sy_class_id{
width:94px;
height:94px;
height:70px;
border:1px solid #f1f1f1;
background:#fff;
text-align:center;
padding-top:24px;
}
.sy_class_id p{
font-size:16px;
@ -302,7 +303,7 @@ a.sy_class_option:hover {
font-size: 18px;
font-weight: normal;
margin-bottom: 5px;
max-width:440px;
max-width:650px;
overflow:hidden;
white-space: nowrap;
text-overflow:ellipsis;