项目配置删除按钮新版弹框
This commit is contained in:
parent
5f481c2bf9
commit
ffe86c7ec9
|
@ -769,6 +769,14 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#配置成员弹框
|
||||||
|
def delete_member_pop
|
||||||
|
@member = Member.find(params[:member].to_i)
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def close
|
def close
|
||||||
@project.close
|
@project.close
|
||||||
redirect_to project_url(@project)
|
redirect_to project_url(@project)
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div style="width:460px;">
|
||||||
|
<div class="sy_popup_top">
|
||||||
|
<h3 class="fl">提示</h3>
|
||||||
|
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sy_popup_con" style="width:380px;">
|
||||||
|
<ul class="sy_popup_add center" >
|
||||||
|
<%=l(:label_delete_confirm) %>
|
||||||
|
<%# if member.deletable? %>
|
||||||
|
<%#= !User.current.admin? && member.include?(User.current) ? l(:text_own_membership_for_project_confirmation) : l(:label_delete_confirm) %>
|
||||||
|
<%# end %>
|
||||||
|
<li class="mt10">
|
||||||
|
<label class="mr27"> </label>
|
||||||
|
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取 消</a>
|
||||||
|
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确 定</a>-->
|
||||||
|
<%= link_to "确 定", membership_path(member), :method => "delete", :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,2 @@
|
||||||
|
var htmlvalue = "<%= escape_javascript(render :partial => 'projects/delete_member_pop', :locals => { :member => @member }) %>";
|
||||||
|
pop_box_new(htmlvalue,320,316);
|
|
@ -102,11 +102,14 @@
|
||||||
<th>
|
<th>
|
||||||
<% unless member.user_id == @project.user_id %>
|
<% unless member.user_id == @project.user_id %>
|
||||||
<a href="javascript:void(0);" class=" sy_btn_blue mr5 " onclick="$('#members-<%= member.id%>-roles-form').show();$('#members_<%= member.id %>_role_show').hide();">编辑</a>
|
<a href="javascript:void(0);" class=" sy_btn_blue mr5 " onclick="$('#members-<%= member.id%>-roles-form').show();$('#members_<%= member.id %>_role_show').hide();">编辑</a>
|
||||||
<%= delete_link membership_path(member),
|
<%#= delete_link membership_path(member),
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:class => "sy_btn_grey mr5",
|
:class => "sy_btn_grey mr5",
|
||||||
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
|
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
|
||||||
|
<% if member.deletable? %>
|
||||||
|
<%= link_to "删除", { :controller => 'projects', :action => 'delete_member_pop', :member => member }, :remote => true, :class => "sy_btn_grey mr5"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1020,7 +1020,7 @@ zh:
|
||||||
text_wiki_page_destroy_children: 删除子页面及其所有下级页面
|
text_wiki_page_destroy_children: 删除子页面及其所有下级页面
|
||||||
text_wiki_page_reassign_children: 将子页面的上级页面设置为
|
text_wiki_page_reassign_children: 将子页面的上级页面设置为
|
||||||
text_own_membership_delete_confirmation: 你正在删除你现有的某些或全部权限,如果这样做了你可能将会再也无法编辑该课程了。你确定要继续吗?
|
text_own_membership_delete_confirmation: 你正在删除你现有的某些或全部权限,如果这样做了你可能将会再也无法编辑该课程了。你确定要继续吗?
|
||||||
text_own_membership_for_project_confirmation: 你正在删除现有的某些或全部权限,如果这样做了你可能将会再也无法编辑该项目了。你确定要继续吗?
|
text_own_membership_for_project_confirmation: 您正要将自己从项目中删除,如果继续,您将失去编辑该项目的权限。您是否确定要继续
|
||||||
text_zoom_in: 放大
|
text_zoom_in: 放大
|
||||||
text_zoom_out: 缩小
|
text_zoom_out: 缩小
|
||||||
text_applied_project: "用户 %{id} 申请加入项目 %{project}"
|
text_applied_project: "用户 %{id} 申请加入项目 %{project}"
|
||||||
|
@ -1270,7 +1270,7 @@ zh:
|
||||||
|
|
||||||
#added by liuping
|
#added by liuping
|
||||||
|
|
||||||
label_delete_confirm: 确认删除?
|
label_delete_confirm: 您是否确认删除?
|
||||||
label_tags_bid: 需求名称
|
label_tags_bid: 需求名称
|
||||||
label_tags_syllabus_name: 课程名称
|
label_tags_syllabus_name: 课程名称
|
||||||
label_tags_course_name: 班级名称
|
label_tags_course_name: 班级名称
|
||||||
|
|
|
@ -796,6 +796,7 @@ RedmineApp::Application.routes.draw do
|
||||||
post 'close'
|
post 'close'
|
||||||
post 'reopen'
|
post 'reopen'
|
||||||
get 'forked_pop'
|
get 'forked_pop'
|
||||||
|
get 'delete_member_pop'
|
||||||
get 'search_public_orgs_not_in_project'
|
get 'search_public_orgs_not_in_project'
|
||||||
match 'copy', :via => [:get, :post]
|
match 'copy', :via => [:get, :post]
|
||||||
match 'set_public_or_private', :via => [:post]
|
match 'set_public_or_private', :via => [:post]
|
||||||
|
|
Loading…
Reference in New Issue