<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -204,36 +204,28 @@ module ApplicationHelper
     url_param.clear if url_param.has_key?(:set_filter)
 
     html = ''
-    html &lt;&lt; link_to_remote(('&amp;#171; ' + l(:label_previous)),
-                            {:update =&gt; 'content',
-                             :url =&gt; url_param.merge(page_param =&gt; paginator.current.previous),
-                             :method =&gt; :get,
-                             :complete =&gt; 'window.scrollTo(0,0)'},
-                            {:href =&gt; url_for(:params =&gt; url_param.merge(page_param =&gt; paginator.current.previous))}) + ' ' if paginator.current.previous
+    if paginator.current.previous
+      html &lt;&lt; link_to_remote_content_update('&amp;#171; ' + l(:label_previous), url_param.merge(page_param =&gt; paginator.current.previous)) + ' '
+    end
 
     html &lt;&lt; (pagination_links_each(paginator, options) do |n|
-      link_to_remote(n.to_s,
-                      {:url =&gt; {:params =&gt; url_param.merge(page_param =&gt; n)},
-                       :method =&gt; :get,
-                       :update =&gt; 'content',
-                       :complete =&gt; 'window.scrollTo(0,0)'},
-                      {:href =&gt; url_for(:params =&gt; url_param.merge(page_param =&gt; n))})
+      link_to_remote_content_update(n.to_s, url_param.merge(page_param =&gt; n))
     end || '')
-
-    html &lt;&lt; ' ' + link_to_remote((l(:label_next) + ' &amp;#187;'),
-                                 {:update =&gt; 'content',
-                                  :url =&gt; url_param.merge(page_param =&gt; paginator.current.next),
-                                  :method =&gt; :get,
-                                  :complete =&gt; 'window.scrollTo(0,0)'},
-                                 {:href =&gt; url_for(:params =&gt; url_param.merge(page_param =&gt; paginator.current.next))}) if paginator.current.next
+    
+    if paginator.current.next
+      html &lt;&lt; ' ' + link_to_remote_content_update((l(:label_next) + ' &amp;#187;'), url_param.merge(page_param =&gt; paginator.current.next))
+    end
 
     unless count.nil?
-      html &lt;&lt; [&quot; (#{paginator.current.first_item}-#{paginator.current.last_item}/#{count})&quot;, per_page_links(paginator.items_per_page)].compact.join(' | ')
+      html &lt;&lt; [
+        &quot; (#{paginator.current.first_item}-#{paginator.current.last_item}/#{count})&quot;,
+        per_page_links(paginator.items_per_page)
+      ].compact.join(' | ')
     end
 
     html
   end
-
+  
   def per_page_links(selected=nil)
     url_param = params.dup
     url_param.clear if url_param.has_key?(:set_filter)
@@ -630,4 +622,12 @@ module ApplicationHelper
     extend helper
     return self
   end
+  
+  def link_to_remote_content_update(text, url_params)
+    link_to_remote(text,
+      {:url =&gt; url_params, :method =&gt; :get, :update =&gt; 'content', :complete =&gt; 'window.scrollTo(0,0)'},
+      {:href =&gt; url_for(:params =&gt; url_params)}
+    )
+  end
+  
 end</diff>
      <filename>app/helpers/application_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>25f8895fba0d3cc240e7df059474e471e965e992</id>
    </parent>
  </parents>
  <author>
    <name>Gerrit Kaiser</name>
    <email>gerrit@gerritkaiser.de</email>
  </author>
  <url>http://github.com/tricycle/redmine/commit/9129b5cb3da925cd3d9075b2547dc6638f2d0c2e</url>
  <id>9129b5cb3da925cd3d9075b2547dc6638f2d0c2e</id>
  <committed-date>2009-01-22T20:00:47-08:00</committed-date>
  <authored-date>2009-01-22T19:58:26-08:00</authored-date>
  <message>refactored ajax link generation into separate method</message>
  <tree>d272a06de4ba524f68c73b648b356ff808162d0f</tree>
  <committer>
    <name>Gerrit Kaiser</name>
    <email>gerrit@gerritkaiser.de</email>
  </committer>
</commit>
