parent
2ee04d55f2
commit
312d7660b2
|
@ -107,17 +107,24 @@ class MembersController < ApplicationController
|
||||||
AppliedProject.deleteappiled(member.user_id, @project.id)
|
AppliedProject.deleteappiled(member.user_id, @project.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
if params[:flag]
|
||||||
format.html { redirect_to_settings_in_projects }
|
flash[:notice] = l(:label_invite_success)
|
||||||
format.js { @members = members; @applied_members = applied_members; }
|
respond_to do |format|
|
||||||
format.api {
|
format.html { redirect_to invite_members_project_url(@project) }
|
||||||
@member = members.first
|
end
|
||||||
if @member.valid?
|
else
|
||||||
render :action => 'show', :status => :created, :location => membership_url(@member)
|
respond_to do |format|
|
||||||
else
|
format.html { redirect_to_settings_in_projects }
|
||||||
render_validation_errors(@member)
|
format.js { @members = members; @applied_members = applied_members; }
|
||||||
end
|
format.api {
|
||||||
}
|
@member = members.first
|
||||||
|
if @member.valid?
|
||||||
|
render :action => 'show', :status => :created, :location => membership_url(@member)
|
||||||
|
else
|
||||||
|
render_validation_errors(@member)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
elsif @course
|
elsif @course
|
||||||
course_info = []
|
course_info = []
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2">邀请加入</h2>
|
<h2 class="project_h2">邀请加入</h2>
|
||||||
</div>
|
</div>
|
||||||
<%= error_messages_for 'member' %>
|
<%#= render_flash_messages %>
|
||||||
<%
|
<%
|
||||||
roles = Role.givable.all
|
roles = Role.givable.all
|
||||||
if @project.project_type == Project::ProjectType_course
|
if @project.project_type == Project::ProjectType_course
|
||||||
|
@ -21,8 +22,9 @@
|
||||||
<div class="box_main">
|
<div class="box_main">
|
||||||
<h3 class="box_h3">邀请Trustie注册用户</h3>
|
<h3 class="box_h3">邀请Trustie注册用户</h3>
|
||||||
<% if roles.any? %>
|
<% if roles.any? %>
|
||||||
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :method => :post}) do |f| %>
|
||||||
<div class="invi_search">
|
<div class="invi_search">
|
||||||
|
<input hidden="hidden" value="true" name="flag">
|
||||||
<input id="principal_search" class="invi_search_input fl" type="text" placeholder="输入用户名称搜索好友">
|
<input id="principal_search" class="invi_search_input fl" type="text" placeholder="输入用户名称搜索好友">
|
||||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js',:flag => true) }')" %>
|
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js',:flag => true) }')" %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -1887,6 +1887,7 @@ zh:
|
||||||
label_bids_task_list: 作业列表
|
label_bids_task_list: 作业列表
|
||||||
label_join_course: 加入
|
label_join_course: 加入
|
||||||
label_invite_project: 邀请您加入项目
|
label_invite_project: 邀请您加入项目
|
||||||
|
label_invite_success: 邀请成功
|
||||||
label_invite_members: 邀请用户
|
label_invite_members: 邀请用户
|
||||||
label_exit_course: 退出
|
label_exit_course: 退出
|
||||||
label_exit_group: 退出当前分班
|
label_exit_group: 退出当前分班
|
||||||
|
|
|
@ -13,7 +13,7 @@ ul.wlist{ margin-left: -40px; border-bottom:none; }
|
||||||
ul.wlist li{float: left;}
|
ul.wlist li{float: left;}
|
||||||
ul.wlist li a{ border:1px solid #15bccf; padding:4px; margin-left:3px;}
|
ul.wlist li a{ border:1px solid #15bccf; padding:4px; margin-left:3px;}
|
||||||
ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
|
ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
|
||||||
.wlist_select { background-color:#64bdd9; color:#fff; padding: 3px; margin-left:3px;margin-top: -4px; border:1px solid #64bdd9;}
|
.wlist_select { background-color:#64bdd9; color:#fff; padding: 4px 3px 3px 3px; margin-left:3px;margin-top: -5px; border:1px solid #64bdd9;}
|
||||||
|
|
||||||
/*20150203项目界面优化样式 By: huangjignquan*/
|
/*20150203项目界面优化样式 By: huangjignquan*/
|
||||||
.project_new{font-size: 15px; padding: 5px;}
|
.project_new{font-size: 15px; padding: 5px;}
|
||||||
|
|
Loading…
Reference in New Issue