@@ -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 edf0e6815164a539cde9fdba47f021405995c592 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 14 Jul 2017 15:05:01 +0800
Subject: [PATCH 07/41] =?UTF-8?q?=E5=88=87=E6=8D=A2=E4=B8=93=E4=B8=9A?=
=?UTF-8?q?=E7=9A=84=E9=80=89=E9=A1=B9=E6=97=B6=E8=AF=BE=E7=A8=8B=E9=83=A8?=
=?UTF-8?q?=E5=88=86=E7=9A=84=E6=9B=B4=E5=A4=9A=E6=B2=A1=E6=9C=89=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=E6=95=B0=E6=8D=AE=E7=9A=84=E6=95=B0=E9=87=8F=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E5=92=8C=E9=9A=90=E8=97=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../_attachment_history_popub_delete.html.erb | 6 +++---
.../shixuns/_shixun_course_search.html.erb | 20 ++++++++++++++++++-
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/app/views/files/_attachment_history_popub_delete.html.erb b/app/views/files/_attachment_history_popub_delete.html.erb
index bc5050805..7b4657066 100644
--- a/app/views/files/_attachment_history_popub_delete.html.erb
+++ b/app/views/files/_attachment_history_popub_delete.html.erb
@@ -38,11 +38,11 @@
<% if @attachment.container_type == "Project" %>
- <%= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5", :onclick =>"hideModal();") if (is_project_manager?(User.current.id, @attachment.container_id) || User.current.id == @attachment.author_id || User.current.admin?) %>
+ <%= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (is_project_manager?(User.current.id, @attachment.container_id) || User.current.id == @attachment.author_id || User.current.admin?) %>
<% elsif @attachment.container_type == "Course" %>
- <%= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5", :onclick =>"hideModal();") if (User.current.allowed_to?(:as_teacher, @attachment.container) || User.current.id == @attachment.author_id || User.current.admin?) %>
+ <%= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (User.current.allowed_to?(:as_teacher, @attachment.container) || User.current.id == @attachment.author_id || User.current.admin?) %>
<% elsif @attachment.container_type == "OrgSubfield" %>
- <%= link_to( '删除所有资源', attachment_path(@attachment, :history => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5", :onclick =>"hideModal();") if (User.current.id == @attachment.author_id || User.current.admin_of_org?(@attachment) || User.current.admin?) %>
+ <%= link_to( '删除所有资源', attachment_path(@attachment, :history => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (User.current.id == @attachment.author_id || User.current.admin_of_org?(@attachment) || User.current.admin?) %>
<% end %>
diff --git a/app/views/shixuns/_shixun_course_search.html.erb b/app/views/shixuns/_shixun_course_search.html.erb
index 3c7639810..7078b2ca8 100644
--- a/app/views/shixuns/_shixun_course_search.html.erb
+++ b/app/views/shixuns/_shixun_course_search.html.erb
@@ -9,4 +9,22 @@
<% end %>
-
\ No newline at end of file
+
+
\ No newline at end of file
From a150c1c883dd36841325ebb39070a6402cdabee6 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 14 Jul 2017 15:38:58 +0800
Subject: [PATCH 08/41] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9A=84=E6=89=80=E6=9C=89=E8=B5=84=E6=BA=90?=
=?UTF-8?q?=E7=9A=84=E5=BC=B9=E5=87=BA=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../files/_attachment_history_popub_delete.html.erb | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/app/views/files/_attachment_history_popub_delete.html.erb b/app/views/files/_attachment_history_popub_delete.html.erb
index 7b4657066..d23d40bba 100644
--- a/app/views/files/_attachment_history_popub_delete.html.erb
+++ b/app/views/files/_attachment_history_popub_delete.html.erb
@@ -38,9 +38,15 @@
<% if @attachment.container_type == "Project" %>
- <%= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (is_project_manager?(User.current.id, @attachment.container_id) || User.current.id == @attachment.author_id || User.current.admin?) %>
+ <%#= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (is_project_manager?(User.current.id, @attachment.container_id) || User.current.id == @attachment.author_id || User.current.admin?) %>
+ <% if (is_project_manager?(User.current.id, @attachment.container_id) || User.current.id == @attachment.author_id || User.current.admin?) %>
+
删除所有资源
+ <% end %>
<% elsif @attachment.container_type == "Course" %>
- <%= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (User.current.allowed_to?(:as_teacher, @attachment.container) || User.current.id == @attachment.author_id || User.current.admin?) %>
+ <%#= link_to( '删除所有资源', attachment_path(@attachment, :history_delete => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (User.current.allowed_to?(:as_teacher, @attachment.container) || User.current.id == @attachment.author_id || User.current.admin?) %>
+ <% if (User.current.allowed_to?(:as_teacher, @attachment.container) || User.current.id == @attachment.author_id || User.current.admin?) %>
+
删除所有资源
+ <% end %>
<% elsif @attachment.container_type == "OrgSubfield" %>
<%= link_to( '删除所有资源', attachment_path(@attachment, :history => true), :data => {:confirm => @attachment_histories_count.to_i > 0 ? l(:text_history_are_you_sure) : l(:text_are_you_sure)}, :method => :delete,:class => "fr fontGrey2 mb5 btn", :onclick =>"hideModal();") if (User.current.id == @attachment.author_id || User.current.admin_of_org?(@attachment) || User.current.admin?) %>
<% end %>
From c7999cb682b1ffc1fc8c5cd50b310a95a2401118 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 14 Jul 2017 15:39:27 +0800
Subject: [PATCH 09/41] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/managements_controller.rb | 1 +
app/views/managements/_shixun_list.html.erb | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb
index bbcc12744..ae0ca961a 100644
--- a/app/controllers/managements_controller.rb
+++ b/app/controllers/managements_controller.rb
@@ -268,6 +268,7 @@ class ManagementsController < ApplicationController
@autu_pages = Paginator.new @autu_count, @limit, params['page'] || 1
@offset ||= @autu_pages.offset
@authorizations = paginateHelper @authorizations, @limit
+
end
# 批量授权
diff --git a/app/views/managements/_shixun_list.html.erb b/app/views/managements/_shixun_list.html.erb
index cda2694a2..55a05e462 100644
--- a/app/views/managements/_shixun_list.html.erb
+++ b/app/views/managements/_shixun_list.html.erb
@@ -20,7 +20,7 @@
<%= shixun.owner.try(:show_name) %>
<%= format_time shixun.created_at %>
-
+
<% if shixun.status == 0 %>
<%= link_to(l(:button_delete), shixun_path(shixun), :method => :delete, :data => { confirm: "确认删除" } ) %>
<% end %>
From 60eab2a755478ff6c790f4e7373b25b8d147c3e6 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 14 Jul 2017 15:41:31 +0800
Subject: [PATCH 10/41] =?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 11/41] =?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=>"导入自己发布过的作业,或者共享题库中的作业") %>
From 2939c46aad6b323c68434dcbf5616fe6621d43ad Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 14 Jul 2017 15:57:52 +0800
Subject: [PATCH 12/41] =?UTF-8?q?=E5=8E=BB=E6=8E=89IE=20input=E6=A1=86?=
=?UTF-8?q?=E8=BE=93=E5=85=A5=E6=97=B6=E8=87=AA=E5=B8=A6=E7=9A=84=E6=B8=85?=
=?UTF-8?q?=E9=99=A4=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/css/edu-common.css | 2 ++
1 file changed, 2 insertions(+)
diff --git a/public/stylesheets/css/edu-common.css b/public/stylesheets/css/edu-common.css
index bc68965a8..4de96bfb2 100644
--- a/public/stylesheets/css/edu-common.css
+++ b/public/stylesheets/css/edu-common.css
@@ -310,3 +310,5 @@ html>body #ajax-indicator { position: fixed; }
25% {transform: translateY(0);}
50%, 100% {transform: translateY(0);}
}
+/*去掉IE input框输入时自带的清除按钮*/
+input::-ms-clear{display:none;}
\ No newline at end of file
From 94aaf39e551cf79c7d94cb178867fb3340801a21 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 14 Jul 2017 16:50:24 +0800
Subject: [PATCH 13/41] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AE=A4=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/user.rb | 1 +
app/views/games/_repository.html.erb | 2 +-
app/views/users/show.html.erb | 124 ++++++++++++++-------------
3 files changed, 66 insertions(+), 61 deletions(-)
diff --git a/app/models/user.rb b/app/models/user.rb
index 1baf02a60..e7d307c3e 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -208,6 +208,7 @@ class User < Principal
has_one :user_wechat
has_one :sso
+ has_many :apply_user_authentication
# add by zjc
has_one :level, :class_name => 'UserLevels', :dependent => :destroy
diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb
index f8e8afd82..9aaf66519 100644
--- a/app/views/games/_repository.html.erb
+++ b/app/views/games/_repository.html.erb
@@ -84,7 +84,7 @@
// 本地版
var html_local ="
";
console.log(html);
- $("#codotab_con_2").html(html);
+ $("#codotab_con_2").html(html_local);
var h = $("#games_repository_contents").height() - $("#top_repository").height() - 10;
$("#game_webssh").css("min-height", h);
HoverLi_new(2);
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index fbeb08bf5..4c32302f3 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -13,7 +13,7 @@
- <%= @user.login %>
+ <%= @user.show_name %>
<% if @user.user_extensions && @user.user_extensions.gender && @user.user_extensions.gender == 1 %>
<% else %>
@@ -22,61 +22,65 @@
- 讲师
-
- <%= @user.show_name %> (<%= @user.identity %>)
-
-
+ <%= @user.identity %>
+
<% if !@user.user_extensions.school_id.blank? && @user.user_extensions.school %>
<%= @user.user_extensions.school.name %>
<% end %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ <%# end %>--->
+
+ <% if @user.apply_user_authentication.blank? || @user.apply_user_authentication.last.try(:status) == 2 %>
+
+
+
+
+
+
+ <% elsif @user.apply_user_authentication.last.try(:status) == 0 %>
+
+
+
+
+
+
+ <% elsif @user.apply_user_authentication.last.try(:status) == 1 %>
+
+
+
+
+
+
+ <% end %>
+ <% if @user.try(:phone).blank? %>
+
+
+
+ <% else %>
+
+
+
+ <% end %>
+ <% if @user.try(:mail).blank? %>
+
+
+
+ <% else %>
+
+
+
+ <% end %>
+
@@ -91,11 +95,11 @@
<% update_visiti_count @user %>
<%= @user.visits.to_i %> 次访问
-
- 经验值9000
- 金币500
-
-
-
- <% str = current_user ? '我' : 'TA' %>
-
+
+ <% str = current_user ? '我' : 'TA' %>
+
-
- <%= render :partial => "my_homepage_shixuns_list" %>
-
-
+
+ <%= render :partial => "my_homepage_shixuns_list" %>
+
+
From e3a7907bf8cd591c2c952b711bcc989389abf794 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 14 Jul 2017 17:16:30 +0800
Subject: [PATCH 14/41] =?UTF-8?q?TA=E7=9A=84=E5=AE=9E=E8=AE=AD=E5=B7=B2?=
=?UTF-8?q?=E8=A7=A3=E9=94=81=E7=9A=84=E6=95=B0=E6=8D=AE=E4=B8=8D=E6=98=AF?=
=?UTF-8?q?=E5=8F=96=E7=9A=84=E8=A2=AB=E8=AE=BF=E9=97=AE=E8=80=85=E7=9A=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_my_homepage_shixuns_list.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/users/_my_homepage_shixuns_list.html.erb b/app/views/users/_my_homepage_shixuns_list.html.erb
index b91f16ce8..7f9a67a8d 100644
--- a/app/views/users/_my_homepage_shixuns_list.html.erb
+++ b/app/views/users/_my_homepage_shixuns_list.html.erb
@@ -10,7 +10,7 @@
<% @shixuns.each do |shixun| %>
<%= shixun.name.strip %>
- 已解锁第<%= had_passed_changllenge_count(shixun, User.current) %> 关/共<%= shixun.challenges.count %> 关
+ 已解锁第<%= had_passed_changllenge_count(shixun, @user) %> 关/共<%= shixun.challenges.count %> 关
<%= User.where(:id => shixun.user_id).first.show_name %>
<%= format_time shixun.created_at %>
分享
From 9adfee129804499662fc8b6f0f598897f892b5b7 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 14 Jul 2017 20:37:40 +0800
Subject: [PATCH 15/41] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E7=AE=80=E4=BB=8B?=
=?UTF-8?q?=E7=9A=84=E4=BF=9D=E5=AD=98=EF=BC=88=E6=9C=AA=E5=AE=8C=E6=88=90?=
=?UTF-8?q?=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/shixuns/_form.html.erb | 132 ++++++++++++++++++++++++++++++-
1 file changed, 128 insertions(+), 4 deletions(-)
diff --git a/app/views/shixuns/_form.html.erb b/app/views/shixuns/_form.html.erb
index 196533db1..ef93c6a78 100644
--- a/app/views/shixuns/_form.html.erb
+++ b/app/views/shixuns/_form.html.erb
@@ -25,12 +25,16 @@
+
+
预备知识
+
+
@@ -60,7 +64,7 @@
提交
- <%= link_to "取消", shixuns_path,:class => "task-btn fr mr10" %>
+ <%= link_to "取消",user_activities_path(User.current.id),:class => "task-btn fr mr10" %>
<% end %>
@@ -171,6 +175,10 @@
};
$(function(){
+// md_elocalStorage($("textarea[name='shixun[description]']"),"shixun_in_<%#= User.current.id %>","in");
+// md_elocalStorage($("textarea[name='shixun[propaedeutics]']"),"shixun_pr_<%#= User.current.id %>","pr");
+ //$("textarea[name='shixun[description]']").md_elocalStorage();
+
// 防止刷新页面后适用课程的下拉列表为空
$("#shixun_major").val("0");
$(".lesson_content").val("");
@@ -223,9 +231,6 @@
$(".lesson_content").val(list);
event.stopPropagation();
}
- if ($(".lesson_content").val()!= "") {
- $("#shixun_major_course_notice").hide();
- }
});
});
$("#shixun_major").on("change", function(){
@@ -254,4 +259,123 @@
$(".lesson_checkbox").html("");
}
});
+// var editor_in;
+// var editor_pr;
+// function md_elocalStorage(editor,mdu,id){
+// if (window.sessionStorage){
+// if(id=="in"){
+// editor_in = editor;
+// } else{
+// editor_pr = editor;
+// }
+// var oc = window.sessionStorage.getItem('content'+mdu);
+// if(oc !== null ){
+// var h = '您上次有已保存的数据,是否恢复 ? / 不恢复 ';
+// $("#e_tips_"+id).html(h);
+// }
+// setInterval(function() {
+// d = new Date();
+// var h = d.getHours();
+// var m = d.getMinutes();
+// var s = d.getSeconds();
+// h = h < 10 ? '0' + h : h;
+// m = m < 10 ? '0' + m : m;
+// s = s < 10 ? '0' + s : s;
+// if(editor.val().trim() != ""){
+// md_add_data("content",mdu,editor.val());
+// var id1 = "#e_tip_"+id;
+// var id2 = "#e_tips_"+id;
+// $(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 ");
+// $(id2).html("");
+// }
+// },10000);
+//
+// }else{
+// $('.ke-edit').after('您的浏览器不支持localStorage.无法开启自动保存草稿服务,请升级浏览器!');
+// }
+// }
+// function md_add_data(k,mdu,d){
+// console.log(d);
+// window.sessionStorage.setItem(k+mdu,d);
+// }
+// function md_rec_data(k,mdu,id){
+// if(window.sessionStorage.getItem(k+mdu) !== null){
+// if(id == "in"){
+// editor_in.val(window.sessionStorage.getItem(k+mdu));
+// } else{
+// editor_pr.val(window.sessionStorage.getItem(k+mdu));
+// }
+// if(id == "pr"){
+// console.log(shixun_propaedeutics);
+// /* --------------------------------- 预备知识 -------------------------------------- */
+// var shixun_propaedeutics = editormd("shixun_propaedeutics", {
+// width : "89.7%",
+// height : 300,
+// syncScrolling : "single",
+// //你的lib目录的路径,我这边用JSP做测试的
+// path : "/editormd/lib/",
+// tex : true,
+// toolbarIcons : function() {
+// // Or return editormd.toolbarModes[name]; // full, simple, mini
+// // Using "||" set icons align right.
+// return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear" ]
+// },
+// toolbarCustomIcons : {
+// testIcon : "
",
+// testIcon1 : "
"
+// },
+// //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。
+// saveHTMLToTextarea : true,
+// autoFocus: false,
+// // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标
+// dialogMaskOpacity : 0.6,
+// placeholder: "请输入完成当前任务依赖的知识点或者其它相关信息",
+// imageUpload : true,
+// imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
+// imageUploadURL : "<%= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>" //url
+// });
+// shixun_propaedeutics.getHTML();
+// } else{
+// var shixun_editormd = editormd("shixun_introduction", {
+// width : "89.7%",
+// height : 300,
+// syncScrolling : "single",
+// //你的lib目录的路径,我这边用JSP做测试的
+// path : "/editormd/lib/",
+// tex : true,
+// toolbarIcons : function() {
+// // Or return editormd.toolbarModes[name]; // full, simple, mini
+// // Using "||" set icons align right.
+// return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear" ]
+// },
+//
+// toolbarCustomIcons : {
+// testIcon : "
",
+// testIcon1 : "
"
+// },
+// //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。
+// saveHTMLToTextarea : true,
+// autoFocus: false,
+// // 用于增加自定义工具栏的功能,可以直接插入HTML标签,不使用默认的元素创建图标
+// dialogMaskOpacity : 0.6,
+// placeholder: "请输入完成当前任务依赖的知识点或者其它相关信息",
+// imageUpload : true,
+// imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"],
+// imageUploadURL : "<%= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>" //url
+// });
+// shixun_editormd.getHTML();
+// }
+// md_clear_data(k,mdu,id);
+// }
+// }
+// function md_clear_data(k,mdu,id){
+// window.sessionStorage.removeItem(k+mdu);
+// var id1 = "#e_tip_"+id;
+// var id2 = "#e_tips_"+id;
+// if(k == 'content'){
+// $(id2).html("");
+// }else{
+// $(id1).html("");
+// }
+// }
\ No newline at end of file
From ca6f9c2089db2e4fb90fa5bc5e32b8b131c5f08e Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 14 Jul 2017 20:50:37 +0800
Subject: [PATCH 16/41] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=AF=BE=E5=A0=82?=
=?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=A1=B5=E9=9D=A2=E6=8B=96=E6=8B=BD=E9=83=A8?=
=?UTF-8?q?=E5=88=86=E7=9A=84bug=20=E7=8F=AD=E7=BA=A7=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E6=89=80=E6=9C=89=E6=A8=A1=E5=9D=97=E5=8A=A0=E9=98=B4=E5=BD=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_courseList.html.erb | 2 +-
app/views/courses/settings.html.erb | 4 ++--
app/views/courses/show.html.erb | 2 +-
app/views/files/_course_file.html.erb | 4 ++--
app/views/files/_course_list.html.erb | 2 +-
app/views/files/_resource_detail.html.erb | 2 +-
app/views/homework_common/index.html.erb | 2 +-
app/views/layouts/_course_base_info.html.erb | 2 +-
app/views/layouts/base_courses.html.erb | 6 +++---
app/views/layouts/base_edu_course.html.erb | 6 +++---
app/views/stages/edit.js.erb | 2 +-
app/views/subjects/_subject_list.html.erb | 2 +-
app/views/subjects/append_to_stage.js.erb | 2 +-
app/views/subjects/show.html.erb | 4 ++--
app/views/users/_course_attachment.html.erb | 2 +-
app/views/users/_course_create.html.erb | 2 +-
app/views/users/_course_homework.html.erb | 2 +-
app/views/users/_course_journalsformessage.html.erb | 2 +-
app/views/users/_course_message.html.erb | 2 +-
app/views/users/_course_news.html.erb | 2 +-
app/views/users/_course_poll.html.erb | 2 +-
public/stylesheets/css/edu-subject.css | 6 +++---
22 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/app/views/courses/_courseList.html.erb b/app/views/courses/_courseList.html.erb
index c0a5e22f4..7dbfdf14e 100644
--- a/app/views/courses/_courseList.html.erb
+++ b/app/views/courses/_courseList.html.erb
@@ -52,7 +52,7 @@
<% else %>
-
+
没有数据可以显示!
diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb
index 4357be0b4..3636383e6 100644
--- a/app/views/courses/settings.html.erb
+++ b/app/views/courses/settings.html.erb
@@ -1,11 +1,11 @@
<%= javascript_include_tag 'jquery.datetimepicker.js' %>
-
+
设置
<%= link_to '返回', course_path(@course), :class => 'fr mr15 link-color-grey' %>
-
+
基本信息
diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb
index 6aeda492d..b23e5ae7b 100644
--- a/app/views/courses/show.html.erb
+++ b/app/views/courses/show.html.erb
@@ -8,7 +8,7 @@