Fix managing user roles

This commit is contained in:
Henne Vogelsang 2013-10-22 14:16:20 +02:00
parent b4a3baea1c
commit 52d1785a7c
2 changed files with 8 additions and 32 deletions

View file

@ -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("<div class='alert alert-success'><a href='#' class='close' data-dismiss='alert'> ×</a>Supporter added.</div>");
});
$("#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

View file

@ -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",