From 3eea03d70efd4e894a5020e8bae62a6af6e59803 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Thu, 26 Aug 2010 16:37:05 +0000 Subject: Refactor: extract link to previous and next month into helpers. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4042 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/calendars/show.html.erb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'app/views/calendars') diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb index afbceb9cd..09bf7ddf2 100644 --- a/app/views/calendars/show.html.erb +++ b/app/views/calendars/show.html.erb @@ -10,14 +10,7 @@

-<%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")), - {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) }}, - {:href => url_for(:action => 'show', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1))} - %> | -<%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' »'), - {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) }}, - {:href => url_for(:action => 'show', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1))} - %> + <%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %>

-- cgit v1.2.3