dev_bj
cxt 5 years ago
commit 191a9b9786

@ -753,7 +753,7 @@ module ApplicationHelper
when 5 then '实训发布' when 5 then '实训发布'
when 6 then '实训课程发布' when 6 then '实训课程发布'
when 7 then '职业认证' when 7 then '职业认证'
when 8 then '文库发布' when 8 then '教学案例发布'
else '职业认证' else '职业认证'
end end
when 11 when 11
@ -4368,7 +4368,7 @@ module ApplicationHelper
elsif attachment.container_type == "Bid" && attachment.container && attachment.container.courses elsif attachment.container_type == "Bid" && attachment.container && attachment.container.courses
course = attachment.container.courses.first course = attachment.container.courses.first
candown = User.current.member_of_course?(attachment.container.courses.first) || (course.is_public == 1 && attachment.is_public == 1) candown = User.current.member_of_course?(attachment.container.courses.first) || (course.is_public == 1 && attachment.is_public == 1)
elsif attachment.container_type == "Library" #文库允许下载 elsif attachment.container_type == "Library" #教学案例允许下载
candown = true candown = true
else else
candown = (attachment.is_public == 1 || attachment.is_public == true) candown = (attachment.is_public == 1 || attachment.is_public == true)

@ -361,10 +361,10 @@ class Tiding < ActiveRecord::Base
when 'Library' when 'Library'
library = Library.find_by_id(container_id) library = Library.find_by_id(container_id)
if tiding_type == 'Apply' if tiding_type == 'Apply'
"申请发布文库#{library.try(:title)}" "申请发布教学案例#{library.try(:title)}"
elsif tiding_type == 'System' elsif tiding_type == 'System'
text = status == 1 ? "审核已通过" : "审核未通过,<br/>原因:#{extra}" text = status == 1 ? "审核已通过" : "审核未通过,<br/>原因:#{extra}"
"你提交的发布文库申请:#{library.try(:title)}#{text}" "你提交的发布教学案例申请:#{library.try(:title)}#{text}"
end end
else else
logger.error "error type: 1" logger.error "error type: 1"

@ -18,7 +18,7 @@
</ul> </ul>
</li> </li>
<% end %> <% end %>
<li class="<%= params[:controller] == "libraries" ? "active" : "" %>"><%= link_to '教学案例', libraries_path %></li>
<li class="<%= params[:controller] == "competitions" ? " active" : "" %>"><%= link_to "竞赛", competitions_path %></li> <li class="<%= params[:controller] == "competitions" ? " active" : "" %>"><%= link_to "竞赛", competitions_path %></li>
<li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "问答", forums_path %></li> <li class="<%= params[:controller] == "forums" ? " active" : "" %>"><%= link_to "问答", forums_path %></li>
<% if User.current.ec_school.present? %> <% if User.current.ec_school.present? %>

@ -116,7 +116,7 @@
<li><%= link_to '单位审批', unit_managements_path %></li> <li><%= link_to '单位审批', unit_managements_path %></li>
<li><%= link_to '实训发布', shixun_authorization_managements_path %></li> <li><%= link_to '实训发布', shixun_authorization_managements_path %></li>
<li><%= link_to '实训课程发布', subject_authorization_managements_path %></li> <li><%= link_to '实训课程发布', subject_authorization_managements_path %></li>
<li><%= link_to '文库发布', library_applies_path(status: :pending) %></li> <li><%= link_to '教学案例发布', library_applies_path(status: :pending) %></li>
</ul> </ul>
</li> </li>
<li class="fl edu-admin-nav-li edu-position"><a href="javascript:void(0);" class="edu-admin-nav-a">认证+</a> <li class="fl edu-admin-nav-li edu-position"><a href="javascript:void(0);" class="edu-admin-nav-a">认证+</a>

@ -1,6 +1,6 @@
<div class="educontent mb50"> <div class="educontent mb50">
<p class="mt10 mb20 clearfix lineh-20"> <p class="mt10 mb20 clearfix lineh-20">
<%= link_to '文库', libraries_path, class: 'color-grey-9' %> &gt; <%= link_to '教学案例', libraries_path, class: 'color-grey-9' %> &gt;
<span class="color-grey-3">编辑</span> <span class="color-grey-3">编辑</span>
</p> </p>

