作业列表页面修改

This commit is contained in:
caishi 2017-09-15 15:23:51 +08:00
parent 3e07f18be5
commit 26e88c72f0
5 changed files with 31 additions and 30 deletions

View File

@ -14,7 +14,7 @@ unless RUBY_PLATFORM =~ /w32/
gem 'nokogiri'
end
gem 'simple_xlsx_reader'
#gem 'simple_xlsx_reader'
gem 'wechat',path: 'lib/wechat'
gem 'grack', path:'lib/grack'
gem 'gitlab', path: 'lib/gitlab-cli'

View File

@ -79,33 +79,33 @@ module CoursesHelper
#生成课程老师成员链接
def course_teacher_link teacher_num
if User.current.allowed_to?(:as_teacher, @course)
link_to teacher_num, settings_course_path(@course, :tab => 'member'), :class => 'mr5 color-orange03', :id => 'teacher_number'
link_to teacher_num, settings_course_path(@course, :tab => 'member'), :class => 'ml5 edu-cir-grey-q color-orange05', :id => 'teacher_number'
elsif User.current.member_of_course?(@course)
link_to teacher_num, course_member_path(@course, :role => 't'), :class => 'mr5 color-orange03', :id => 'teacher_number'
link_to teacher_num, course_member_path(@course, :role => 't'), :class => 'ml5 edu-cir-grey-q color-orange05', :id => 'teacher_number'
else
content_tag 'span',teacher_num, :class => 'mr5 color-orange03'
content_tag 'span',teacher_num, :class => 'ml5 edu-cir-grey-q color-orange05'
end
end
#生成课程学生列表连接
def course_student_link student_num
if User.current.allowed_to?(:as_teacher, @course)
link_to "#{student_num}", settings_course_path(@course, :tab => 'member', :role => 'as'), :class => 'mr5 color-orange03', :id => 'student_number'
link_to "#{student_num}", settings_course_path(@course, :tab => 'member', :role => 'as'), :class => 'ml5 edu-cir-grey-q color-orange05', :id => 'student_number'
elsif (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course))
link_to "#{student_num}", course_member_path(@course, :role => 'as'), :class => 'mr5 color-orange03', :id => "student_number"
link_to "#{student_num}", course_member_path(@course, :role => 'as'), :class => 'ml5 edu-cir-grey-q color-orange05', :id => "student_number"
else
content_tag 'span',student_num, :class => 'mr5 color-orange03'
content_tag 'span',student_num, :class => 'ml5 edu-cir-grey-q color-orange05'
end
end
# 生成分班列表连接
def course_group_link group_num
if User.current.allowed_to?(:as_teacher, @course)
link_to "#{group_num}", settings_course_path(@course, :tab => 'member', :role => @course.course_groups.first.id), :class => 'mr5 color-orange03', :id => 'group_number'
link_to "#{group_num}", settings_course_path(@course, :tab => 'member', :role => @course.course_groups.first.id), :class => 'ml5 edu-cir-grey-q color-orange03', :id => 'group_number'
elsif (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course))
link_to "#{group_num}", course_member_path(@course, :role => @course.course_groups.first.id), :class => 'mr5 color-orange03', :id => "group_number"
link_to "#{group_num}", course_member_path(@course, :role => @course.course_groups.first.id), :class => 'ml5 edu-cir-grey-q color-orange03', :id => "group_number"
else
content_tag 'span',group_num, :class => 'sy_cblue'
content_tag 'span',group_num, :class => 'ml5 edu-cir-grey-q color-orange05'
end
end

View File

@ -1,7 +1,7 @@
<div class="with85 fl">
<div class="ml15 user_bg_shadow bor-grey-e">
<div class="edu-con-top clearfix">
<p class="ml15 color-grey fl"><%= @homework_type == 4 ? '实训列表' : '作业列表' %></p>
<p class="ml15 color-grey3 fl"><%= @homework_type == 4 ? '实训列表' : '作业列表' %></p>
<% if @is_teacher %>
<% if @homework_type != 4 %>
<%= link_to '新建', new_homework_common_path(:course => @course.id, :homework_type =>@homework_type), :class => "white-btn orange-btn fr mr20", :title => "新建作业" %>

View File

@ -30,7 +30,7 @@
<span class="fl" style="width:80%;">
<span class="fl"><%= @course.name %></span>
<% if @course.is_public == 0 %>
<i class="fa fa-lock color-grey font-18 ml10 fl mt8"></i>
<i class="fa fa-lock color-grey-c font-18 ml10 fl mt8"></i>
<% end %>
</span>
@ -48,23 +48,23 @@
</span>
</li>
<li class="color-grey clearfix font-12">
<span class="javascript:void(0);"><%= link_to @course.teacher.show_real_name, user_path(@course.teacher), :class => 'edu-info-dark task-hide fl' %></span>
<li class="color-grey clearfix font-14">
<span class="javascript:void(0);"><span class="fl mr5 color-grey3">主讲</span><%= link_to @course.teacher.show_real_name, user_path(@course.teacher), :class => 'edu-info-dark color-grey3 task-hide fl' %></span>
<span class="ml30 edu-info-dark task-hide fl"><%= get_occupation_from_user(@course.teacher).blank? ? '' : get_occupation_from_user(@course.teacher) %></span>
<span class="ml30" id="teacher_number"><%= course_teacher_link teacher_num %>教师</span>
<span class="ml30" id="student_number"><%= course_student_link student_num %>学生</span>
<span class="ml30" id="teacher_number">教师<%= course_teacher_link teacher_num %></span>
<span class="ml30" id="student_number">学生<%= course_student_link student_num %></span>
<% if group_num != 0 %>
<span class="ml30">
<%= course_group_link group_num %>分班
分班<%= course_group_link group_num %>
</span>
<% end %>
<% if @course.credit %>
<span class="ml30">
<span class="mr5"><%= @course.credit %></span>学分
学分<span class="ml5 edu-cir-grey color-grey3"><%= @course.credit %></span>
</span>
<% end %>
<% if !@course.is_end && @course.end_date %>
<span class="ml30"><%= course_end_date @course %>天后结束</span>
<span class="ml30">结束<span class="ml5 edu-cir-grey-q color-grey3"><%= course_end_date @course %>&nbsp;天后</span></span>
<% elsif @course.is_end %>
<span class="ml30">已结束</span>
<% end %>

