Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop

This commit is contained in:
huang 2017-09-22 20:04:49 +08:00
commit fddf4b302a
7 changed files with 27 additions and 8 deletions

View File

@ -383,6 +383,10 @@ end
# 新增
def create_departments
dep = Department.order("created_at desc").first
@latest_school = School.find(dep.try(:school_id)).try(:name)
@school_id = dep.try(:school_id)
respond_to do |format|
format.js
end

View File

@ -44,7 +44,7 @@ class Challenge < ActiveRecord::Base
def choose_score
score = 0
self.challenge_chooses.each do |choose|
score += choose.score
score += choose.score.to_i
end
return score
end

View File

@ -13,12 +13,12 @@
<li><%= link_to '成员管理', members_course_path(@course),:class => "color-orange03" %>
<% apply_count = CourseMessage.where(:course_id => @course.id,:course_message_type => 'JoinCourseRequest', :status => 0).count %>
<% if apply_count > 0 %>
<span class="ml10"><span class="edu-cir-orange" data-tip-down="有<%= apply_count %>名助教或教师申请加入课堂,请审批"><%= apply_count %></span></span>
<span class="ml10" style="cursor: pointer"><span class="edu-cir-orange" data-tip-down="有<%= apply_count %>名助教或教师申请加入课堂,请审批"><%= apply_count %></span></span>
<% end %>
</li>
<li><%= link_to '+&nbsp;发布普通作业'.html_safe, new_homework_common_path(:course => @course.id, :homework_type => 1),:class => "color-orange03" %></li>
<li><%= link_to '+&nbsp;发布实训作业'.html_safe, shixuns_homework_common_index_path(:course => @course.id),:class => "color-orange03", :remote => true %></li>
<li><a class="color-orange03" onclick="course_files_upload();">+&nbsp;发布资源</a></li>
<li><a class="color-orange03" onclick="course_files_upload();" style="cursor: pointer">+&nbsp;发布资源</a></li>
<% course_board = @course.boards.where("parent_id is NULL").first %>
<li><%= link_to '+&nbsp;发布帖子'.html_safe, new_board_message_path(:board_id => course_board.id),:class => "color-orange03" %></li>
</ul>

View File

@ -4,15 +4,16 @@
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
</div>
<div class="mt10 ml30">
<span class="fl font-16 color-grey mr10 mt3 ">单位全称:</span><input nhname="tag" name="school" class="task-height-40 panel-box-sizing fl" type="text" placeholder="请选择单位" style="width: 260px" />
<input nhname="tag" nh_tag_5="true" class="fl" id="school_id" name="school_id" style="display:none;" type="text"/> <!-- 单位名称的test框选中下拉列表框的id -->
<span class="fl font-16 color-grey mr10 mt3 ">单位全称:</span>
<input nhname="tag" name="school" class="task-height-40 panel-box-sizing fl" type="text" placeholder="请选择单位" style="width: 260px" value="<%= @latest_school %>" />
<input nhname="tag" nh_tag_5="true" class="fl" id="school_id" name="school_id" style="display:none;" type="text" value="<%= @school_id %>"/> <!-- 单位名称的test框选中下拉列表框的id -->
<div class="cl"></div>
<span class="color-orange fl none" id="school_id_notice" style="margin-left:20%;"><i class="fa fa-exclamation-circle mr5" ></i>请选择单位</span>
</div>
<div id="search_school_result_list" style="width: 260px;line-height: 1.5;min-height:20px; max-height: 200px; height: auto !important;display:none;background: white;overflow: scroll;border: solid 1px #cccccc; overflow-x: hidden; overflow-y: auto;">
</div>
<div class="mt10 ml30">
<span class="fl font-16 color-grey mr10 mt3 ">子单位名称:</span><input class="task-height-40 panel-box-sizing fl" type="text" placeholder="请输入子单位名称" style="width: 260px" name="add_department" value="<%= %>" />
<span class="fl font-16 color-grey mr10 mt3 ">子单位名称:</span><input class="task-height-40 panel-box-sizing fl" type="text" placeholder="请输入子单位名称" style="width: 260px" name="add_department" />
<div class="cl"></div>
<span class="color-orange fl none" id="add_department_notice" style="margin-left:20%;"><i class="fa fa-exclamation-circle mr5" ></i>请输入子单位名称</span>
</div>

View File

@ -1,6 +1,11 @@
<style>
table.panel-new-table tr:hover{background:#EFF9FD}
</style>
<% if @statistics.blank? %>
<div style="background: #fff;padding-bottom: 15px;margin-top:30px;" class="box_bg_shandow bor-grey-e ">
<%= render :partial => "welcome/no_data" %>
</div>
<% else %>
<div class="task-pm-content ">
<div class="task-pm-box mt30 mb30 box_bg_shandow bor-grey-e">
<div class="panel-header clearfix">
@ -48,4 +53,5 @@
</div>
</div>
</div> 
</div>
</div>
<% end %>

View File

@ -0,0 +1,8 @@
class UpdateCourseLists < ActiveRecord::Migration
def up
CourseList.where("user_id is null").update_all(:user_id => 1)
end
def down
end
end

View File

@ -279,7 +279,7 @@ a:hover.edu-filter-cir-grey,a.edu-filter-cir-grey.active{ border:1px solid #3498
.edu-pop-table tr td{border-bottom:1px solid #eee;}
.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;}
.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;}
.edu-pop-table tr td .alink-name{color: #666666!important;}
.edu-pop-table tr td .alink-name{color: #333!important;}
.edu-pop-table tr td .alink-name:hover{color: #FF7500!important;}
.edu-pop-table tr td .alink-operate{color: #cccccc!important;}
.edu-pop-table tr td .alink-operate:hover{color: #FF7500!important;}