summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-01 13:50:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-01 13:50:39 +0000
commit7f8d959171c571eaf1a49951a2da02ccffa6f808 (patch)
tree7411ea352ccfaf13f3ea8ee3a7bb7dc806481845 /app/views
parentf705b889d9d20086094939b1e7060bf49bd01f2b (diff)
downloadredmine-7f8d959171c571eaf1a49951a2da02ccffa6f808.tar.gz
redmine-7f8d959171c571eaf1a49951a2da02ccffa6f808.zip
Show the project hierarchy in the drop down list for new membership on user administration screen.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1401 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/users/_memberships.rhtml12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/users/_memberships.rhtml b/app/views/users/_memberships.rhtml
index 2499ba387..44d74ef7b 100644
--- a/app/views/users/_memberships.rhtml
+++ b/app/views/users/_memberships.rhtml
@@ -13,17 +13,17 @@
</p>
<% end %>
<% end %>
+
+<% if @projects.any? %>
<hr />
<p>
<label><%=l(:label_project_new)%></label><br/>
<% form_tag({ :action => 'edit_membership', :id => @user }) do %>
-<select name="membership[project_id]">
-<%= options_from_collection_for_select @projects, "id", "name", @membership.project_id %>
-</select>
-<select name="membership[role_id]">
-<%= options_from_collection_for_select @roles, "id", "name", @membership.role_id %>
-</select>
+<%= select_tag 'membership[project_id]', projects_options_for_select(@projects) %>
+<%= l(:label_role) %>:
+<%= select_tag 'membership[role_id]', options_from_collection_for_select(@roles, "id", "name") %>
<%= submit_tag l(:button_add) %>
<% end %>
</p>
+<% end %>
</div> \ No newline at end of file