View File

@ -155,7 +155,7 @@ a:hover.task-btn-ver{background:#5f7cab;}
.new_login_submit:hover{background: #19b17e;}
a.task-btn-email{display: inline-block;font-weight: bold;border: none; width:185px;color: #666;background: #e1e1e1;letter-spacing: 1px;text-align: center;font-size: 14px;height: 40px;line-height: 40px;border-radius: 3px;}
a:hover.task-btn-email {background: #c3c3c3; color: #666;}
.white-btn{cursor: pointer;display: inline-block;padding: 0 12px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 30px;line-height: 30px;border-radius: 3px;}
.white-btn{cursor: pointer;display: inline-block;padding: 0 8px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 26px;line-height: 26px;border-radius: 3px;margin-top: 1px}
a.white-btn.green-btn{color:#29bd8b;border:1px solid #29bd8b; }
a.white-btn.orange-btn{color: #FF7500;border: 1px solid #FF7500}
a.white-btn.orange-btn:hover{color: #FFFFFF;border: 1px solid #FF7500;background: #ff7500}
@ -246,20 +246,21 @@ a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;}
.edu-form-noborder,input.edu-form-noborder{ border:none; outline:none;}
a.edu-btn{display: inline-block;border:none; padding:0 12px;color: #666!important;border:1px solid #ccc; text-align:center;font-size: 14px; height: 29px;line-height: 29px; border-radius:3px; font-weight: bold;letter-spacing:1px;}
a:hover.edu-btn{ border:1px solid #5faee3; color: #5faee3!important;}
.edu-cir-grey{ display: inline-block; padding:0px 5px; color:#666; background:#eaeaea; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
.edu-cir-grey{ display: inline-block; padding:0px 5px; color:#666; background:#f3f3f3; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
.edu-cir-grey-q{ display: inline-block; padding:0px 7px; color:#666; background:#f3f3f3; text-align: center; border-radius:15px; font-size:12px; line-height:20px!important;}
/*a.edu-filter-cir-grey{display: inline-block; padding:0px 15px; color:#666; border:1px solid #ddd; text-align: center; border-radius:3px; font-size:12px; height:25px; line-height:25px;}
a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498db; color:#3498db; }*/
.edu-filter-btn{display: inline-block; padding:0px 10px; color:#666; background:#eee; text-align: center; border-radius:3px; font-size:12px; height:25px; line-height:25px;}
.edu-filter-btn-blue{background:#ebf6fe; color:#3498db;}
.edu-filter-btn-orange{background:#ffeee8; color:#ff5055;}
.edu-filter-btn-red{background:#fee4e5; color:#d72e36;}
.edu-filter-btn-green{background:#e4f3ec; color:#6fbb9d;}
.edu-filter-btn-yellow{background:#fdefde; color:#ef9324;}
.edu-filter-btn{display: inline-block; padding:0px 3px; color:#666; background:#fff; text-align: center; border-radius:3px; font-size:12px; height:20px; line-height:20px;}
.edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;}
.edu-filter-btn-orange{border:1px solid #ff5055; color:#ff5055;}
.edu-filter-btn-red{border:1px solid #d72e36; color:#d72e36;}
.edu-filter-btn-green{border:1px solid #6fbb9d; color:#6fbb9d;}
.edu-filter-btn-yellow{border:1px solid #ef9324; color:#ef9324;}
.edu-filter-btn-danger{background:#d72e36; color:#fff;}
.edu-filter-btn-late{background: rgba(186, 205, 215, 0.35); color: #3fbcff;}
.edu-filter-btn-no-late{background: rgba(186, 205, 215, 0.35); color: #8c8c8c;}
.edu-filter-btn-late{border:1px solid #3fbcff; color: #3fbcff;}
.edu-filter-btn-no-late{border:1px solid #8c8c8c;color: #8c8c8c;}
.eud-pointer{ cursor:pointer;}
.edu-bg-grey{ background:#f6f6f6; width:90%; min-width:700px; color:#666;}
/* table-1底部边框 */
@ -357,7 +358,7 @@ html>body #ajax-indicator { position: fixed; }
.course_filtrate:hover{background: #FF7500; color: #ffffff; }
.course_filtrate_bg{background: #FF7500; color: #ffffff!important; }
/*我的课堂----------筛选切换(没有数字,默认灰色背景)*/
.edu-filter-cir-grey{color: #666;width: auto;padding:0px 15px;text-align: center;background: #eeeeee;border-radius: 10px;display: block; height:25px; line-height:25px;}
.edu-filter-cir-grey{color: #666;width: auto;padding:0px 15px;text-align: center;background: #f3f3f3;border-radius: 10px;display: block; height:25px; line-height:25px;}
.edu-filter-cir-grey:hover{background: #FF7500; color: #ffffff;}
.edu-filter-cir-grey.active{background: #FF7500; color: #ffffff!important;}