Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
3af9c63ae0
|
@ -125,7 +125,7 @@ class AccountController < ApplicationController
|
||||||
#register_by_email_activation(@user)
|
#register_by_email_activation(@user)
|
||||||
unless @user.new_record?
|
unless @user.new_record?
|
||||||
flash[:notice] = l(:notice_account_register_done)
|
flash[:notice] = l(:notice_account_register_done)
|
||||||
render action: 'email_valid', locals: {:mail => user.mail}
|
render action: 'email_valid', locals: {:mail => @user.mail}
|
||||||
end
|
end
|
||||||
when '3'
|
when '3'
|
||||||
#register_automatically(@user)
|
#register_automatically(@user)
|
||||||
|
|
|
@ -336,4 +336,8 @@ class AdminController < ApplicationController
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def create_version
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -333,13 +333,21 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_mail_to_member
|
def send_mail_to_member
|
||||||
unless params[:mail].nil?
|
|
||||||
|
if !params[:mail].nil? && User.find_by_mail(params[:mail].to_s).nil?
|
||||||
email = params[:mail]
|
email = params[:mail]
|
||||||
Mailer.send_invite_in_project(email, @project, User.current).deliver
|
Mailer.send_invite_in_project(email, @project, User.current).deliver
|
||||||
|
@is_zhuce =false
|
||||||
|
else
|
||||||
|
@is_zhuce = true
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#发送邮件邀请新用户
|
#发送邮件邀请新用户
|
||||||
def invite_members_by_mail
|
def invite_members_by_mail
|
||||||
|
@is_zhuce =false
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.js
|
format.js
|
||||||
|
|
|
@ -158,9 +158,9 @@ class CoursesService
|
||||||
|
|
||||||
|
|
||||||
#显示课程
|
#显示课程
|
||||||
def show_course(params,currnet_user)
|
def show_course(params,current_user)
|
||||||
course = Course.find(params[:id])
|
course = Course.find(params[:id])
|
||||||
unless (course.is_public == 1 || currnet_user.member_of_course?(@course)|| currnet_user.admin?)
|
unless (course.is_public == 1 || current_user.member_of_course?(course) || current_user.admin?)
|
||||||
raise '403'
|
raise '403'
|
||||||
end
|
end
|
||||||
{:course => course,:img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)}
|
{:course => course,:img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)}
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
<a href="javascript:void(0)" onclick="$('#new_version').slideToggle(400); ">发布新版本</a>
|
<a href="javascript:void(0)" onclick="$('#new_version').slideToggle(400); ">发布新版本</a>
|
||||||
<div>
|
<div>
|
||||||
<form id="new_version" style="display: none">
|
<form id="new_version" style="display: none">
|
||||||
|
发布新版本
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<div>当前版本:</div>
|
<div>当前版本:</div>
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
<div class="project_r_h">
|
<div class="floatbox" style="margin:100px;">
|
||||||
<h2 class="project_h2">邀请加入</h2>
|
|
||||||
</div>
|
|
||||||
<div class="floatbox" style="margin:120px;">
|
|
||||||
<div ><a href="#" class="box_close"></a></div>
|
<div ><a href="#" class="box_close"></a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="box_main">
|
<div class="box_main">
|
||||||
<h3 class="box_h3">发送邮件邀请新用户</h3>
|
<h3 class="box_h3">发送邮件邀请新用户</h3>
|
||||||
<p class="box_p">输入好友邮箱地址,Trustie帮您免费发送!</p>
|
<p class="box_p">输入好友邮箱地址,Trustie帮您免费发送!</p>
|
||||||
<p style="padding-lef:20px;"><%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get',:remote=>true) do %></p>
|
<div id="is_registed">
|
||||||
|
<%= render :partial => 'regested', locals: { :isregisted => false} %>
|
||||||
|
</div>
|
||||||
|
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get',:remote=>true) do %>
|
||||||
|
<ul>
|
||||||
|
<li >
|
||||||
<%= text_field_tag 'mail', '邮箱', :class => "fb_item fl" %>
|
<%= text_field_tag 'mail', '邮箱', :class => "fb_item fl" %>
|
||||||
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<%= submit_tag '免费发送', :style=> "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<%= submit_tag '免费发送', :class=> "btn_free" %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<% if isregisted %>
|
||||||
|
<p style="color: #ff0000"><%= l(:notice_registed_success) %></p>
|
||||||
|
<% end %>
|
|
@ -0,0 +1 @@
|
||||||
|
$("#is_registed").html("<%= escape_javascript( render :partial => 'regested', locals: {:isregisted => @is_zhuce})%>")
|
|
@ -181,6 +181,7 @@ zh:
|
||||||
notice_successful_create: 创建成功
|
notice_successful_create: 创建成功
|
||||||
notice_successful_update: 更新成功
|
notice_successful_update: 更新成功
|
||||||
notice_successful_delete: 删除成功
|
notice_successful_delete: 删除成功
|
||||||
|
notice_registed_success: 该邮箱已被注册,请直接邀请注册用户
|
||||||
notice_failed_delete: 删除失败
|
notice_failed_delete: 删除失败
|
||||||
notice_successful_connection: 连接成功
|
notice_successful_connection: 连接成功
|
||||||
notice_successful_join: 加入成功
|
notice_successful_join: 加入成功
|
||||||
|
|
|
@ -645,6 +645,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'admin/web_footer_made', as: :web_footer_made
|
match 'admin/web_footer_made', as: :web_footer_made
|
||||||
match 'admin/enterprise_page_made', as: :enterprise_page_made
|
match 'admin/enterprise_page_made', as: :enterprise_page_made
|
||||||
match 'admin/mobile_version', as: :mobile_version
|
match 'admin/mobile_version', as: :mobile_version
|
||||||
|
match 'admin/create_version', as: :create_version
|
||||||
match 'admin/search', :via => [:get, :post]
|
match 'admin/search', :via => [:get, :post]
|
||||||
match 'admin/plugins', :via => :get
|
match 'admin/plugins', :via => :get
|
||||||
match 'admin/info', :via => :get
|
match 'admin/info', :via => :get
|
||||||
|
|
Loading…
Reference in New Issue