Makes all pagination-like links use #link_to_content_update (#5138).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5301 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -21,16 +21,14 @@
|
||||
<%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
|
||||
|
||||
<div style="float:left;">
|
||||
<%= link_to_remote(('« ' + l(:label_previous)),
|
||||
{:update => "content", :url => params.merge(:from => @date_to - @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'},
|
||||
{:href => url_for(params.merge(:from => @date_to - @days - 1)),
|
||||
:title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))}) %>
|
||||
<%= link_to_content_update('« ' + l(:label_previous),
|
||||
params.merge(:from => @date_to - @days - 1),
|
||||
:title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))) %>
|
||||
</div>
|
||||
<div style="float:right;">
|
||||
<%= link_to_remote((l(:label_next) + ' »'),
|
||||
{:update => "content", :url => params.merge(:from => @date_to + @days - 1), :method => :get, :complete => 'window.scrollTo(0,0)'},
|
||||
{:href => url_for(params.merge(:from => @date_to + @days - 1)),
|
||||
:title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))}) unless @date_to >= Date.today %>
|
||||
<%= link_to_content_update(l(:label_next) + ' »',
|
||||
params.merge(:from => @date_to + @days - 1),
|
||||
:title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))) unless @date_to >= Date.today %>
|
||||
</div>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
|
||||
@@ -169,8 +169,8 @@ if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td align="left"><%= link_to_remote ('« ' + l(:label_previous)), {:url => params.merge(@gantt.params_previous), :method => :get, :update => 'content', :complete => 'window.scrollTo(0,0)'}, {:href => url_for(params.merge(@gantt.params_previous))} %></td>
|
||||
<td align="right"><%= link_to_remote (l(:label_next) + ' »'), {:url => params.merge(@gantt.params_next), :method => :get, :update => 'content', :complete => 'window.scrollTo(0,0)'}, {:href => url_for(params.merge(@gantt.params_next))} %></td>
|
||||
<td align="left"><%= link_to_content_update('« ' + l(:label_previous), params.merge(@gantt.params_previous)) %></td>
|
||||
<td align="right"><%= link_to_content_update(l(:label_next) + ' »', params.merge(@gantt.params_next)) %></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -35,16 +35,12 @@
|
||||
|
||||
<p><center>
|
||||
<% if @pagination_previous_date %>
|
||||
<%= link_to_remote ('« ' + l(:label_previous)),
|
||||
{:update => :content,
|
||||
:url => params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))
|
||||
}, :href => url_for(params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>
|
||||
<%= link_to_content_update('« ' + l(:label_previous),
|
||||
params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>
|
||||
<% end %>
|
||||
<% if @pagination_next_date %>
|
||||
<%= link_to_remote (l(:label_next) + ' »'),
|
||||
{:update => :content,
|
||||
:url => params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))
|
||||
}, :href => url_for(params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
|
||||
<%= link_to_content_update(l(:label_next) + ' »',
|
||||
params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
|
||||
<% end %>
|
||||
</center></p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user