diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 89014248..0bb71662 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -22,15 +22,14 @@ module ApplicationHelper def pagination_links_remote(collection, options = {}) per_page = options[:per_page] || @per_page params = options[:params] || {} - update = options[:update] || nil # Translations previous_label = '« ' + "Vorherige" next_label = "Nächste" + ' »' # Merge other url-options for will_paginate params = params.merge({:per_page => per_page}) - will_paginate collection, { :params => params, :remote => true, :update => update, - :previous_label => previous_label, :next_label => next_label, } + will_paginate collection, :params => params, 'data-remote' => remote, + :previous_label => previous_label, :next_label => next_label end # Link-collection for per_page-options when using the pagination-plugin diff --git a/app/views/admin/ordergroups/index.html.haml b/app/views/admin/ordergroups/index.html.haml index 5c3c51ec..ba4eee38 100644 --- a/app/views/admin/ordergroups/index.html.haml +++ b/app/views/admin/ordergroups/index.html.haml @@ -9,7 +9,7 @@ %p Beachte dabei den Unterschied zwischen Gruppe und Bestellgruppe: Eine Bestellgruppe hat ein Konto und kann Essen bestellen. In einer - %em= link_to 'Arbeisgruppe', admin_workgroups_path + %em= link_to 'Arbeitsgruppe', admin_workgroups_path (z.b. 'Soritiergruppe') koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten. Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören. diff --git a/public/javascripts/application.js b/public/javascripts/application.js index fa74ae80..561be4d9 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -60,6 +60,12 @@ $(function() { document.location.href = newLocation; } }); + + // Remote paginations + $('div.pagination[data-remote] a').live('click', function() { + $.getScript($(this).attr('href')); + return false; + }); });