From 551bb0b0c4319e73c252a8a8b671bb2705d9c941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 13 Jul 2019 17:36:42 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PackageIndexNEIBannerConcent.js | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index 56ccd3de..17adfbac 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -397,14 +397,14 @@ class PackageIndexNEIBannerConcent extends Component { return } - if(modalCancel===false){ - if(this.props.current_user.phone===undefined||this.props.current_user.phone===null||this.props.current_user.phone===""){ - this.setState({ - current_userphonetype:true - }) - return - } - } + // if(modalCancel===false){ + // if(this.props.current_user.phone===undefined||this.props.current_user.phone===null||this.props.current_user.phone===""){ + // this.setState({ + // current_userphonetype:true + // }) + // return + // } + // } if(modalCancel===true||this.props.current_user.phone===null){ @@ -618,17 +618,17 @@ class PackageIndexNEIBannerConcent extends Component { onChangeContact_phone=(e)=>{ let {modalCancel}=this.state; - if(modalCancel===false){ - if(this.props.current_user.phone===undefined||this.props.current_user.phone===null||this.props.current_user.phone===""){ - this.setState({ - current_userphonetype:true - }) - }else{ - this.setState({ - current_userphonetype:false - }) - } - } + // if(modalCancel===false){ + // if(this.props.current_user.phone===undefined||this.props.current_user.phone===null||this.props.current_user.phone===""){ + // this.setState({ + // current_userphonetype:true + // }) + // }else{ + // this.setState({ + // current_userphonetype:false + // }) + // } + // } if(modalCancel===true||this.props.current_user.phone===null){ if(e.target.value===undefined||e.target.value===null||e.target.value===""){ this.setState({ From d6569b6426a1249d602ddd73b3ded52272f43a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 13 Jul 2019 17:50:39 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js index 25edbe6c..c7a0e540 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js +++ b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js @@ -119,7 +119,7 @@ class PackageIndexNEITaskDetails extends Component { }).then((response) => { if(response.data.status===0){ this.props.showSnackbar("提交成功"); - }else{ + }else if(response.data.status===-1){ this.props.showSnackbar(response.data.message); } }).catch((error) => { @@ -215,7 +215,7 @@ class PackageIndexNEITaskDetails extends Component { if(response.data.status===0){ this.props.showSnackbar("报名成功"); this.getdatas() - }else{ + }else if(response.data.status===-1){ this.props.showSnackbar(response.data.message); } }).catch((error) => { From ae60fda3c8090fcb8a5a5449b365bcaaf48e251e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 13 Jul 2019 18:11:43 +0800 Subject: [PATCH 03/14] b --- .../PackageIndexNEITaskDetails.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js index c7a0e540..059ba4ae 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js +++ b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js @@ -119,6 +119,10 @@ class PackageIndexNEITaskDetails extends Component { }).then((response) => { if(response.data.status===0){ this.props.showSnackbar("提交成功"); + this.setState({ + setbiddingmantype:false + }) + this.getdatas() }else if(response.data.status===-1){ this.props.showSnackbar(response.data.message); } @@ -395,7 +399,8 @@ class PackageIndexNEITaskDetails extends Component { {data&&data.bidding_users.map((item,key)=>{ return( -
+
+ {item.status==="bidding_won"?:""}

{item.name}

