diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 82981e62..16efc0c5 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 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" 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 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 %> -

Educoder

+

EduCoder

<%= 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' %>

-
+
{item.bidding_users_count}人竞标 diff --git a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js index 680fa8d4..83367498 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js +++ b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js @@ -119,7 +119,11 @@ class PackageIndexNEITaskDetails extends Component { }).then((response) => { if(response.data.status===0){ this.props.showSnackbar("提交成功"); - }else{ + this.setState({ + setbiddingmantype:false + }) + this.getdatas() + }else if(response.data.status===-1){ this.props.showSnackbar(response.data.message); } }).catch((error) => { @@ -215,7 +219,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) => { @@ -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}

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({ diff --git a/public/react/src/modules/projectPackages/packageconcnet.css b/public/react/src/modules/projectPackages/packageconcnet.css index 6727c95c..0a690822 100644 --- a/public/react/src/modules/projectPackages/packageconcnet.css +++ b/public/react/src/modules/projectPackages/packageconcnet.css @@ -310,8 +310,8 @@ text-align: center; } -.pd35{ - padding-left: 35px; +.ml0{ + margin-left: 0px; } .tabelcli{ overflow: hidden;