Sha256: 98cb40baadad41beb55d72b4f2ec45b3ef87424290c1d561e30b93f0dfe33fae

Contents?: true

Size: 801 Bytes

Versions: 13

Compression:

Stored size: 801 Bytes

Contents

%h3 Listing all admins
%table{:border => "1"}
  %tr
    %th
      Name

  - @admins.each do |admin|
    %tr
      %td
        = admin.forum_display_name
      %td
        = button_to "Remove", admin_user_remove_admin_path("dummy", user: {id: admin.id}), method: :post, data: { confirm: 'Are you certain you want to delete this?' }

= form_tag admin_user_add_admin_path("dummy"), :method => :post, :id => "form_add_user" do
  %input{:id => "userinput", :list => "users", :name => "[user][id]"}/
  %datalist#users
    - @non_admins.each do |user|
      %option{:id => user.id, :value => user.forum_display_name}
  = submit_tag("Add Admin")

:javascript
  $("#form_add_user").submit(function(){
    $("#userinput").val($('#users').find('option[value="' + $('#userinput').val() + '"]').attr('id'));
  });

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
mongoid-forums-1.0.7 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-1.0.6 app/views/mongoid_forums/admin/users/index.haml
ack-mongoid-forums-1.0.6.1 app/views/mongoid_forums/posts/admin/users/index.haml
ack-mongoid-forums-1.0.6 app/views/mongoid_forums/posts/admin/users/index.haml
ack-mongoid-forums-1.0.5 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-1.0.4 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-1.0.3 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-1.0.2 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-1.0.1 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-1.0.0 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-0.0.11 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-0.0.10 app/views/mongoid_forums/admin/users/index.haml
mongoid-forums-0.0.9 app/views/mongoid_forums/admin/users/index.haml