Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject
This commit is contained in:
commit
da78adc697
|
@ -33,6 +33,7 @@
|
|||
<th><%= i += 1 %></th>
|
||||
<th> <%= link_to_user_header member.principal, true %></th>
|
||||
<th>
|
||||
|
||||
<% if User.current.language == "zh" %>
|
||||
<% zh_roles = [] %>
|
||||
<% member.roles.each do |role| %>
|
||||
|
@ -45,13 +46,23 @@
|
|||
end
|
||||
%>
|
||||
<% end %>
|
||||
<%= h zh_roles.sort.reverse.collect(&:to_s).join(', ') %>
|
||||
<label style="text-align:center;" id="members_<%= member.id %>_role_show"><%= h zh_roles.sort.reverse.collect(&:to_s).join(', ') %></label>
|
||||
<% else %>
|
||||
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||
<% end %></th>
|
||||
<label style="text-align:center;" id="members_<%= member.id %>_role_show"> <%= h member.roles.sort.collect(&:to_s).join(', ') %></label>
|
||||
<% end %>
|
||||
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
||||
:method => :put,
|
||||
:html => {:id => "members-#{member.id}-roles-form", :class => 'undis'}}
|
||||
) do |f| %>
|
||||
<%= select( :membership, :roles, [["管理人员",3],["开发人员",4],["报告人员",5]],
|
||||
{ :include_blank => false, :selected => member.roles[0].id ? member.roles[0].id : 0 },
|
||||
{ :onchange=>"remote_function('#members-#{member.id}-roles-form');", :id =>"membership[role_ids][]", :name => "membership[role_ids][]", :style => "border:1px solid #e5e5e5;"}) %>
|
||||
|
||||
<% end %>
|
||||
</th>
|
||||
<th>
|
||||
<% unless member.user_id == @project.user_id %>
|
||||
<a href="javascript:void(0);" class=" sy_btn_blue mr5 ">编辑</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),
|
||||
:remote => true,
|
||||
:class => "sy_btn_grey mr5",
|
||||
|
@ -279,4 +290,7 @@
|
|||
function add_members_submit(){
|
||||
$("#new_membership").submit();
|
||||
}
|
||||
function remote_function(id) {
|
||||
$(id).submit();
|
||||
}
|
||||
</script>
|
|
@ -1,17 +1,18 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
<div style="padding-left: 8px; padding-top: 10px;">
|
||||
<div class="contextual">
|
||||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
<div class="wrap-big">
|
||||
<div style="padding-left: 8px;">
|
||||
<div class="contextual">
|
||||
<%= render :partial => 'navigation' %>
|
||||
</div>
|
||||
|
||||
<h3><%= l(:label_revision_path) %> :<%= @path %></h3>
|
||||
<h3><%= l(:label_revision_path) %> :<%= @path %></h3>
|
||||
|
||||
<%= render :partial => 'link_to_functions' %>
|
||||
<%= render :partial => 'link_to_functions' %>
|
||||
|
||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||
<%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue