课程大纲界面

This commit is contained in:
lizanle 2015-10-28 15:54:27 +08:00
parent 55e5826fef
commit c2be8b4eec
10 changed files with 135 additions and 21 deletions

View File

@ -6,7 +6,7 @@ unless RUBY_PLATFORM =~ /w32/
gem 'iconv' gem 'iconv'
end end
gem 'grack', path:'./lib/grack' gem 'grack', path:'lib/grack'
gem 'gitlab', path: 'lib/gitlab-cli' gem 'gitlab', path: 'lib/gitlab-cli'
gem 'rest-client' gem 'rest-client'
gem "mysql2", "= 0.3.18" gem "mysql2", "= 0.3.18"

View File

@ -711,6 +711,11 @@ class CoursesController < ApplicationController
end end
end end
#从课程创建的老师那里选择课程大纲
def course_outline
end
#删除课程 #删除课程
#删除课程只是将课程的is_delete状态改为falseis_delete为false状态的课程只有管理员可以看到 #删除课程只是将课程的is_delete状态改为falseis_delete为false状态的课程只有管理员可以看到
def destroy def destroy

View File

@ -0,0 +1,66 @@
<div class="f16 fontBlue fb fl mt15">请选择课程大纲</div>
<div class="resourcePopupClose"> <a href="javascript:void(0);" class="resourceClose"></a></div>
<div class="fl">
<form class="blogSearchBox">
<input type="text" name="serach" placeholder="请输入大纲名称搜索" class="blogSearchContent" />
<a href="javascript:void(0);" class="searchIconPopup"></a>
</form>
</div>
<span class="f12 c_red fl mb8">未搜索到对应大纲,请重新输入</span>
<div class="blogBlock fl">
<ul class="blogRow">
<li class="fl">
<input name="checkMenu" type="radio" class="courseSendCheckbox"/>
</li>
<li class="blogTitle fl">博客一</li>
</ul>
<div class="homeworkPublishTime">发布时间2015-05-11</div>
<ul class="blogRow">
<li class="fl">
<input name="checkMenu" type="radio" class="courseSendCheckbox"/>
</li>
<li class="blogTitle fl">高等数学-14学期</li>
</ul>
<div class="homeworkPublishTime">发布时间2014-05-11</div>
<ul class="blogRow">
<li class="fl">
<input name="checkMenu" type="radio" class="courseSendCheckbox"/>
</li>
<li class="blogTitle fl">博客二</li>
</ul>
<div class="homeworkPublishTime">发布时间2014-03-04</div>
<ul class="blogRow">
<li class="fl">
<input name="checkMenu" type="radio" class="courseSendCheckbox"/>
</li>
<li class="blogTitle fl">高等数学-13学期</li>
</ul>
<div class="homeworkPublishTime">发布时间2013-05-11</div>
<ul class="blogRow">
<li class="fl">
<input name="checkMenu" type="radio" class="courseSendCheckbox"/>
</li>
<li class="blogTitle fl">博客三-浅谈前段开发中所应用到的最新侧导航样式设计30案例</li>
</ul>
<div class="homeworkPublishTime">发布时间2013-05-10</div>
<ul class="blogRow">
<li class="fl">
<input name="checkMenu" type="radio" class="courseSendCheckbox"/>
</li>
<li class="blogTitle fl">博客四</li>
</ul>
<div class="homeworkPublishTime">发布时间2013-05-08</div>
<ul class="blogRow">
<li class="fl">
<input name="checkMenu" type="radio" class="courseSendCheckbox"/>
</li>
<li class="blogTitle fl">博客五</li>
</ul>
<div class="homeworkPublishTime">发布时间2013-05-01</div>
</div>
<div>
<div class="courseSendSubmit"><a href="javascript:void(0);" class="sendSourceText">确定</a></div>
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText">取消</a></div>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,8 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'course_outlines_list') %>');
showModal('ajax-modal', '300px');
$('#ajax-modal').css('height','360px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal();' style='margin-left: 435px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","40%").css("left","46%");
$('#ajax-modal').parent().addClass("courseOutlinePopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");

View File

@ -63,6 +63,11 @@
<%= l(:field_is_private)%> <%= l(:field_is_private)%>
</span> </span>
<% end %> <% end %>
<%if @course.tea_id == User.current.id && @course.outline == 0%>
<span>
<a href="javascript:void(0)" onclick="course_outline('<%= @course.id%>');">设置大纲</a>
</span>
<% end %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="pr_info_foot "> <div class="pr_info_foot ">

View File

@ -789,6 +789,7 @@ RedmineApp::Application.routes.draw do
delete 'join_in/join_group', :to => 'courses#unjoin_group' delete 'join_in/join_group', :to => 'courses#unjoin_group'
get 'copy_course' get 'copy_course'
match 'course_activity', :to => 'courses#course_activity', :via => :get, :as => "course_activity" match 'course_activity', :to => 'courses#course_activity', :via => :get, :as => "course_activity"
get 'course_outline'
end end
collection do collection do
match 'join_private_courses', :via => [:get, :post] match 'join_private_courses', :via => [:get, :post]

View File

@ -0,0 +1,5 @@
class AddColumnOutlineToCourse < ActiveRecord::Migration
def change
add_column :courses,:outline,:integer,:default => 0
end
end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20151022071804) do ActiveRecord::Schema.define(:version => 20151028060607) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -443,6 +443,7 @@ ActiveRecord::Schema.define(:version => 20151022071804) do
t.integer "is_public", :limit => 1, :default => 1 t.integer "is_public", :limit => 1, :default => 1
t.integer "inherit_members", :limit => 1, :default => 1 t.integer "inherit_members", :limit => 1, :default => 1
t.integer "open_student", :default => 0 t.integer "open_student", :default => 0
t.integer "outline", :default => 0
end end
create_table "custom_fields", :force => true do |t| create_table "custom_fields", :force => true do |t|
@ -527,26 +528,23 @@ ActiveRecord::Schema.define(:version => 20151022071804) do
add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
add_index "documents", ["project_id"], :name => "documents_project_id" add_index "documents", ["project_id"], :name => "documents_project_id"
create_table "dts", :primary_key => "Num", :force => true do |t| create_table "dts", :force => true do |t|
t.string "Defect", :limit => 50 t.string "IPLineCode"
t.string "Category", :limit => 50
t.string "File"
t.string "Method"
t.string "Module", :limit => 20
t.string "Variable", :limit => 50
t.integer "StartLine"
t.integer "IPLine"
t.string "IPLineCode", :limit => 200
t.string "Judge", :limit => 15
t.integer "Review", :limit => 1
t.string "Description" t.string "Description"
t.text "PreConditions", :limit => 2147483647 t.string "Num"
t.text "TraceInfo", :limit => 2147483647 t.string "Variable"
t.text "Code", :limit => 2147483647 t.string "TraceInfo"
t.string "Method"
t.string "File"
t.string "IPLine"
t.string "Review"
t.string "Category"
t.string "Defect"
t.string "PreConditions"
t.string "StartLine"
t.integer "project_id" t.integer "project_id"
t.datetime "created_at" t.datetime "created_at", :null => false
t.datetime "updated_at" t.datetime "updated_at", :null => false
t.integer "id", :null => false
end end
create_table "enabled_modules", :force => true do |t| create_table "enabled_modules", :force => true do |t|
@ -815,6 +813,16 @@ ActiveRecord::Schema.define(:version => 20151022071804) do
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
create_table "journal_details_copy", :force => true do |t|
t.integer "journal_id", :default => 0, :null => false
t.string "property", :limit => 30, :default => "", :null => false
t.string "prop_key", :limit => 30, :default => "", :null => false
t.text "old_value"
t.text "value"
end
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
create_table "journal_replies", :id => false, :force => true do |t| create_table "journal_replies", :id => false, :force => true do |t|
t.integer "journal_id" t.integer "journal_id"
t.integer "user_id" t.integer "user_id"

View File

@ -1223,3 +1223,10 @@ var autoTextarea2 = function (elem,elem2, extra, maxHeight) {
addEvent(elem2, 'focus', change); addEvent(elem2, 'focus', change);
change(); change();
}; };
//课程大纲选择请求
function course_outline(id){
$.get(
' /courses/'+id+'/course_outline'
)
}

View File

@ -1089,3 +1089,12 @@ a.postRouteLink:hover {text-decoration:underline;}
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;} .ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
.ReplyToMessageInputContainer {width:582px; float:left;} .ReplyToMessageInputContainer {width:582px; float:left;}
/*课程大纲弹框*/
.courseOutlinePopup {width:400px; height:auto; border:3px solid #269ac9; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
.courseOutlineSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(images/resource_icon_list.png) -40px -18px no-repeat; display:inline-block; float:left;}
.blogTitle {max-width:240px; font-size:12px; color:#484848; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.blogBlock {overflow-x:hidden; max-height:200px; overflow-y:auto; margin-bottom:5px;}
.blogRow {width:280px; height:15px; line-height:15px;}
.blogSearchBox {border:1px solid #e6e6e6; width:280px; height:25px; background-color:#ffffff; margin-top:8px; margin-bottom:8px;}
.blogSearchContent {border:none; outline:none; background-color:#ffffff; width:236px; height:25px; padding-left:10px; display:inline-block; float:left;}