{this.props.current_user.login!=item.login? @@ -442,7 +447,7 @@ class PackageIndexNEITaskDetails extends Component {
{data&&data.bidding_users.map((item,key)=>{ return( -
this.Clickteacher2(item.id)}> +
this.Clickteacher2(item.id)} key={key}> {item.bool===true?:}

{item.name}

From 64f5ef6dfca4369972d4f8dddff057bf9bdabf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 13 Jul 2019 18:25:29 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/projectPackages/PackageIndex/PackageConcent.js | 2 +- public/react/src/modules/projectPackages/packageconcnet.css | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js b/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js index c1422416..c9ffc870 100644 --- a/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js @@ -253,7 +253,7 @@ class PackageConcent extends Component { {moment(item.deadline_at).endOf('day').fromNow()}竞标截止
-
+
{item.bidding_users_count}人竞标 diff --git a/public/react/src/modules/projectPackages/packageconcnet.css b/public/react/src/modules/projectPackages/packageconcnet.css index 329de857..c9a9ec0c 100644 --- a/public/react/src/modules/projectPackages/packageconcnet.css +++ b/public/react/src/modules/projectPackages/packageconcnet.css @@ -310,6 +310,6 @@ text-align: center; } -.pd35{ - padding-left: 35px; +.ml0{ + margin-left: 0px; } \ No newline at end of file From 8c074f0c828eaa9cd21a384d3ac10507038e11fd Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 09:07:53 +0800 Subject: [PATCH 05/14] footer --- app/views/layouts/_footer.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 3a8fdc20..3593ea28 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -17,7 +17,7 @@
+ Trustie   &   IntelliDE inside.

From 52907d1313aab18d0a17beca40d1b7cd6b6d4155 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 09:28:22 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/libraries_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 27e814d7..63f984f3 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -1,7 +1,7 @@ class LibrariesController < ApplicationController layout 'base_library' - before_filter :require_login, :except => [:index] + before_filter :require_login, :except => [:index, :show] after_filter :increment_visit_count, only: [:show, :create, :edit, :update] def index From 4ef7094812192ddd5434caf33c8ec5eb44263dba Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 09:30:04 +0800 Subject: [PATCH 07/14] .. --- app/controllers/libraries_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 63f984f3..27e814d7 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -1,7 +1,7 @@ class LibrariesController < ApplicationController layout 'base_library' - before_filter :require_login, :except => [:index, :show] + before_filter :require_login, :except => [:index] after_filter :increment_visit_count, only: [:show, :create, :edit, :update] def index From 1db7bde85c6755c26169d7c7bdd6828294b838cb Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 09:35:03 +0800 Subject: [PATCH 08/14] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/libraries_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 27e814d7..ecbe41e4 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -1,7 +1,7 @@ class LibrariesController < ApplicationController layout 'base_library' - before_filter :require_login, :except => [:index] + before_filter :require_login, :except => [:index, :show] after_filter :increment_visit_count, only: [:show, :create, :edit, :update] def index @@ -121,7 +121,7 @@ class LibrariesController < ApplicationController end def admin_or_self? - current_library.user_id == current_user.id || admin_or_business? + current_library.try(:user_id) == current_user.try(:id) || admin_or_business? end def increment_visit_count From c1e78e903b497392ecf44b4c81fbf2720b15b5f8 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 09:49:31 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E6=95=99=E5=AD=A6=E6=A1=88=E4=BE=8Btitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7192d736..345dfadc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2990,6 +2990,12 @@ module ApplicationHelper title << "项目" elsif @welcome title << "创新源于实践" + elsif params[:controller] == "libraries" + if @library + title << "#{@library.title}" + else + title << "教学案例" + end elsif @course title << (@course.name.nil? ? "课堂" : @course.name) elsif params[:controller] == "homework_bank" || params[:controller] == "question_banks" || params[:controller] == "exercise_bank" From ecaa2690ef6bbf462260108c388f9c9011e58a6e Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 10:01:11 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E8=8E=B7=E5=A5=96=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/libraries_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/libraries_helper.rb b/app/helpers/libraries_helper.rb index 433effd7..4d6956b7 100644 --- a/app/helpers/libraries_helper.rb +++ b/app/helpers/libraries_helper.rb @@ -10,7 +10,7 @@ module LibrariesHelper def library_tag_class(tag) case tag.name - when '优秀案例' then 'edu-activity-red' + when '获奖案例' then 'edu-activity-red' when '入库案例' then 'edu-activity-blue' end end From f41194fdbf52288cdbce6a1ad3de23728799b602 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 10:07:24 +0800 Subject: [PATCH 11/14] .. --- app/helpers/libraries_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/libraries_helper.rb b/app/helpers/libraries_helper.rb index 4d6956b7..433effd7 100644 --- a/app/helpers/libraries_helper.rb +++ b/app/helpers/libraries_helper.rb @@ -10,7 +10,7 @@ module LibrariesHelper def library_tag_class(tag) case tag.name - when '获奖案例' then 'edu-activity-red' + when '优秀案例' then 'edu-activity-red' when '入库案例' then 'edu-activity-blue' end end From f29ea837e7dc269718d15b996a212f0120366c32 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 10:14:01 +0800 Subject: [PATCH 12/14] =?UTF-8?q?huojiang=20=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/libraries_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/libraries_helper.rb b/app/helpers/libraries_helper.rb index 433effd7..4d6956b7 100644 --- a/app/helpers/libraries_helper.rb +++ b/app/helpers/libraries_helper.rb @@ -10,7 +10,7 @@ module LibrariesHelper def library_tag_class(tag) case tag.name - when '优秀案例' then 'edu-activity-red' + when '获奖案例' then 'edu-activity-red' when '入库案例' then 'edu-activity-blue' end end From 1b81191ceae9d5a18b534d35baf749c042cfbd84 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 11:09:52 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E4=BC=97=E5=8C=85=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/common/index.html.erb | 2 +- app/views/layouts/login_bigdata.html.erb | 2 +- app/views/libraries/index.html.erb | 2 +- app/views/libraries/show.html.erb | 1 - config/routes.rb | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/common/index.html.erb b/app/views/common/index.html.erb index 35c63ca6..74595a07 100644 --- a/app/views/common/index.html.erb +++ b/app/views/common/index.html.erb @@ -1 +1 @@ -Educoder
\ No newline at end of file +EduCoder
\ No newline at end of file diff --git a/app/views/layouts/login_bigdata.html.erb b/app/views/layouts/login_bigdata.html.erb index 6471fcc0..d67d6134 100644 --- a/app/views/layouts/login_bigdata.html.erb +++ b/app/views/layouts/login_bigdata.html.erb @@ -22,7 +22,7 @@
<%= render :partial => 'layouts/footer' %> <% elsif @login %> - +
<%= yield %>
diff --git a/app/views/libraries/index.html.erb b/app/views/libraries/index.html.erb index f81494e9..1c15217c 100644 --- a/app/views/libraries/index.html.erb +++ b/app/views/libraries/index.html.erb @@ -3,7 +3,7 @@

教学案例 - <%= link_to '新建', new_library_path, class: 'fr color-blue font-16 mt3' %> + <%= link_to '发布案例', new_library_path, class: 'white-btn edu-filter-btn-blue fr mr10 mt8', style: 'color: #4CACFF' %>

    diff --git a/app/views/libraries/show.html.erb b/app/views/libraries/show.html.erb index f8d45050..36976d5e 100644 --- a/app/views/libraries/show.html.erb +++ b/app/views/libraries/show.html.erb @@ -58,7 +58,6 @@
  • <%= @library.user.school_name %> - <%= @library.user.identity %> 编码:<%= @library.uuid %> <% if @library.published? %> diff --git a/config/routes.rb b/config/routes.rb index a05298c6..8c049f6d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -57,7 +57,7 @@ RedmineApp::Application.routes.draw do ## oauth相关 get :publish_success, on: :collection end - resources :project_packages, only: [:index, :show, :new, :edit, :destroy] do + resources :project_packages, :path => "crowdsourcing", only: [:index, :show, :new, :edit, :destroy] do get :apply_success, on: :member end From 9bb444a14f1c8edf545f02fb71eea94757c37c64 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Sun, 14 Jul 2019 11:13:06 +0800 Subject: [PATCH 14/14] .. --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 8c049f6d..a05298c6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -57,7 +57,7 @@ RedmineApp::Application.routes.draw do ## oauth相关 get :publish_success, on: :collection end - resources :project_packages, :path => "crowdsourcing", only: [:index, :show, :new, :edit, :destroy] do + resources :project_packages, only: [:index, :show, :new, :edit, :destroy] do get :apply_success, on: :member end