@ -1,7 +1,7 @@
<div class="educontent"> <div class="educontent">
<div class="edu-back-white mb30 mt30"> <div class="edu-back-white mb30 mt30">
<p class="padding20-30 clearfix bor-bottom-greyE"> <p class="padding20-30 clearfix bor-bottom-greyE">
<span class="font-18 fl color-grey-3">文库</span> <span class="font-18 fl color-grey-3">教学案例</span>
<%= link_to '新建', new_library_path, class: 'fr color-blue font-16 mt3' %> <%= link_to '新建', new_library_path, class: 'fr color-blue font-16 mt3' %>
</p> </p>
<div class="clearfix pt20 pl30 pr30"> <div class="clearfix pt20 pl30 pr30">
@ -15,7 +15,7 @@
</ul> </ul>
<div class="edu-position fr"> <div class="edu-position fr">
<%= hidden_field_tag(:type, params[:type]) %> <%= hidden_field_tag(:type, params[:type]) %>
<input class="winput-240-30 panel-box-sizing" placeholder="输入文库标题、编号进行检索" type="text" id="search_name"> <input class="winput-240-30 panel-box-sizing" placeholder="输入教学案例标题、编号进行检索" type="text" id="search_name">
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey" id="search"><i class="fa fa-search"></i></a> <a href="javascript:void(0);" class="edu-btn-search font-16 color-grey" id="search"><i class="fa fa-search"></i></a>
</div> </div>
</div> </div>

@ -1,6 +1,6 @@
<div class="educontent mb50"> <div class="educontent mb50">
<p class="mt10 mb20 clearfix lineh-20"> <p class="mt10 mb20 clearfix lineh-20">
<%= link_to '文库', libraries_path, class: 'color-grey-9' %> &gt; <%= link_to '教学案例', libraries_path, class: 'color-grey-9' %> &gt;
<span class="color-grey-3">新建</span> <span class="color-grey-3">新建</span>
</p> </p>

@ -3,7 +3,7 @@
%> %>
<div class="educontent mb50"> <div class="educontent mb50">
<p class="mt10 mb20 clearfix lineh-20"> <p class="mt10 mb20 clearfix lineh-20">
<%= link_to '文库', libraries_path, class: 'color-grey-9' %> &gt; <%= link_to '教学案例', libraries_path, class: 'color-grey-9' %> &gt;
<span class="color-grey-3">详情</span> <span class="color-grey-3">详情</span>
</p> </p>
<p class="lineh-25 mb20 clearfix"> <p class="lineh-25 mb20 clearfix">
@ -100,8 +100,12 @@
}); });
$(function(){ $(function(){
var height=document.getElementById("private_reason_ul").offsetHeight; var height=document.getElementById("private_reason_ul").offsetHeight;
var one=parseInt($("#private_reason_ul").find("li").eq(0).height())+10;
var two=parseInt($("#private_reason_ul").find("li").eq(1).height());
var plus=one+two;
if(parseInt(height)>166){ if(parseInt(height)>166){
$("#actionPanel").html('点击展开<i class="iconfont icon-xiajiantou color-blue font-14 ml5"></i>'); $("#actionPanel").html('点击展开<i class="iconfont icon-xiajiantou color-blue font-14 ml5"></i>');
$(".private_reason").css({maxHeight:plus+"px"});
} }
}) })
</script> </script>

@ -1,6 +1,6 @@
<div class="edu-class-container mb15"> <div class="edu-class-container mb15">
<div class="edu-con-top clearfix"> <div class="edu-con-top clearfix">
<p class="ml15 fl color-grey">文库发布</p> <p class="ml15 fl color-grey">教学案例发布</p>
</div> </div>
<div class="edu-con-bg01 mt15"> <div class="edu-con-bg01 mt15">
<div class="edu-tab clearfix mb20"> <div class="edu-tab clearfix mb20">
@ -16,7 +16,7 @@
<div id="edu-tab-con-1"> <div id="edu-tab-con-1">
<div class="mt10"> <div class="mt10">
<div class="edu-position fr task-form-30 mb10 mr15"> <div class="edu-position fr task-form-30 mb10 mr15">
<input class="task-form-100 panel-box-sizing" placeholder="输入文库标题、编号进行检索" type="text" id="search_name"> <input class="task-form-100 panel-box-sizing" placeholder="输入教学案例标题、编号进行检索" type="text" id="search_name">
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt10" id="search"><i class="fa fa-search"></i></a> <a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt10" id="search"><i class="fa fa-search"></i></a>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
@ -34,7 +34,7 @@
<%= link_to "拒绝", library_applies_path(status: :refused), :class => "edu-filter-cir-grey mr5 fl font-12", :id => "library_reject_authentication", :remote => true %> <%= link_to "拒绝", library_applies_path(status: :refused), :class => "edu-filter-cir-grey mr5 fl font-12", :id => "library_reject_authentication", :remote => true %>
</p> </p>
<div class="edu-position fr task-form-30 mb10 fr mr15"> <div class="edu-position fr task-form-30 mb10 fr mr15">
<input class="task-form-100 panel-box-sizing" placeholder="输入文库标题、编号进行检索" type="text" id="library_search_name"> <input class="task-form-100 panel-box-sizing" placeholder="输入教学案例标题、编号进行检索" type="text" id="library_search_name">
<a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt10" id="library_search"><i class="fa fa-search"></i></a> <a href="javascript:void(0);" class="edu-btn-search font-16 color-grey mt10" id="library_search"><i class="fa fa-search"></i></a>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

