From 900ff5d267b3f60ee7ec2e6bd1e2e1115ec2e0a9 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Jul 2017 14:13:48 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=82=AC=E6=B5=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/subjects/_subject_list.html.erb | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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 From 5d29060d448f90f638e551aa203041054c8922dc Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Jul 2017 14:22:10 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=80=82=E7=94=A8=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=A1=86=E4=B8=AD=E6=98=BE=E7=A4=BA=E4=B8=8D=E8=83=BD=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=88=A0=E9=99=A4=EF=BC=8C=E5=8F=AA=E8=83=BD=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=B8=8B=E6=8B=89=E6=A1=86=E4=B8=AD=E7=9A=84=E5=A4=8D?= =?UTF-8?q?=E9=80=89=E6=A1=86=E5=8F=96=E6=B6=88=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/_form.html.erb | 2 +- app/views/shixuns/_settings_edit.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/shixuns/_form.html.erb b/app/views/shixuns/_form.html.erb index b3b1c8a0b..20d12f230 100644 --- a/app/views/shixuns/_form.html.erb +++ b/app/views/shixuns/_form.html.erb @@ -42,7 +42,7 @@
  • - +
    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 @@
  • - +
    From 3263bf36eddc1fb28d1fda3ef7db8a21c4ed8c8e Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Jul 2017 14:39:13 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=BE=93=E5=85=A5=E5=86=85=E5=AE=B9=E5=90=8E?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E9=A1=B5=E9=9D=A2=EF=BC=8C=E9=80=82=E7=94=A8?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9A=84=E4=B8=8B=E6=8B=89=E6=A1=86=E4=B8=AD?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/_form.html.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/shixuns/_form.html.erb b/app/views/shixuns/_form.html.erb index 20d12f230..02c86ade0 100644 --- a/app/views/shixuns/_form.html.erb +++ b/app/views/shixuns/_form.html.erb @@ -171,6 +171,10 @@ }; $(function(){ + // 防止刷新页面后适用课程的下拉列表为空 + $("#shixun_major").val("0"); + $(".lesson_content").val(""); + //多选适用课程 $("body").click(function(event){ $(".lesson_checkbox").hide(); From 460f1b52d3c51531012c59f3d4da33e97baab87f Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Jul 2017 15:02:22 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9A=84=E5=A4=A7?= =?UTF-8?q?=E7=BA=B2=E3=80=81=E8=B5=84=E6=BA=90=E3=80=81=E9=A2=98=E5=BA=93?= =?UTF-8?q?=E5=92=8C=E6=95=99=E5=B8=88=E5=9B=A2=E9=98=9F=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E7=BA=B5=E5=90=91=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/syllabuses/_syllabus_des.html.erb | 4 ++-- app/views/syllabuses/_syllabus_homeworks.html.erb | 2 +- app/views/syllabuses/_syllabus_members.html.erb | 10 ++++++++-- app/views/syllabuses/_syllabus_resources.html.erb | 2 +- app/views/syllabuses/show.html.erb | 7 ++++++- public/stylesheets/css/edu-class.css | 1 + 6 files changed, 19 insertions(+), 7 deletions(-) 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;} From 60eab2a755478ff6c790f4e7373b25b8d147c3e6 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Jul 2017 15:41:31 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E8=A2=AB=E6=8B=92=E7=BB=9D=E5=90=8E=EF=BC=8C=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8F=AF=E4=BB=A5=E4=B8=80=E7=9B=B4=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=EF=BC=8C=E4=B8=94=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E5=AE=A1=E6=89=B9=E9=A1=B5=E9=9D=A2=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=94=B6=E5=88=B0=E7=94=B3=E8=AF=B7=E4=BF=A1=E6=81=AF=E3=80=81?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E6=8E=88=E6=9D=83=E7=9A=84=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E7=82=B9=E5=87=BB=E5=90=8C=E6=84=8F?= =?UTF-8?q?=E5=90=8E=E6=B2=A1=E6=9C=89=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 2 +- app/controllers/managements_controller.rb | 6 ++++++ app/views/account/apply_trail.js.erb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) 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 2a51da85c..a3cc25348 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -223,6 +223,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/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 From 4068a9e9524ca6006d7183365036759934dbc0d8 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 14 Jul 2017 15:53:26 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E4=BB=8E=E9=A2=98=E5=BA=93=E9=80=89=E7=94=A8=EF=BC=8C=E9=83=BD?= =?UTF-8?q?=E9=80=89=E5=90=8E=E5=AF=BC=E5=85=A5=E7=9A=84=E6=98=AF=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E5=90=8C=E4=B8=80=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- app/views/homework_common/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a99043250..b1b387ca8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1211,7 +1211,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/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=>"导入自己发布过的作业,或者共享题库中的作业") %>