<commit_before>- action = "saved_report_paging"
- url = url_for(:action => action)
- @pb_occ ||= 0
- @pb_occ += 1
- pages ||= {:perpage => @settings[:perpage][:reports],
             :current => 1,
             :total   => @sb[:pages][:total],
             :items   => @sb[:pages][:items]}

%div{:id => "rpb_div_#{@pb_occ}"}
  %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :width => "100%",
         :style => "height: 30px; border: 1px solid #BAB9BA; border-width: 1px 1px 0px 1px; background: url(/images/layout/teaserbarlg.png) repeat-x left bottom;"}
    %tr
      %td{:valign => "middle"}
      %td{:valign => "middle", :align => "right"}
        %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :align => "right"}
          %tr
            %td{:style => "padding: 4px 2px 4px 2px;", :nowrap => true}= _("Per page:")
            %td{:style => "padding: 4px 2px 4px 2px;"}
              = select_tag("perpage_setting#{@pb_occ}",
                           options_for_select(@pp_choices, pages[:perpage]),
                           "data-miq_sparkle_on"  => true,
                           "data-miq_sparkle_off" => true,
                           "data-miq_observe"     => {:url => url}.to_json)
            %td{:nowrap => true}
              - if pages[:current] > 1
                = link_to(image_tag('/images/toolbars/first.png', :border => "0", :class => "rollover small"),
                          {:action => action,
                           :page   => 1},
                          "data-miq_sparkle_on"  => true,
                          "data-miq_sparkle_off" => true,
                          :remote                => true,
                          :title                 => "")
                = link_to(image_tag('/images/toolbars/previous.png', :border => "0", :class => "rollover small"),
                          {:action => action,
                           :page   => pages[:current] - 1},
                          "data-miq_sparkle_on"  => true,
                          "data-miq_sparkle_off" => true,
                          :remote                => true,
                          :title                 => "")
              - else
                = image_tag('/images/toolbars/first.png', :class => "dimmed small")
                = image_tag('/images/toolbars/previous.png', :class => "dimmed small")
              - if pages[:perpage] < pages[:items]
                = link_to(image_tag('/images/toolbars/next.png', :class => "rollover small"),
                          {:action => action,
                           :page   => pages[:current] + 1},
                          "data-miq_sparkle_on"  => true,
                          "data-miq_sparkle_off" => true,
                          :remote                => true,
                          :title                 => "")
                = link_to(image_tag('/images/toolbars/last.png', :class => "rollover small"),
                          {:action  => action,
                           :page    => pages[:total]},
                          "data-miq_sparkle_on"  => true,
                          "data-miq_sparkle_off" => true,
                          :remote                => true,
                          :title                 => "")
              - else
                = image_tag('/images/toolbars/next.png', :class => "dimmed small")
                = image_tag('/images/toolbars/last.png', :class => "dimmed small")<commit_msg>Revert "Disable next and last pagination buttons when all the report data is on a single page"<commit_after>- action = "saved_report_paging"
- url = url_for(:action => action)
- @pb_occ ||= 0
- @pb_occ += 1
- pages ||= {:perpage => @settings[:perpage][:reports],
             :current => 1,
             :total   => @sb[:pages][:total],
             :items   => @sb[:pages][:items]}

%div{:id => "rpb_div_#{@pb_occ}"}
  %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :width => "100%",
         :style => "height: 30px; border: 1px solid #BAB9BA; border-width: 1px 1px 0px 1px; background: url(/images/layout/teaserbarlg.png) repeat-x left bottom;"}
    %tr
      %td{:valign => "middle"}
      %td{:valign => "middle", :align => "right"}
        %table{:border => "0", :cellpadding => "0", :cellspacing => "0", :align => "right"}
          %tr
            %td{:style => "padding: 4px 2px 4px 2px;", :nowrap => true}= _("Per page:")
            %td{:style => "padding: 4px 2px 4px 2px;"}
              = select_tag("perpage_setting#{@pb_occ}",
                           options_for_select(@pp_choices, pages[:perpage]),
                           "data-miq_sparkle_on"  => true,
                           "data-miq_sparkle_off" => true,
                           "data-miq_observe"     => {:url => url}.to_json)
            %td{:nowrap => true}
              - if pages[:current] > 1
                = link_to(image_tag('/images/toolbars/first.png', :border => "0", :class => "rollover small"),
                          {:action => action,
                           :page   => 1},
                          "data-miq_sparkle_on"  => true,
                          "data-miq_sparkle_off" => true,
                          :remote                => true,
                          :title                 => "")
                = link_to(image_tag('/images/toolbars/previous.png', :border => "0", :class => "rollover small"),
                          {:action => action,
                           :page   => pages[:current] - 1},
                          "data-miq_sparkle_on"  => true,
                          "data-miq_sparkle_off" => true,
                          :remote                => true,
                          :title                 => "")
              - else
                = image_tag('/images/toolbars/first.png', :class => "dimmed small")
                = image_tag('/images/toolbars/previous.png', :class => "dimmed small")
              - if pages[:current] < pages[:total]
                = link_to(image_tag('/images/toolbars/next.png', :class => "rollover small"),
                          {:action => action,
                           :page   => pages[:current] + 1},
                          "data-miq_sparkle_on"  => true,
                          "data-miq_sparkle_off" => true,
                          :remote                => true,
                          :title                 => "")
                = link_to(image_tag('/images/toolbars/last.png', :class => "rollover small"),
                          {:action  => action,
                           :page    => pages[:total]},
                          "data-miq_sparkle_on"  => true,
                          "data-miq_sparkle_off" => true,
                          :remote                => true,
                          :title                 => "")
              - else
                = image_tag('/images/toolbars/next.png', :class => "dimmed small")
                = image_tag('/images/toolbars/last.png', :class => "dimmed small")
{'fraction_non_alphanumeric': 0.1556343019135365, 'fraction_numerical': 0.00963855421686747, 'mean_word_length': 1.2916531341344593, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 125, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4889927', 'n_tokens_mistral': 2093, 'n_tokens_neox': 1990, 'n_words': 375}