diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 1e4d569b4..83a6d1ab1 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -453,7 +453,7 @@ class AccountController < ApplicationController end def apply_trail - apply_action = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization").first + apply_action = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization", :status => 0).first if apply_action.blank? ApplyAction.create(:user_id => User.current.id, :status => 0, :container_type => "TrialAuthorization") end diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index ae0ca961a..d434651cf 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -292,6 +292,12 @@ class ManagementsController < ApplicationController apply_action.update_attributes(:status => (params[:type] == "1" ? 2 : 1), :reason => params[:reject_reason], :dealer_id => User.current.id) user_id = User.find_by_sql("select id from users where concat(lastname,firstname) like '%#{search}%'") @authorizations = ApplyAction.where(:container_type => "TrialAuthorization", :status => 0, :user_id => user_id).includes(:user) + @autu_count = @authorizations.count + @limit = 15 + @is_remote = true + @autu_pages = Paginator.new @autu_count, @limit, params['page'] || 1 + @offset ||= @autu_pages.offset + @authorizations = paginateHelper @authorizations, @limit respond_to do |format| format.js end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 8762639c9..10064d77b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1235,7 +1235,7 @@ class UsersController < ApplicationController #导入作业,确定按钮 def user_select_homework params[:checkMenu].each do |homework_bank| - homework = HomeworkBank.find_by_id params[:checkMenu] + homework = HomeworkBank.find_by_id homework_bank @select_course = Course.find params[:select_course] if homework && @select_course quote_homework_bank homework, @select_course diff --git a/app/views/account/apply_trail.js.erb b/app/views/account/apply_trail.js.erb index 0b921b7c3..c7b789ae5 100644 --- a/app/views/account/apply_trail.js.erb +++ b/app/views/account/apply_trail.js.erb @@ -1 +1 @@ -$("body").append('<%= j( render :partial => 'welcome/one_btn_mask_pop', :locals => {:btn => "确定", :tip1 => "申请成功,我们将在一个工作日内完成审核", :url => "javascript:void(0);"}) %>'); \ No newline at end of file +$("body").append('<%= j( render :partial => 'welcome/one_btn_mask_pop', :locals => {:btn => "确定", :tip1 => "申请成功,我们将在一个工作日内完成审核", :url => "#{my_account_path()}"}) %>'); \ No newline at end of file diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index cf10f9a0f..d0cdebce2 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -4,8 +4,8 @@

作业列表

