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

This commit is contained in:
huang 2016-11-15 14:09:40 +08:00
commit 1e5d3e05ad
9 changed files with 44 additions and 7 deletions

View File

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

View File

@ -204,9 +204,9 @@
<li id="user_08" class="user_icons_addproject">
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :style => "font-size:14px;" %>
</li>
<!--<li id="user_09" class="user_icons_myissues">-->
<!--<a href="#user_09" >我的任务</a>-->
<!--</li>-->
<li id="user_09" class="user_icons_myissues">
<%= link_to "我的Issue", user_issues_user_path(@user), :style => "font-size:14px;" %>
</li>
<% end %>
</ul>
<ul class="users_accordion mb10">

View File

@ -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">&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();" %>
<div class="cl"></div>
</li>
</ul>
</div>
</div>

View File

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

View File

@ -102,11 +102,14 @@
<th>
<% 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>
<%= delete_link membership_path(member),
<%#= delete_link membership_path(member),
:remote => true,
: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"%>
<% end %>
<% end %>
</th>
</tr>
<% end %>

View File

@ -0,0 +1 @@
11111

View File

@ -1020,7 +1020,7 @@ zh:
text_wiki_page_destroy_children: 删除子页面及其所有下级页面
text_wiki_page_reassign_children: 将子页面的上级页面设置为
text_own_membership_delete_confirmation: 你正在删除你现有的某些或全部权限,如果这样做了你可能将会再也无法编辑该课程了。你确定要继续吗?
text_own_membership_for_project_confirmation: 你正在删除现有的某些或全部权限,如果这样做了你可能将会再也无法编辑该项目了。你确定要继续吗?
text_own_membership_for_project_confirmation: 您正要将自己从项目中删除,如果继续,您将失去编辑该项目的权限。您是否确定要继续
text_zoom_in: 放大
text_zoom_out: 缩小
text_applied_project: "用户 %{id} 申请加入项目 %{project}"
@ -1270,7 +1270,7 @@ zh:
#added by liuping
label_delete_confirm: 确认删除?
label_delete_confirm: 您是否确认删除?
label_tags_bid: 需求名称
label_tags_syllabus_name: 课程名称
label_tags_course_name: 班级名称

View File

@ -797,6 +797,7 @@ RedmineApp::Application.routes.draw do
post 'close'
post 'reopen'
get 'forked_pop'
get 'delete_member_pop'
get 'search_public_orgs_not_in_project'
match 'copy', :via => [:get, :post]
match 'set_public_or_private', :via => [:post]

View File

@ -550,7 +550,7 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
/* 缺陷列表 */
.issues_greycirbg_btn{ background-color:#dedede; padding:1px 5px;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; }
.issues_greycirbg_btn:hover{background-color:#cbcbcb;}
.issues_greycirbg_btn:hover{ background-color:#cbcbcb; cursor:default; }
.issues_con{ width:718px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444; }
.issues_statistics{ line-height:35px;}
.issues_statistics ul li{ float:left; }