From 52d1785a7c07e9696d50e58603763d0bde2789f1 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Tue, 22 Oct 2013 14:16:20 +0200 Subject: [PATCH] Fix managing user roles --- app/views/admin/supporters/index.html.haml | 38 ++++------------------ app/views/admin/users/index.html.haml | 2 +- 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/app/views/admin/supporters/index.html.haml b/app/views/admin/supporters/index.html.haml index 31bebdcf..60e71571 100644 --- a/app/views/admin/supporters/index.html.haml +++ b/app/views/admin/supporters/index.html.haml @@ -28,34 +28,10 @@ %th Code Valid %tbody - -:javascript - $(document).ready(function() { - $('#supporters').dataTable( { - "bProcessing": true, - "bServerSide": true, - sPaginationType: "full_numbers", - sAjaxSource: "#{admin_conference_supporters_path(@conference.short_title)}", - "aoColumns": [ - // TODO Disable sorting entirely for now, until issues with joins on the Person are resolved - { "bSortable": false }, - { "bSortable": false }, - { "bSortable": false }, - { "bSortable": false }, - { "bSortable": false }, - ] - } ); - - $("#supporter-add-form").live('ajax:error', function(xhr, status, error) { - alert('error'); - }) - .live('ajax:success', function() { - $("#new-supporter-dialog").dialog("close"); - $("#supporters").dataTable().fnReloadAjax(); - $("#flash-bar").html("
×Supporter added.
"); - }); - $("#new-supporter-dialog").hide(); - $("#new-supporter-button").click(function(event) { - $("#new-supporter-dialog").dialog(); - }); - } ); + - @conference.supporter_registrations.each do |u| + %tr + %td= u.name + %td= u.email + %td= u.supporter_level + %td= u.code + %td= u.code_is_valid \ No newline at end of file diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 5be41f9b..030ed138 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -65,7 +65,7 @@ %button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"} Cancel = f.action :submit, :as => :button, :button_html => {:value => "Save", :class => "btn btn-primary"} - =link_to "Modify Roles", "#", "data-toggle" => "modal", "data-target" => "#user-role-selection-#{user.id}}" + =link_to "Modify Roles", "#", "data-toggle" => "modal", "data-target" => "#user-role-selection-#{user.id}" %td =link_to "Details", "javascript: void(0)", :class => "user-details-popover", "data-trigger" => "click", "data-placement" => "bottom", "data-html" => "true",