Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
f1e7e54816
|
@ -418,7 +418,7 @@ class CoursesService
|
||||||
course.send(:safe_attributes=, params[:course], current_user)
|
course.send(:safe_attributes=, params[:course], current_user)
|
||||||
#course.safe_attributes = params[:course]
|
#course.safe_attributes = params[:course]
|
||||||
#course.password = params[:course][:password]
|
#course.password = params[:course][:password]
|
||||||
course.syllabus_id = params[:syllabus_id].to_i
|
#course.syllabus_id = params[:syllabus_id].to_i
|
||||||
course.time = params[:time]
|
course.time = params[:time]
|
||||||
course.term = params[:term]
|
course.term = params[:term]
|
||||||
course.end_time = params[:end_time]
|
course.end_time = params[:end_time]
|
||||||
|
|
|
@ -166,13 +166,13 @@
|
||||||
|
|
||||||
<% else%>
|
<% else%>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'user_courselist',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||||
TA的课程
|
TA的课程
|
||||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.visible.count%>)</span>
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.visible.count%>)</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_projects',:id=>@user.id)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'user_projectlist',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||||
TA的项目
|
TA的项目
|
||||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.visible.count%>)</span>
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.visible.count%>)</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
<% if @polls.empty? %>
|
<% if @polls.empty? %>
|
||||||
alert('您目前其他课程无问卷可导入');
|
alert('您的其它班级下没有问卷可供导入');
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'other_poll',:locals => {:polls => @polls,:polls_group_id=>@polls_group_id}) %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'other_poll',:locals => {:polls => @polls,:polls_group_id=>@polls_group_id}) %>');
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,9 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<a href="javascript:void(0)" class="fr sy_btn_grey mr5" title="该老师已在本课程下创建了班级,不能删除">删除</a>
|
<a href="javascript:void(0)" class="fr sy_btn_grey mr5" title="该老师已在本课程下创建了班级,不能删除">删除</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if i != 0 && i < count - 1 %>
|
<% if i == 0 && count == 1 %>
|
||||||
|
|
||||||
|
<% elsif i != 0 && i < count - 1 %>
|
||||||
<%= link_to('下移', {:controller => 'syllabus_member', :action => 'update_rank', :id => member.id, :syllabus => @syllabus.id, :opr => 'down'},:remote => true, :method => 'post', :class => "fr sy_btn_blue mr5", :title => '下移') %>
|
<%= link_to('下移', {:controller => 'syllabus_member', :action => 'update_rank', :id => member.id, :syllabus => @syllabus.id, :opr => 'down'},:remote => true, :method => 'post', :class => "fr sy_btn_blue mr5", :title => '下移') %>
|
||||||
<%= link_to('上移', {:controller => 'syllabus_member', :action => 'update_rank', :id => member.id, :syllabus => @syllabus.id, :opr => 'up'},:remote => true, :method => 'post', :class => "fr sy_btn_blue mr5", :title => '上移') %>
|
<%= link_to('上移', {:controller => 'syllabus_member', :action => 'update_rank', :id => member.id, :syllabus => @syllabus.id, :opr => 'up'},:remote => true, :method => 'post', :class => "fr sy_btn_blue mr5", :title => '上移') %>
|
||||||
<% elsif i < count - 1 %>
|
<% elsif i < count - 1 %>
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
<div id="sy_tab_con_3">
|
<div id="sy_tab_con_3">
|
||||||
<div class="sy_new_tablebox clear">
|
<div class="sy_new_tablebox clear">
|
||||||
<%= render :partial => 'syllabus_member_list' %>
|
<%= render :partial => 'syllabus_member_list' %>
|
||||||
<% if User.current == @syllabus.user %>
|
<% if User.current == @syllabus.user || User.current.admin? %>
|
||||||
<a href="javascript:void(0);" class="fl sy_btn_green" onclick="toggle_search();">添加成员</a>
|
<a href="javascript:void(0);" class="fl sy_btn_green" onclick="toggle_search();">添加成员</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% if User.current == @syllabus.user %>
|
<% if User.current == @syllabus.user || User.current.admin? %>
|
||||||
<div class="sy_new_tchbox clear <%= @show == 1 ? '' : 'undis' %>" id="sy_search_box">
|
<div class="sy_new_tchbox clear <%= @show == 1 ? '' : 'undis' %>" id="sy_search_box">
|
||||||
<%= form_tag url_for(:controller => 'syllabus_member', :action => 'create', :syllabus => @syllabus),:id => 'syllabus_member_add_form', :remote => true do |f|%>
|
<%= form_tag url_for(:controller => 'syllabus_member', :action => 'create', :syllabus => @syllabus),:id => 'syllabus_member_add_form', :remote => true do |f|%>
|
||||||
<input hidden="hidden" value="true" name="flag">
|
<input hidden="hidden" value="true" name="flag">
|
||||||
|
|
|
@ -5,6 +5,14 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
sd_create_editor_from_data(<%= @syllabus.id %>, null, "100%", "<%= @syllabus.class.to_s %>");
|
sd_create_editor_from_data(<%= @syllabus.id %>, null, "100%", "<%= @syllabus.class.to_s %>");
|
||||||
showNormalImage('syllabus_description_<%= @syllabus.id %>');
|
showNormalImage('syllabus_description_<%= @syllabus.id %>');
|
||||||
|
$("#syllabus_description_<%= @syllabus.id%> p,#syllabus_description_<%= @syllabus.id%> span,#syllabus_description_<%= @syllabus.id%> em").each(function(){
|
||||||
|
var postContent = $(this).html();
|
||||||
|
postContent = postContent.replace(/ /g," ");
|
||||||
|
postContent= postContent.replace(/ {2}/g," ");
|
||||||
|
postContent=postContent.replace(/ /g," ");
|
||||||
|
postContent=postContent.replace(/ /g," ");
|
||||||
|
$(this).html(postContent);
|
||||||
|
});
|
||||||
autoUrl('syllabus_description_<%= @syllabus.id %>');
|
autoUrl('syllabus_description_<%= @syllabus.id %>');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue