parent
3c21e8fcba
commit
383483de26
@ -1,2 +1,5 @@
|
||||
module SyllabusesHelper
|
||||
def get_syllabuses_by_tag(tag_name)
|
||||
Syllabus.tagged_with(tag_name).order('updated_at desc')
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,7 @@
|
||||
class Syllabus < ActiveRecord::Base
|
||||
acts_as_taggable
|
||||
|
||||
belongs_to :user
|
||||
has_many :courses
|
||||
attr_accessible :description, :title
|
||||
attr_accessible :description, :title, :eng_name, :type, :credit, :hours, :theory_hours, :practice_hours, :applicable_major, :pre_course
|
||||
end
|
||||
|
@ -0,0 +1,5 @@
|
||||
<div id="tags">
|
||||
<div id="tags_show">
|
||||
<%= render :partial => "tags/tag_syllabus_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,28 @@
|
||||
<% @tags = obj.reload.tag_list %>
|
||||
<% if non_list_all && @tags.size > 0 %>
|
||||
|
||||
<% else %>
|
||||
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
||||
<% if @tags.size > 0 %>
|
||||
<% @tags.each do |tag| %>
|
||||
<span class="re_tag f_l " id="tag">
|
||||
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %>
|
||||
<span class="del">
|
||||
<%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if obj.user == User.current %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.logged?%>
|
||||
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();"><%= l(:label_add_tag)%></a>
|
||||
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||
<%= form_for "tag_for_save",:remote=>true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||
<%= f.text_field :name ,:id => "tags_name4",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<input type="button" class="submit f_l" onclick="$('#tags_name4').parent().submit();" />
|
||||
<% end %>
|
||||
</span>
|
||||
<% end%>
|
@ -0,0 +1,12 @@
|
||||
class AddColumnToSyllabus < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :syllabuses, :eng_name, :string
|
||||
add_column :syllabuses, :type, :integer
|
||||
add_column :syllabuses, :credit, :integer
|
||||
add_column :syllabuses, :hours, :integer
|
||||
add_column :syllabuses, :theory_hours, :integer
|
||||
add_column :syllabuses, :practice_hours, :integer
|
||||
add_column :syllabuses, :applicable_major, :string
|
||||
add_column :syllabuses, :pre_course, :string
|
||||
end
|
||||
end
|
After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,9 @@
|
||||
//显示更多的班级
|
||||
function show_more_course(url){
|
||||
$.get(
|
||||
url,
|
||||
{ page: $("#course_page_num").val() },
|
||||
function (data) {
|
||||
}
|
||||
);
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
/****标签(和资源库的tag样式一致)***/
|
||||
.project_Label{ width:218px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px; border:1px solid #dddddd;}
|
||||
.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
|
||||
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
||||
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
|
||||
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
|
||||
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; }
|
||||
.re_tag a{ color:#0d90c3;}
|
||||
.tag_h{ }
|
||||
.tag_h span,.tag_h a{ margin-bottom:5px;}
|
||||
/*信息*/
|
||||
.project_info{ background:#fff; padding:10px 8px; width:222px; margin-bottom:10px; border:1px solid #dddddd;}
|
||||
.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;}
|
||||
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
|
||||
.pr_info_logo:hover{ border:1px solid #297fb8; }
|
||||
|
||||
/*课程大纲*/
|
||||
input.syllabus_input{
|
||||
border:none;
|
||||
width:150px;
|
||||
height:25px;
|
||||
line-height:25px;
|
||||
color:#333;
|
||||
}
|
||||
input.syllabus_input_min{
|
||||
border:none;
|
||||
width:30px;
|
||||
height:25px;
|
||||
line-height:25px;
|
||||
color:#333;
|
||||
}
|
||||
.syllabus_select{
|
||||
border:1px solid #ccc;
|
||||
margin-left:5px;
|
||||
}
|
||||
.syllabus_leftinfo {
|
||||
margin:10px 10px 0 10px;
|
||||
width:220px;
|
||||
}
|
||||
.syllabus_leftinfo li{
|
||||
line-height:25px;
|
||||
}
|
||||
.syllabus_leftinfo label{
|
||||
display:block;
|
||||
width:60px;
|
||||
text-align:right;
|
||||
float:left;
|
||||
line-height:25px;
|
||||
}
|
||||
.syllabusbox{
|
||||
position:relative;
|
||||
width: 718px;
|
||||
color: #4b4b4b;
|
||||
padding:30px 15px;
|
||||
margin-bottom: 10px;
|
||||
background: #fff;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
.syllabuscon_title{
|
||||
color:#000; text-align:center;
|
||||
}
|
||||
.syllabuscon_txt p{
|
||||
font-size:14px;
|
||||
line-height:1.9;
|
||||
color:#000;
|
||||
}
|
||||
.syllabuscon_txt_title{
|
||||
font-weight:bold;
|
||||
margin:10px 0;
|
||||
}
|
||||
.syllabusbox_tishi{
|
||||
font-size:14px;
|
||||
width:733px;
|
||||
color:#cb7c01;
|
||||
padding:10px 0 0 15px;
|
||||
margin-bottom:10px;
|
||||
background:#fff7d1;
|
||||
border:1px solid #fcd9b4;
|
||||
height:34px;
|
||||
}
|
||||
a.syllabusbox_a_blue{
|
||||
color:#3b94d6;
|
||||
}
|
||||
.syllabus_leftinfo p{
|
||||
line-height:25px;
|
||||
width:150px;
|
||||
overflow:hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
.syllabus_info_tishi{
|
||||
font-size:16px;
|
||||
width:400px;
|
||||
margin:100px auto;
|
||||
}
|
||||
.syllabus_info_tishi a{
|
||||
color:#3b94d6;
|
||||
}
|
||||
|
||||
/*课程大纲-课程列表*/
|
||||
.icon_course{ background: url(../images/syllabus/icons_syllabus.png) 0 -35px no-repeat; width:18px; height:15px; display:block;}
|
||||
.icons_sy_open{background: url(../images/syllabus/icons_syllabus.png) 0 -53px no-repeat; width:20px; height:23px; display:block; cursor:pointer; }
|
||||
.icons_sy_close{background: url(../images/syllabus/icons_syllabus.png) -26px -53px no-repeat; width:20px; height:23px; display:block; }
|
||||
.icons_sy_setting{background: url(../images/syllabus/icons_syllabus.png) -51px -33px no-repeat; width:20px; height:20px; display:block; }
|
||||
.icons_sy_setting:hover{background: url(../images/syllabus/icons_syllabus.png) -25px -33px no-repeat; }
|
||||
.icons_sy_cir{background: url(../images/syllabus/icons_syllabus.png) 0px -82px no-repeat; width:15px; height:15px; display:block; position:absolute; left:-8px; top:25px;}
|
||||
.icons_sy_arrow{background: url(../images/syllabus/icons_syllabus.png) -31px -81px no-repeat; width:20px; height:20px; display:block; }
|
||||
.syllabus_h2_top{ font-size:18px; color:#333; font-weight:normal; padding:10px 15px;border-bottom:1px solid #e7e7e7; }
|
||||
.syllabus_category{ padding:10px 15px; background-color:#f6f6f6; border-bottom:1px solid #e7e7e7;}
|
||||
.syllabus_box{ width:750px; border:1px solid #e7e7e7; background-color:#fff;}
|
||||
.syllabus_courses_list{ padding:15px; border-bottom:1px solid #e7e7e7; cursor:pointer;}
|
||||
.syllabus_courses_list:hover{ background:#f6fafd;}
|
||||
.syllabus_courses_title{ font-size:16px; color:#333; width:650px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||
.sy_p_grey{ margin-left:25px; color:#888; margin-top:5px; font-size:12px;}
|
||||
.syllabus_class_box{ padding-left:30px; background:#f6f6f6;}
|
||||
.syllabus_class_list{ padding:12px 0 12px 15px; height:44px;border-left:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7; position:relative;}
|
||||
.syllabus_class_list:hover{ background:#ececec;}
|
||||
.syllabus_class_list_more{padding:8px; text-align:center;border-left:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;}
|
||||
.syllabus_class_list_more:hover{ background:#ececec;}
|
||||
.syllabus_class_list_more a{ color:#ff7e00;}
|
||||
.syllabus_class_title{ font-size:14px; color:#333; width:500px; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||
.syllabus_class_w{ width:650px;}
|
||||
.dis {display:block;}
|
||||
.undis {display:none;}
|
||||
|
||||
/*班级列表界面(用的博客列表的样式)*/
|
||||
.listbox{ width:730px; background-color:#fff; border:1px solid #ddd; padding:10px; }
|
||||
.bloglistbox{ min-height:690px;}
|
||||
.list-h2{ font-size:16px; font-weight:bold; color:#000; padding-bottom:5px;}
|
||||
.category{ }
|
||||
.list_title{padding:10px 0; border-bottom:1px solid #ddd;}
|
||||
.category a,.category span{ float:left; margin-right:5px;}
|
||||
.grayTxt{ color:#9093a6;}
|
||||
.sortTxt{ color:#000;}
|
||||
.sortTxt:hover{ color:#28be6c;}
|
||||
a.sortupbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 3px no-repeat; width:12px; height:17px; display:block; margin-right:10px; cursor:pointer;}
|
||||
a.sortdownbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
|
||||
a.sort_no{ background: url(../images/syllabus/icons_syllabus.png) -16px -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
|
||||
.item_list{ display:block; width:5px; height:5px;-webkit-border-radius: 25px;border-radius:25px; background-color:#adadad; margin:10px 10px 0 0;}
|
||||
a.list-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:708px;}
|
||||
a:hover.list-title{ color:#269ac9;}
|
||||
.c_red{ font-weight:normal; font-size:12px;}
|
||||
.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
|
||||
.list-file li{ line-height:1.9;}
|
||||
.list-info span{ margin-left:5px;}
|
||||
.pages a{ display:block; border:1px solid #d1d1d1; color:#888; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; }
|
||||
.pages a:hover{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
|
||||
a.pages-big{ width:50px;}
|
||||
.pages .active{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
|
||||
.pages{width:330px; margin:20px auto 10px;}
|
||||
a.course-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:590px;}
|
||||
a:hover.course-title{ color:#269ac9;}
|
||||
|
||||
/*新建页面*/
|
||||
.name_input{ border:1px solid #64bdd9; height:16px; width:310px; background:#fff; margin-bottom:10px; padding:5px;}
|
Loading…
Reference in new issue