<% if @is_teacher %> 新建 + <%= link_to("题库选用", user_import_homeworks_user_path(User.current.id, :select_course => @course.id), :class => "edu-btn fr mr10",:remote => true,:title=>"导入自己发布过的作业,或者共享题库中的作业") %> <% end %> - <%= link_to("题库选用", user_import_homeworks_user_path(User.current.id, :select_course => @course.id), :class => "edu-btn fr mr10",:remote => true,:title=>"导入自己发布过的作业,或者共享题库中的作业") %>
diff --git a/app/views/shixuns/_form.html.erb b/app/views/shixuns/_form.html.erb index 253cdab3a..196533db1 100644 --- a/app/views/shixuns/_form.html.erb +++ b/app/views/shixuns/_form.html.erb @@ -42,7 +42,7 @@
  • - +
    @@ -171,6 +171,10 @@ }; $(function(){ + // 防止刷新页面后适用课程的下拉列表为空 + $("#shixun_major").val("0"); + $(".lesson_content").val(""); + //多选适用课程 $("body").click(function(event){ $(".lesson_checkbox").hide(); diff --git a/app/views/shixuns/_settings_edit.html.erb b/app/views/shixuns/_settings_edit.html.erb index 8556aa1a9..42930ea95 100644 --- a/app/views/shixuns/_settings_edit.html.erb +++ b/app/views/shixuns/_settings_edit.html.erb @@ -27,7 +27,7 @@
  • - +
    diff --git a/app/views/subjects/_subject_list.html.erb b/app/views/subjects/_subject_list.html.erb index 8dc17a067..a91e06496 100644 --- a/app/views/subjects/_subject_list.html.erb +++ b/app/views/subjects/_subject_list.html.erb @@ -14,7 +14,7 @@
    <% else %> <% @subjects.each do |subject| %> -
    +
    <% if subject.status < 2 && !User.current.manager_of_subject?(subject) %>
    @@ -61,4 +61,19 @@
    <% end %> <% end %> -
    \ No newline at end of file +
    + + \ No newline at end of file diff --git a/app/views/syllabuses/_syllabus_des.html.erb b/app/views/syllabuses/_syllabus_des.html.erb index 2c8ca6ca1..43262147d 100644 --- a/app/views/syllabuses/_syllabus_des.html.erb +++ b/app/views/syllabuses/_syllabus_des.html.erb @@ -1,4 +1,4 @@ -
    +
    <% if @syllabus.des_status == 1 %> <% if @is_syllabus_admin %> @@ -13,7 +13,7 @@ 还没有<% if @is_syllabus_admin %>添加<% else %>添加<% end %>授课大纲 ~

    <% end %>
    -
    +
    <%= labelled_form_for @syllabus, :url =>update_des_syllabus_path(@syllabus), diff --git a/app/views/syllabuses/_syllabus_homeworks.html.erb b/app/views/syllabuses/_syllabus_homeworks.html.erb index 50284e71b..3346905fc 100644 --- a/app/views/syllabuses/_syllabus_homeworks.html.erb +++ b/app/views/syllabuses/_syllabus_homeworks.html.erb @@ -1,4 +1,4 @@ -
    +
    <% if @homework_count == 0 %>

    还没有添加课程题库 ~

    diff --git a/app/views/syllabuses/_syllabus_members.html.erb b/app/views/syllabuses/_syllabus_members.html.erb index 8fd1c7486..d6925773b 100644 --- a/app/views/syllabuses/_syllabus_members.html.erb +++ b/app/views/syllabuses/_syllabus_members.html.erb @@ -1,5 +1,5 @@ -<% @members.each do |member| %> -
    +<% @members.each_with_index do |member, index| %> +
    <% user = member.user %> <%= link_to image_tag(url_to_avatar(user), :width => "100", :height => "100", :alt => "头像"), user_path(user), :target => '_blank', :class => "fl edu-class-user-img ml15 mr15" %>
      @@ -25,4 +25,10 @@
    + <% if index == 10 %> + + + 查看全部 + + <% end %> <% end %> \ No newline at end of file diff --git a/app/views/syllabuses/_syllabus_resources.html.erb b/app/views/syllabuses/_syllabus_resources.html.erb index 209ef3355..ce09e84c1 100644 --- a/app/views/syllabuses/_syllabus_resources.html.erb +++ b/app/views/syllabuses/_syllabus_resources.html.erb @@ -1,4 +1,4 @@ -
    +
    <% if @resource_count == 0 %>

    还没有添加课程资源库 ~

    diff --git a/app/views/syllabuses/show.html.erb b/app/views/syllabuses/show.html.erb index 9cf32f8f1..432daf8f7 100644 --- a/app/views/syllabuses/show.html.erb +++ b/app/views/syllabuses/show.html.erb @@ -106,7 +106,7 @@
    -
    +
    <%= render :partial => "syllabus_members" %>
    @@ -193,5 +193,10 @@ }); autoUrl('syllabus_description_<%= @syllabus.id %>'); }); + + function show_all_members(ele){ + $(".sy_member_div").show(); + $(ele).hide(); + } diff --git a/public/stylesheets/css/edu-class.css b/public/stylesheets/css/edu-class.css index 5a482ff7b..e10028a9d 100644 --- a/public/stylesheets/css/edu-class.css +++ b/public/stylesheets/css/edu-class.css @@ -85,6 +85,7 @@ table.table-pa5 th,table.table-pa5 td{ padding:0 5px;} .undis {display:none;} .dis {display:block;} .edu-tab-con-box{ padding:15px; max-height:1200px; overflow: auto; color:#666; line-height: 2.0; background:#fff;} +.edu-sy-con-box{ padding:15px; color:#666; line-height: 2.0; background:#fff;} .edu-class-right-box{ background:#fff; position:relative; padding-bottom:20px;} a.edu-class-user-img{ height: 80px;} .edu-class-user-img img{ width: 80px; height: 80px; border-radius:100px;}