Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2016-11-18 19:17:47 +08:00
commit cf6acd48c4
6 changed files with 6 additions and 9 deletions

View File

@ -769,7 +769,7 @@ class ProjectsController < ApplicationController
end
end
#配置成员弹框
# 配置成员弹框
def delete_member_pop
@member = Member.find(params[:member].to_i)
respond_to do |format|

View File

@ -7,14 +7,11 @@
<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">&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a>
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确&nbsp;&nbsp;定</a>-->
<%= link_to "确 定", membership_path(member), :method => "delete", :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
<%= link_to "确 定", membership_path(member), :method => "delete", :remote => true, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
<div class="cl"></div>
</li>
</ul>

View File

@ -1,2 +1,2 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'projects/delete_member_pop', :locals => { :member => @member }) %>";
pop_box_new(htmlvalue,320,316);
pop_box_new(htmlvalue,460,316);

View File

@ -1,3 +1,3 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'repositories/forked_popbox') %>";
pop_box_new(htmlvalue,320,316);
pop_box_new(htmlvalue,460,316);

View File

@ -107,7 +107,7 @@
: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? %>
<% if member.deletable? %>
<%= link_to "删除", { :controller => 'projects', :action => 'delete_member_pop', :member => member }, :remote => true, :class => "sy_btn_grey mr5"%>
<%= link_to "删除", delete_member_pop_project_path(@project, :member => member), :remote => true, :class => "sy_btn_grey mr5"%>
<% end %>
<% end %>
</th>

View File

@ -800,7 +800,7 @@ RedmineApp::Application.routes.draw do
post 'close'
post 'reopen'
get 'forked_pop'
get 'delete_member_pop'
get 'delete_member_pop', :to => 'projects#delete_member_pop', :via => :get, :as => "delete_member_pop"
get 'search_public_orgs_not_in_project'
match 'copy', :via => [:get, :post]
match 'set_public_or_private', :via => [:post]