dev_aliyun
cxt 5 years ago
parent 7606129c82
commit 0a9ac5837c

@ -54,6 +54,12 @@ class WelcomeController < ApplicationController
end end
end end
def join_private_courses
@invitation_code = params[:invitation_code]
respond_to do |format|
format.js
end
end
def shixun_to_local def shixun_to_local
identifiers = params[:identifiers].split(",") identifiers = params[:identifiers].split(",")

@ -45,7 +45,7 @@
invite_code = nil invite_code = nil
if first_entry.url.present? if first_entry.url.present?
course_id = first_entry.url.split('/')[-2, 1] course_id = first_entry.url.split('/')[-5, 1]
course = Course.find_by_id(course_id) course = Course.find_by_id(course_id)
if course.present? && @user && @user.logged? if course.present? && @user && @user.logged?

@ -85,7 +85,7 @@
<li><%= link_to '新建项目', new_project_path() %></li> <li><%= link_to '新建项目', new_project_path() %></li>
</ul> </ul>
<ul class="fl with50 edu-txt-center"> <ul class="fl with50 edu-txt-center">
<li><%= link_to "加入课堂", join_private_courses_users_path, :remote => true %></li> <li><%= link_to "加入课堂", join_private_courses_path, :remote => true %></li>
<!-- <li><%#= link_to "加入项目", applied_join_project_path, :remote => true %></li>--> <!-- <li><%#= link_to "加入项目", applied_join_project_path, :remote => true %></li>-->
</ul> </ul>
</div> </div>

@ -51,9 +51,9 @@
</div> </div>
<span class="font-15 fr mt15 ml15"> <span class="font-15 fr mt15 ml15">
<a href="www.educoder.net/login" class="mr5 color-white">登录</a> <a href="/login" class="mr5 color-white">登录</a>
<em class="vertical-line"></em> <em class="vertical-line"></em>
<a href="www.educoder.net/register" class="mr5 color-white">登录</a> <a href="/register" class="mr5 color-white">注册</a>
<%#= link_to '注册', user_join_path, :class => "ml5 color-white" %> <%#= link_to '注册', user_join_path, :class => "ml5 color-white" %>
</span> </span>
<div class="fr head-right"> <div class="fr head-right">

@ -0,0 +1,2 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'courses/join_private_course') %>";
pop_box_new(htmlvalue,460,220);

@ -1670,7 +1670,6 @@ RedmineApp::Application.routes.draw do ## oauth相关
get 'html_show' get 'html_show'
get 'switch_user_module' get 'switch_user_module'
get 'reward_grade' get 'reward_grade'
match 'join_private_courses', :via => [:get, :post]
end end
member do member do
@ -2606,6 +2605,7 @@ RedmineApp::Application.routes.draw do ## oauth相关
######################## ########################
##added by wen########## ##added by wen##########
#######confusing######## #######confusing########
match 'welcome/join_private_courses', to: 'welcome#join_private_courses', :via => [:get, :post], :as => 'join_private_courses'
get 'welcome/search', to: 'welcome#search' get 'welcome/search', to: 'welcome#search'
get 'school/index', to: 'school#index' get 'school/index', to: 'school#index'
get 'school/:school_id', to: get 'school/:school_id', to:

Loading…
Cancel
Save