@ -1,7 +1,7 @@
'zh': 'zh':
activerecord: activerecord:
models: models:
library: '文库' library: '教学案例'
attributes: attributes:
library: library:
title: '标题' title: '标题'

@ -52,6 +52,11 @@ RedmineApp::Application.routes.draw do ## oauth相关
end end
end end
# library
resources :libraries do
get :publish_success, on: :collection
end
resources :ec_course_evaluations do resources :ec_course_evaluations do
member do member do
match 'import_score', :via => [:post] match 'import_score', :via => [:post]
@ -2660,11 +2665,6 @@ RedmineApp::Application.routes.draw do ## oauth相关
get '/:sub_dir_name', :to => 'org_subfields#show', :as => 'show_subfield_without_id' get '/:sub_dir_name', :to => 'org_subfields#show', :as => 'show_subfield_without_id'
# library
resources :libraries do
get :publish_success, on: :collection
end
Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir| Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir|
file = File.join(plugin_dir, "config/routes.rb") file = File.join(plugin_dir, "config/routes.rb")
if File.exists?(file) if File.exists?(file)

@ -58,7 +58,7 @@ module Trustie
params['text'] = "【计算机实践教学】亲爱的#{user_name}老师您已经成功报名参与了11月24日--25日在深圳大学举办的全国软件工程实践教学案例与应用研讨会请准时参加。如有任何参会问题请致电咨询会务联系人汤老师13099740868" params['text'] = "【计算机实践教学】亲爱的#{user_name}老师您已经成功报名参与了11月24日--25日在深圳大学举办的全国软件工程实践教学案例与应用研讨会请准时参加。如有任何参会问题请致电咨询会务联系人汤老师13099740868"
Rails.logger.info "#{params['text']}" Rails.logger.info "#{params['text']}"
elsif send_type == 'publish_library' elsif send_type == 'publish_library'
params['text'] = "【Edu实训】亲爱的#{name},有新的文库发布申请,请尽快处理" params['text'] = "【Edu实训】亲爱的#{name},有新的教学案例发布申请,请尽快处理"
Rails.logger.info "#{params['text']}" Rails.logger.info "#{params['text']}"
end end

@ -706,12 +706,12 @@ li.challenge_box:last-child{
/*实践教学*/ /*实践教学*/
.second_course_1{min-height: 782px;} .second_course_1{min-height: 776px;}
.second_course_2{min-height: 823px;} .second_course_2{min-height: 823px;}
.second_course_3{min-height: 690px;} .second_course_3{min-height: 690px;}
.second_course_4{min-height: 523px;} .second_course_4{min-height: 514px;}
.second_course_5{min-height: 737px;padding-top: 190px;box-sizing: border-box;position: relative} .second_course_5{min-height: 737px;padding-top: 190px;box-sizing: border-box;position: relative}
.second_course_6{min-height: 1230px;} .second_course_6{min-height: 1225px;}
.course_competition_panel{ .course_competition_panel{
margin:30px 40px 40px;border:1px solid #ABDCF1;background: #F1F8FD;justify-content: center;align-items: center;display: -webkit-flex; margin:30px 40px 40px;border:1px solid #ABDCF1;background: #F1F8FD;justify-content: center;align-items: center;display: -webkit-flex;
height: 282px;text-align: center; height: 282px;text-align: center;
@ -3376,7 +3376,7 @@ line-height: 16px;display: inline-block;color: rgba(65, 140, 205, 1) !important;
right: 20px; right: 20px;
} }
/*文库*/ /*教学案例*/
.library_nav li{ .library_nav li{
float: left;cursor: pointer;margin-right: 30px;position: relative;color: #05101A;height: 40px;line-height: 20px; float: left;cursor: pointer;margin-right: 30px;position: relative;color: #05101A;height: 40px;line-height: 20px;
font-size: 16px; font-size: 16px;

Loading…
Cancel
Save