班级的模块设置
This commit is contained in:
parent
7e9b21a472
commit
5ce5aa2825
|
|
@ -845,7 +845,7 @@ class CoursesController < ApplicationController
|
|||
@orgs_not_in_course = User.current.organizations.where("organizations.id not in #{course_org_ids}")
|
||||
end
|
||||
|
||||
=begin
|
||||
|
||||
course_module = CourseModule.where(:course_id => @course.id).first
|
||||
@module = {
|
||||
course_module.boards => 'boards',
|
||||
|
|
@ -860,7 +860,7 @@ class CoursesController < ApplicationController
|
|||
@course_board = @course.boards.where("parent_id is NULL").first
|
||||
@board = @course_board.children.order("position asc")
|
||||
@board_count = @board.count
|
||||
=end
|
||||
|
||||
@curr_page = '设置'
|
||||
respond_to do |format|
|
||||
format.html { render :layout => 'base_edu_course' }
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
<i class="fa fa-caret-down color-blue font-12" style="display:none;" aria-hidden="true"></i>
|
||||
</p>
|
||||
|
||||
<!-- <p class="fl font-16" data-option="module">
|
||||
<p class="fl font-16" data-option="module">
|
||||
模块设置
|
||||
<i class="fa fa-caret-down color-blue font-12" style="display:none;z-index:100;" aria-hidden="true"></i>
|
||||
</p>-->
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
|
@ -111,9 +111,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<!--------------------模块设置-------------------->
|
||||
<!-- <div class="module" id="setting_moduels_list" style="display:none;">
|
||||
<%#= render :partial => 'courses/settings/moduels' %>
|
||||
</div>-->
|
||||
<div class="module" id="setting_moduels_list" style="display:none;">
|
||||
<%= render :partial => 'courses/settings/moduels' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
<% @board.each_with_index do | board, i | %>
|
||||
<p>
|
||||
<span class="span1" id="board_sub_show_<%= board.id %>" title="<%= board.name %>"><%=board.name %></span>
|
||||
<p class="clearfix mb10">
|
||||
<span class="edu-txt-w200 ml25 fl" style="width:255px;" id="board_sub_show_<%= board.id %>" title="<%= board.name %>"><%=board.name %></span>
|
||||
<span id="board_sub_edit_<%= board.id %>" class="span1 undis">
|
||||
<input type="text" name="name" id="board_sub_name_<%= board.id %>" maxlength="30"
|
||||
onblur="update_sub_board_name('#board_sub_show_<%= board.id %>','#board_sub_edit_<%= board.id %>','<%= board.id %>','<%= @course.id %>',$(this).val());" value="<%= board.name %>"/>
|
||||
</span>
|
||||
<span>
|
||||
<span class="fl ml30">
|
||||
<% unless i == 0 %>
|
||||
<%= link_to('上移', {:controller => 'boards', :action => 'update_boards_position', :id => board.id, :course_id => @course.id, :opr => 'up'},:remote => true, :method => 'post', :class => "sy_btn_blue mr5", :title => '上移') %>
|
||||
<%= link_to('上移', {:controller => 'boards', :action => 'update_boards_position', :id => board.id, :course_id => @course.id, :opr => 'up'},:remote => true, :method => 'post', :class => "", :title => '上移') %>
|
||||
<% end %>
|
||||
</span>
|
||||
<span>
|
||||
<span class="fl ml30">
|
||||
<% if i < @board_count - 1 %>
|
||||
<%= link_to('下移', {:controller => 'boards', :action => 'update_boards_position', :id => board.id, :course_id => @course.id, :opr => 'down'}, :remote => true, :method => 'post', :class => "sy_btn_blue mr5", :title => '下移') %>
|
||||
<%= link_to('下移', {:controller => 'boards', :action => 'update_boards_position', :id => board.id, :course_id => @course.id, :opr => 'down'}, :remote => true, :method => 'post', :class => "", :title => '下移') %>
|
||||
<% end %>
|
||||
</span>
|
||||
<span>
|
||||
<a href="javascript:void(0);" onclick="edit('#board_sub_show_<%= board.id %>','#board_sub_edit_<%= board.id %>');">编辑</a>
|
||||
</span>
|
||||
<span>
|
||||
<a href="javascript:void(0);" class="sy_btn_blue mr5" onclick="delete_confirm_box_2('<%= course_board_path(board, :course_id => @course.id) %>', '您是否确定删除')">删除</a>
|
||||
</span>
|
||||
<span>
|
||||
<a href="javascript:void(0);" class="fl ml30" onclick="edit('#board_sub_show_<%= board.id %>','#board_sub_edit_<%= board.id %>');">编辑</a>
|
||||
</span>
|
||||
<span>
|
||||
<a href="javascript:void(0);" class=" fl ml30" onclick="delete_confirm_box_2('<%= course_board_path(board, :course_id => @course.id) %>', '您是否确定删除')">删除</a>
|
||||
</span>
|
||||
</p>
|
||||
<% end %>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,23 @@
|
|||
<ul>
|
||||
<form action="<%= update_position_course_path() %>" method="post" id="update_position" data-remote="true" >
|
||||
<% @module.each_with_index do |m, index| %>
|
||||
<li>
|
||||
<p>
|
||||
<input class="fl mr25 magic-checkbox" type="checkbox" value="" name="message[]" id="message_<%= index %>" >
|
||||
<label for="message_<%= index %>" class="fl"></label>
|
||||
<b><%= switch_to_chinese m[1] %></b>
|
||||
<li class="clearfix mb10">
|
||||
<p class="clearfix mb10 ">
|
||||
<span class="fl edu-txt-w280 font-bd">
|
||||
<input class=" magic-checkbox" type="checkbox" value="" name="message[]" id="message_<%= index %>" >
|
||||
<label for="message_<%= index %>" ><%= switch_to_chinese m[1] %></label>
|
||||
</span>
|
||||
<span class="fl mt3">
|
||||
<% if m[0] > 1 %>
|
||||
<span onclick="up_position(this);">上移</span>
|
||||
<a href="javascript:void(0);" onclick="up_position(this);" class="ml30">上移</a>
|
||||
<% end %>
|
||||
<% if m[0] < @module.count %>
|
||||
<span onclick="down_position(this);">下移</span>
|
||||
<a href="javascript:void(0);" onclick="down_position(this);" class="ml30">下移</a>
|
||||
<% end %>
|
||||
<% if m[1] == "boards" %>
|
||||
<span onclick="add_subtopic('<%= @course.id %>', '<%= @course_board.id %>');">添加子栏目</span>
|
||||
<a href="javascript:void(0);" class="color-green ml30" onclick="add_subtopic('<%= @course.id %>', '<%= @course_board.id %>');">添加子栏目</a>
|
||||
<% end %>
|
||||
</span>
|
||||
</p>
|
||||
<% if m[1] == "boards" %>
|
||||
<div id="setting_boards_list">
|
||||
|
|
@ -26,7 +29,9 @@
|
|||
<% end %>
|
||||
</form>
|
||||
</ul>
|
||||
<button class="btn" onclick="$('#update_position').submit();" >保存</button>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fl" onclick="$('#update_position').submit();" >保存</a>
|
||||
<a href="javascript:void(0);" class="task-btn fl ml10" >取消</a>
|
||||
<div class="cl"></div>
|
||||
<script>
|
||||
/* ---------------------- 上移 ------------------------- */
|
||||
function up_position(ev){
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<i class="fa fa-folder" aria-hidden="true"></i>
|
||||
<span title="点击可下载" ><%= link_to_short_attachment attachment,:length=> 58, :download => true -%></span>
|
||||
<span >(<%= number_to_human_size attachment.filesize %>)</span>
|
||||
<span ><%= link_to attachment.author.try(:show_name), user_path(attachment.author) % ></span>
|
||||
<span ><%= link_to attachment.author.try(:show_name), user_path(attachment.author) %></span>
|
||||
<span ><%= format_time(attachment.created_on) %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -212,11 +212,10 @@ em{font-style:normal;}
|
|||
.stud-class-set .news .container .member .people .right .person .student ul .span1{width:60px;padding:0;text-align:left;}
|
||||
.stud-class-set .news .container .member .people .right .person .student .newstudent span i{padding:18px 10px 0 0;}
|
||||
.stud-class-set .news .container .module{background:#fff;padding:35px 0 70px 50px;position:relative;}
|
||||
.stud-class-set .news .container .module ul li p{line-height:40px;}
|
||||
.stud-class-set .news .container .module ul li p{}
|
||||
.stud-class-set .news .container .module ul li p b{margin-right:300px;}
|
||||
.stud-class-set .news .container .module ul li p span{margin-right:40px;color:#888;cursor:pointer;}
|
||||
.stud-class-set .news .container .module ul li p span{;color:#666;cursor:pointer;}
|
||||
.stud-class-set .news .container .module ul li p .span1{margin:0 230px 0 80px;}
|
||||
.stud-class-set .news .container .module ul li p:hover span{color:#3498db;}
|
||||
.stud-class-set .news .container .module .btn{position:absolute;border:none;outline:none;background:#3498db;width:80px;height:30px;line-height:30px;text-align:center;border-radius:5px;right:30px;bottom:30px;color:#fff;}
|
||||
/*--------------------------弹框样式-------------------------------------*/
|
||||
.tip i{padding:6px;font-style:normal;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue