#1290 修改admin配置管理--用户列表--项目列表界面以及相关功能问题

This commit is contained in:
sw 2014-08-13 16:52:07 +08:00
parent a7e22a7379
commit 440395f26f
1 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<% roles = Role.find_all_givable %> <% roles = Role.find_all_givable[0..2] %>
<% projects = Project.active.all %> <% projects = Project.active.all %>
<div class="splitcontentleft"> <div class="splitcontentleft">
@ -50,12 +50,19 @@
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata"><%= l(:label_no_data) %></p>
<% end %> <% end %>
</div> </div>
<script type="text/javascript">
window.onready = function()
{
$("#membership_project_id").css("width","150px");
$("#membership_project_id").css("overflow ","hidden");
}
</script>
<div class="splitcontentright"> <div class="splitcontentright">
<% if projects.any? %> <% if projects.any? %>
<fieldset><legend><%=l(:label_project_new)%></legend> <fieldset style="width: 170px;"><legend><%=l(:label_project_new)%></legend>
<%= form_for(:membership, :remote => true, :url => user_memberships_path(@user)) do %> <%= form_for(:membership, :remote => true, :url => user_memberships_path(@user)) do %>
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects) %> <div style="width:100px;"><%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects)%></div>
<p><%= l(:label_role_plural) %>: <p><%= l(:label_role_plural) %>:
<% roles.each do |role| %> <% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label> <label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>