diff --git a/app/views/user_admin/contests.html.erb b/app/views/user_admin/contests.html.erb new file mode 100644 --- /dev/null +++ b/app/views/user_admin/contests.html.erb @@ -0,0 +1,65 @@ +

+ List users in <% if @contest %><%= @contest.title %> + <% else %>Users not in any contests<% end %> +

+ +
+ <%= link_to '[View all users]', :action => 'list' %> + <% if Configuration.multicontests? %> + <%= link_to '[Manage bulk users in contests]', :action => 'contest_management' %> +
+ View users in: + <% @contests.each do |contest| %> + <%= link_to "[#{contest.name}]", :action => 'contests', :id => contest.id %> + <% end %> + <%= link_to "[no contest]", :action => 'contests', :id => 'none' %> + <% end %> +
+ + + + + + + + + + + <% if Configuration.multicontests? %> + + + <% end %> + + +<% for user in @users %> + "> + + + + + + + + <% if Configuration.multicontests? %> + + + <% end %> + +<% end %> +
LoginFull nameEmailActivated?ContestsOther enabled contests
<%=h user.login %><%=h user.full_name %><%=h user.email %><%=h user.activated %><%= link_to 'Show', :action => 'show', :id => user %><%= link_to 'Edit', :action => 'edit', :id => user %><%= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post %> + <% user.contests.each do |contest| %> + <%= contest.name %> [<%= link_to 'x', :action => 'remove_from_contest', :id => user.id, :contest_id => contest.id %>] + <% end %> + + <% @contests.each do |contest| %> + <% if not user.contests.all.find {|c| c.id==contest.id } %> + <%= contest.name %> [<%= link_to '+', :action => 'add_to_contest', :id => user.id, :contest_id => contest.id %>] + <% end %> + <% end %> +
+ + +
+ +<%= link_to 'New user', :action => 'new' %> +<%= link_to 'New list of users', :action => 'new_list' %>