From 98373bb223e0a2e4ada867cde307a765a815a5c2 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 30 May 2012 12:33:28 +0200 Subject: [PATCH] SONAR-3528 Pagination is broken on reviews widgets Fix regression introduced during fix of SONAR-3404 (see commit c8278a1e6bca00368405a760b3ab8d0d4c32f146): the name "limit" used to allow loading more reviews is the same as the one used by the widget's partial to paginate. => now, the partial uses "table_limit" as parameter --- .../views/project/widgets/reviews/_reviews_list.html.erb | 6 +++--- .../project/widgets/reviews/_reviews_list_widget.html.erb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/reviews/_reviews_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/reviews/_reviews_list.html.erb index ab15c76257d..f77bbfcb582 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/reviews/_reviews_list.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/reviews/_reviews_list.html.erb @@ -1,5 +1,5 @@ <% - limit = params[:limit] unless limit + table_limit = params[:table_limit] unless table_limit widget_id = params[:widget_id] unless widget_id search_options = params unless search_options @@ -15,7 +15,7 @@ # table pagination page_size = 20 - page_size = limit.to_i + page_size = table_limit.to_i total_number = reviews.size if reviews.size > page_size page_id = (params[:page_id] ? params[:page_id].to_i : 1) @@ -52,7 +52,7 @@ link_params[:controller] = 'project_reviews' link_params[:action] = 'widget_reviews_list' link_params[:snapshot_id] = @snapshot.id - link_params[:limit] = limit + link_params[:table_limit] = table_limit link_params[:widget_id] = widget_id link_params[:period] = params[:period] %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/reviews/_reviews_list_widget.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/reviews/_reviews_list_widget.html.erb index be01dd0f678..12c280cca83 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/reviews/_reviews_list_widget.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/reviews/_reviews_list_widget.html.erb @@ -1,5 +1,5 @@ <% - limit = widget_properties["numberOfLines"] + table_limit = widget_properties["numberOfLines"] if @dashboard_configuration.selected_period? search_options['from'] = @dashboard_configuration.from_datetime @@ -12,6 +12,6 @@
<%= render :partial => 'project/widgets/reviews/reviews_list', :locals => {:search_options => search_options, - :limit => limit, + :table_limit => table_limit, :widget_id => widget_id} %>
\ No newline at end of file -- 2.39.5