diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-26 16:37:05 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-26 16:37:05 +0000 |
commit | 3eea03d70efd4e894a5020e8bae62a6af6e59803 (patch) | |
tree | 3ba4a4e959af6ee7d1270a61ae2d302567508ec3 /app/views/calendars | |
parent | 56e984b5e740398d0659432ecdee770de1943e84 (diff) | |
download | redmine-3eea03d70efd4e894a5020e8bae62a6af6e59803.tar.gz redmine-3eea03d70efd4e894a5020e8bae62a6af6e59803.zip |
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
Diffstat (limited to 'app/views/calendars')
-rw-r--r-- | app/views/calendars/show.html.erb | 9 |
1 files changed, 1 insertions, 8 deletions
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 @@ </fieldset> <p style="float:right;"> -<%= 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) %> </p> <p class="buttons"> |